设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4032|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。" |3 p& I# s# ]$ z1 c
语句是这样的0 J6 W3 i% K6 `' ?, K' x" a* x
is5 u; s' v3 Z& N
        i:integer;
. T/ d5 @% X: s! d9 A1 k# |        Res:string;9 v+ O! V  ^( P
        obj:object;
8 F- |& D* l- D; K  y$ |  S% mdo+ _9 ?' C$ `5 |8 y& q
        if existsObject("Status") then
# t+ Y" Z0 `$ S/ d; |5 s                Status.deleteObject;3 l: _3 A* ~- N: V
        end;* Z) I' R  l6 }
        for i:=1 to 10 loop
% g$ U9 C% B: }9 Q7 X, `! u0 S4 {                Res:=sprint("Store_",i);
# ~# \# |" w) b) M% e                if existsObject(Res) then4 Z% a1 w# v5 n7 {$ S
                        Obj:=str_to_obj(Res);
6 s7 z0 `9 x# S) A2 ^                        Obj.deleteObject;( t1 n4 S/ n) R- W% f
                end;
4 j( Z$ v% P, G; Q' h" I, Z        next;4 L1 v+ @: N+ b) I: D, W' ]
        --shengcheng Status:zimoxingceng2 X& e( [* I: A5 b: @) f4 v; l, T
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");; Q. A4 ~5 @& b
        Obj.Label:="warehouse status";
, X3 e# l! P/ t( `        # ~/ D- L7 H, N. n; e
        for i:=1 to WH_nums loop; j0 c/ G/ T! k, E! L: z' m
                Res:=sprint("Store_",i);
; [3 f9 t3 H7 _5 @9 P, f& r- Y, Z                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
/ S& I+ w6 |0 T6 l% w0 C5 G  V! k- w                Obj.Label:=sprint("huojiaceng:",i);
: a0 I! h8 i4 H4 G  {/ H% V' U, l                Obj.xDim:=WH_x;
2 E* X% _. b4 b: `5 h7 g                Obj.yDim:=WH_y;
7 e$ H0 d) Z; l2 c# v                Res:=sprint("StoreData_",i);# ^6 C3 }4 J3 E: D; ?
                ' ^/ s9 o( @' z! d# d4 j
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
3 f6 u0 c5 Q$ B- d, B- t                Obj.Label:=sprint("huojiaceng:",i);3 l! o$ @2 `/ [" _+ `  v
                Obj.inheritFormat:=false;
2 m1 D6 H; Y$ Q8 S4 }+ l                Obj.maxxDim:=WH_x;
+ S( \# b4 X0 a# P/ W1 K& ?, a                Obj.maxyDim:=WH_y;( [7 i9 Z( A& K# X5 q) V
                Obj.ColumnWidth:=3;/ r7 r) Y+ p  W
        next;1 k: ^. y* U7 `! P0 ^
        + @2 T. K% t* u8 {; K* W0 i
        .Delivery.MUs.Forklift.speed:=2;
% _1 u6 J+ @; ?8 ^        WH_var.delete({1,Part_Nums+1}..{*,*});0 N4 q* h0 `/ _, u! f$ W
        for i:=1 to Part_Nums loop
) B4 H3 K/ W6 A                WH_var[1,i]:=chr(64+i);4 ~# Q! x& e# |1 v: ]7 d/ i) ?$ V
        next;
* M% n6 P6 g* P$ L) L* g6 }3 B2 Gend;
0 \( R1 I+ a% R出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了1 k6 @! N2 B. k. l0 t- z

/ I" ~5 Q6 p& K& E# M& F4 Y1 Q$ E

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-6-5 18:52 , Processed in 0.014550 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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