设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3030|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
9 z# {7 g4 u( W# b) R语句是这样的. M* R/ j, Y+ ^5 B
is& u1 e; c5 x" \! o. h  K+ \7 e, Z
        i:integer;
% e9 a1 [! I9 w! y        Res:string;
; w' w8 ^& P6 E5 ]8 [        obj:object;
) B+ u. C1 V3 s  Z4 l7 G. Gdo
$ {- J( x# Y5 m& i+ c, X# J        if existsObject("Status") then9 V# n2 o! X3 F
                Status.deleteObject;1 U7 E* n- F* g( }' b" J
        end;$ M% t6 x& p( s7 w( w
        for i:=1 to 10 loop( a+ G) ]2 U+ \. `
                Res:=sprint("Store_",i);
1 v4 R/ P; b" J" O2 A+ t                if existsObject(Res) then
2 A$ j5 O2 n# s+ h% T" }' N3 v                        Obj:=str_to_obj(Res);$ j4 t0 M: l* ]
                        Obj.deleteObject;
! Q4 Z' g% F8 f7 W                end;* c6 C. s6 d. f
        next;& }( j9 ~; e3 G* l  U5 b
        --shengcheng Status:zimoxingceng: m+ W5 ?9 q& ~. F* Q
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");1 O. A# E! Z% Q! O
        Obj.Label:="warehouse status";4 T+ l$ S2 w1 _4 I9 o  K# L
        5 m0 N3 K1 F& t4 u( o0 c, D
        for i:=1 to WH_nums loop
2 F, K- N- L; ]) u' u+ J                Res:=sprint("Store_",i);% w( J- p* j1 j5 M- y7 x
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);, Z, |0 |- d8 P5 z9 f
                Obj.Label:=sprint("huojiaceng:",i);
  l6 _& u* D, ~5 f                Obj.xDim:=WH_x;
" N8 Y, k  h. C! r1 ~0 t* F; ]                Obj.yDim:=WH_y;
! o5 d: y1 F+ t% u1 e. }4 a                Res:=sprint("StoreData_",i);; H# ~6 l3 B' K; ]* ^8 S0 n
                , f1 h7 ?& M4 _
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);, f# ^# X9 J  K5 s
                Obj.Label:=sprint("huojiaceng:",i);
# m6 c3 |4 z% t& a$ T3 u                Obj.inheritFormat:=false;
: \9 E# s9 Y, r  Z                Obj.maxxDim:=WH_x;- a: H0 a* D* l: y+ ~1 o7 c
                Obj.maxyDim:=WH_y;9 X; o, t* K. C" Y, U( C- P
                Obj.ColumnWidth:=3;
2 T. x! N9 t, I4 N; h- q        next;
* r0 r6 `3 Q% y       
! W8 _, D) b, d" P        .Delivery.MUs.Forklift.speed:=2;
- }% G: Y0 M: ]# f! D  R9 Q        WH_var.delete({1,Part_Nums+1}..{*,*});
1 A2 X7 r% a  Y0 c6 T; o        for i:=1 to Part_Nums loop
% T7 _' ^- ?( |3 D' U% p6 ~                WH_var[1,i]:=chr(64+i);+ H  K' E9 c. F# {3 s5 o
        next;
7 |& \' ^8 i! h, y( C  uend;
$ |! w; }! f5 Z# Y) h( C5 T出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
/ Y' n$ g  ^$ _8 ^. e. d
: q% ], I; P; u; j) f( \0 z6 G8 K

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2025-12-8 23:23 , Processed in 0.021751 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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