设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2615|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。, a9 i: p# r! ]' V% s( h. x
语句是这样的- A, P' l2 [4 j* T9 w4 s7 M6 C
is
! {- S+ }3 D; w/ O/ ?# b        i:integer;9 e3 k: q( d. V6 F9 O9 N4 z8 g& ]
        Res:string;
/ [+ ]# m* j- M  O5 g" [0 t        obj:object;8 }# _+ p7 h: E" y/ W$ h0 ~  }
do' d4 X( b* T' X
        if existsObject("Status") then
& L: {7 Y+ |0 z5 W                Status.deleteObject;
" J+ q- r& U) |  q        end;) f+ v$ A# D5 I
        for i:=1 to 10 loop3 E1 x" g; _( _
                Res:=sprint("Store_",i);
& H2 M0 }/ Z+ X+ f                if existsObject(Res) then% `) s3 s+ R+ e$ F; u1 ]
                        Obj:=str_to_obj(Res);% N/ c, C2 T1 O, F
                        Obj.deleteObject;
! q: K% U$ z/ U% ^                end;
, x( D2 H8 s6 A6 ]        next;
: a% R; i1 U8 g$ i- j6 O) ^        --shengcheng Status:zimoxingceng1 v' `* \! [3 ?! K9 `
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");7 S! J1 E1 Q0 T4 D  @4 i
        Obj.Label:="warehouse status";  K! C, M6 ~1 y& x
        * _7 V- P' V, M9 M& F" f! s- M
        for i:=1 to WH_nums loop
+ M$ {$ y; |( C6 N+ G, W                Res:=sprint("Store_",i);& {, q9 \: c9 s4 U
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
4 O: ~2 N, w( v' z                Obj.Label:=sprint("huojiaceng:",i);
! y  b+ K* H- }* P- g: O                Obj.xDim:=WH_x;( @/ a7 {  ~: S  q: h
                Obj.yDim:=WH_y;
$ n6 p( Y* o5 o+ B: S- }1 u                Res:=sprint("StoreData_",i);/ K8 |7 E) m% {1 p
               
( G+ l( E; ^% |  ^7 K                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
1 w) q; ?+ i0 S3 T5 l                Obj.Label:=sprint("huojiaceng:",i);% O2 q) p  v' b7 A0 X: q
                Obj.inheritFormat:=false;
& M8 i( H) C% _2 G4 a                Obj.maxxDim:=WH_x;
5 V( Y% z# z4 j                Obj.maxyDim:=WH_y;% B4 B% v4 T2 Y6 q
                Obj.ColumnWidth:=3;
1 a! {/ D) M# b1 ?& y  i/ S" ~  M        next;6 x8 j" b5 C7 E8 w  A7 U  P
        $ E8 u6 W  N# v6 p* p
        .Delivery.MUs.Forklift.speed:=2;/ m$ j' y6 u. B0 \& i4 o
        WH_var.delete({1,Part_Nums+1}..{*,*});- E* s; I% S) [. a; l0 f; z
        for i:=1 to Part_Nums loop
' p8 h) }& R3 q: F  o# F) W                WH_var[1,i]:=chr(64+i);0 y; c9 D# e1 f9 e, y" [' g
        next;
) g: Z  |7 ~' v( y! jend;
4 w- I" F( w. H出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
( j0 E, m. R5 g4 ^+ Q- R" d- j
. q  [! F# k5 _5 V3 S; M- t

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2025-8-21 13:49 , Processed in 0.013205 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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