设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3524|回复: 0

[求助] 仿真出错,求大神帮我看看哪里错了

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。6 J  ~' W2 z0 l2 b" U" ^. d+ V
语句是这样的" }; r$ h  P# v# O' e0 E- _" x
is: |, T0 V5 S* {* |& b7 W
        i:integer;( |! ^9 R! |) l! }
        Res:string;' B- A1 z- W% c4 f3 {# Y7 R$ q0 D
        obj:object;8 i6 @4 @$ j( L" o: ?
do
3 s) x  }% _7 R2 l% Q& c: S3 z3 Z6 W' g        if existsObject("Status") then  [0 N# i2 [; {: h/ Y! L- J
                Status.deleteObject;' p8 X. ?, H  A# T8 k% J1 A
        end;$ w. k; b0 J6 ?( y
        for i:=1 to 10 loop
. R  @0 V0 O& P' L! R                Res:=sprint("Store_",i);+ m1 F. O9 b! o0 T" B9 _/ Z) `
                if existsObject(Res) then
& R3 `3 u  x+ J$ D                        Obj:=str_to_obj(Res);5 O5 b8 B! ]  x
                        Obj.deleteObject;
. ^( _! p6 i2 i3 }                end;
& }8 B: I! R1 q9 |7 b+ B. R' `& S        next;
2 a; ]! P5 l& V0 ?& r        --shengcheng Status:zimoxingceng
% U1 Z  h8 Q$ T* R        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
3 u. m- k( x# q$ r. i) Q        Obj.Label:="warehouse status";
. y( N7 L, V0 f, C6 A' S$ z        + O$ z& ]- u) S# y7 ]
        for i:=1 to WH_nums loop
3 f4 W/ c! Z- k                Res:=sprint("Store_",i);
% J* [7 A5 F0 h- B                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
# ^/ {8 g! v1 \! ?                Obj.Label:=sprint("huojiaceng:",i);
4 a  O. _1 l/ e! G4 n7 T: }& r                Obj.xDim:=WH_x;8 e9 g( J6 o+ q3 `& |8 f
                Obj.yDim:=WH_y;
+ s9 n: s' j7 ]3 l: n7 N                Res:=sprint("StoreData_",i);; P& w  S$ I$ @, A' B( T( T
               
- c( x+ d) f1 [6 t6 h8 s                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);2 a: e# Y* ?! y* K6 M; ^
                Obj.Label:=sprint("huojiaceng:",i);% J- d$ K9 k  v0 Q' c$ c
                Obj.inheritFormat:=false;$ s5 t+ o, w# K0 V3 A: h  I
                Obj.maxxDim:=WH_x;
* p- e8 l( H" B' z                Obj.maxyDim:=WH_y;# \  {( s6 c* z1 s, t' h
                Obj.ColumnWidth:=3;
! _0 M  {. y- g3 _        next;1 Z: s: Y3 Z% x6 y$ v: Y
        ! I( V% C% C. ^/ X; R2 D9 i
        .Delivery.MUs.Forklift.speed:=2;' c1 A5 T. j& @1 b
        WH_var.delete({1,Part_Nums+1}..{*,*});0 i8 p7 G, R0 T/ D" M. z
        for i:=1 to Part_Nums loop& j6 {, _( t6 o) f1 p2 u
                WH_var[1,i]:=chr(64+i);. l7 F9 j' g0 Z7 Q5 ?# e. b  E$ t- j
        next;9 C7 p1 q( Y) t7 ~5 A
end;  w" t% n7 M' {  x: w9 u
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了  z$ y) z7 g4 s4 q: |  k  [

& B( f& f* r/ a. i! h  w+ l

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2026-3-15 04:22 , Processed in 0.016900 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表