设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4239|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
& @  c9 Z) _0 Q* R语句是这样的) n5 ]+ x; n/ O" u! e2 \
is4 B# f* d2 q0 f: R
        i:integer;
# b1 Y# O" e, s1 ]* N- Z" f        Res:string;
$ c9 [/ C" T* R7 O9 |4 ^        obj:object;$ r( s8 d8 U+ B2 s
do
/ h8 ]) I6 ^3 W        if existsObject("Status") then
$ y0 u( @: e. q5 c$ _: P+ p, V# N                Status.deleteObject;
0 j% S6 Y4 ^. q3 q& X3 r7 s        end;
+ M3 j8 W' d) R" L$ m        for i:=1 to 10 loop9 ]3 K$ P9 F# O* M
                Res:=sprint("Store_",i);
1 P, M* H1 i6 A& J5 a( `% J                if existsObject(Res) then
2 L" M1 c7 i6 Q) y                        Obj:=str_to_obj(Res);
. m: g, v& ~: ]; Z4 [                        Obj.deleteObject;( p( u5 n7 T, E# i
                end;
) R9 G* F- e( k6 Z2 Z" V3 ]        next;
) g5 w: X6 u% B4 w9 X        --shengcheng Status:zimoxingceng" U; h3 \- O* Z- L
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");2 z  ^1 u% n4 C  C" q* J
        Obj.Label:="warehouse status";" c" x# n3 I1 n* N7 N1 z
        " h3 M- I/ A* M' b3 j
        for i:=1 to WH_nums loop
* @9 v3 J: y6 b% |* I, R; v                Res:=sprint("Store_",i);! }2 J% t4 A7 ?) y3 {% S7 Y/ j
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);5 B( ]  T0 C% t/ ^
                Obj.Label:=sprint("huojiaceng:",i);
1 P4 `7 Q5 R% c                Obj.xDim:=WH_x;1 x1 A2 U3 M6 j9 k3 U- H4 W
                Obj.yDim:=WH_y;6 _2 }0 P' \" y# C, k6 V1 Q7 H& w0 d
                Res:=sprint("StoreData_",i);! T6 ~* e" I7 q3 @; w1 `( f# p
               
" L0 L; K' F; z' b. n                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
+ y: ^8 t8 f) A2 ~                Obj.Label:=sprint("huojiaceng:",i);
, u+ U; x3 C/ n/ y, h$ T! z                Obj.inheritFormat:=false;) u1 V1 p! c0 s
                Obj.maxxDim:=WH_x;: `% M1 X0 u! K- ]6 C+ M, l4 D/ p
                Obj.maxyDim:=WH_y;
' B. \/ u  G, B                Obj.ColumnWidth:=3;
5 Z) T# t0 A3 p  S0 A        next;
0 E; \8 `" ?1 ~$ A0 ], f       
; Q( [% P$ m3 K        .Delivery.MUs.Forklift.speed:=2;9 v8 ~+ d8 F! ^5 M& x  ^
        WH_var.delete({1,Part_Nums+1}..{*,*});
# m4 c) P5 h: h/ M        for i:=1 to Part_Nums loop. o8 G1 s  h' Q- y- L2 x% _
                WH_var[1,i]:=chr(64+i);7 }9 h& F5 {' B+ J) ]& B
        next;
1 y/ y# y; f! e/ Q0 eend;
: Z$ Y% m9 F! K出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
+ o- z% x8 f2 N  x8 F2 ]! r" d0 x' O* |6 j) R

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-7-12 15:38 , Processed in 0.016320 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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