设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3430|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。0 q2 ?) H0 R1 r7 e
语句是这样的
) k6 G' P$ o; D- V1 q2 T' H. @is8 t% h) e7 R( K+ i0 M6 Q) j! \
        i:integer;
3 r- \9 p/ r4 X1 D! n4 p        Res:string;
0 t3 F# ]' I+ q* G) I* B0 g. e' U        obj:object;
4 I! h8 a4 t  |4 \* b, S% c3 w* Q; pdo7 Q- r- v& `; _& Q& S9 z, o
        if existsObject("Status") then
* U' C8 c* j) W) U/ ?5 b                Status.deleteObject;
2 g; Z0 X- R0 `- g        end;& ~9 l' W! s2 K  S1 H" ~
        for i:=1 to 10 loop  L8 r% `- Y& u7 h& g- V4 R
                Res:=sprint("Store_",i);
: C% q& c: D& @                if existsObject(Res) then9 P' l- w7 I6 z+ \. g+ e4 f
                        Obj:=str_to_obj(Res);
7 s# E4 j) r: a# Q- L! u' d                        Obj.deleteObject;
; V, `- b$ q2 F& X. w                end;  [3 G( D; c3 i# E* i, O
        next;
1 b: u, a' M' U3 G        --shengcheng Status:zimoxingceng$ Z9 l' g8 m) i6 r
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
1 N  X! F, n" a( x" V- j1 h        Obj.Label:="warehouse status";2 ]& E! z) t$ [$ P
        2 O$ B$ g" }) B8 p
        for i:=1 to WH_nums loop$ k  h0 h! N' t0 Q
                Res:=sprint("Store_",i);
0 `5 b! \# D  k/ J# N! E: v9 D                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
. u$ y: {' |$ a% d                Obj.Label:=sprint("huojiaceng:",i);
+ T* o" H3 C3 G4 ]6 k1 W, G( j                Obj.xDim:=WH_x;
/ U: h  k, _6 `* [, F& h- m2 d3 }                Obj.yDim:=WH_y;/ n' L" e0 w5 {7 r7 }/ A1 s; p
                Res:=sprint("StoreData_",i);; d" O0 y) z2 T
               
3 q" j- e9 P) x6 e( }2 G" w- B                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
" ^* Q# a7 U" O7 j: @* f, C% Z. l                Obj.Label:=sprint("huojiaceng:",i);
% Z7 Y7 M7 c4 ~" e/ u# r                Obj.inheritFormat:=false;
' y4 d- [9 x( @6 E+ G) f                Obj.maxxDim:=WH_x;8 j6 [. H. P9 |  F8 i6 D
                Obj.maxyDim:=WH_y;
. c0 p, l1 ~& o2 j/ ]; a& _/ S                Obj.ColumnWidth:=3;
/ q0 F$ [& _2 a        next;
, f5 I( Q# M1 |3 C5 r       
4 x$ [+ n9 P* w5 n# m        .Delivery.MUs.Forklift.speed:=2;
) r1 t! Z. d( B( i        WH_var.delete({1,Part_Nums+1}..{*,*});
% N+ D: n; V$ u; ]        for i:=1 to Part_Nums loop7 W( F$ u# G* y
                WH_var[1,i]:=chr(64+i);
+ o; M! U' V0 ~, {& k$ @4 L        next;
! F; N2 q5 p. i: D& Qend;5 L& \5 s  V' i8 Y7 F
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
) J; N# ]0 z3 ]5 D2 P/ U' q- Y, y: U3 p6 n

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-2-25 10:45 , Processed in 0.015351 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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