设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2722|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。: V0 D! f/ o; c; l* i9 |7 S
语句是这样的  Y. g* T% ?+ g9 t/ f0 ~
is4 b7 }! g  d8 {9 L. Z8 l
        i:integer;$ h6 f5 n2 a, R- P7 O0 b% |
        Res:string;
3 N1 K% C6 I8 z; e1 q# ?        obj:object;
+ E; Q9 N8 J7 c* m( ]: fdo0 \1 q# p+ {2 a( H! V0 i, p0 ]
        if existsObject("Status") then+ {( u, F" r/ o: b& R! g6 [( w: c5 w
                Status.deleteObject;& F6 x* S9 Y) T' _
        end;
& y1 ^2 L4 X6 t) q+ [$ Z* \6 K5 N' E        for i:=1 to 10 loop* H6 m1 d: h' n1 G  T5 w
                Res:=sprint("Store_",i);
+ B) f4 s, _4 }# s8 @+ q                if existsObject(Res) then5 ^. e- F) t) D6 k  Y' Q5 Y, O
                        Obj:=str_to_obj(Res);: T4 ]2 }$ W/ Y+ H
                        Obj.deleteObject;
6 z: |9 O2 Y7 U- Q# b                end;
; j' b- [5 U  l; P7 ?& i; ^        next;
; k* I7 T8 A* H5 Q) J+ {# |! J        --shengcheng Status:zimoxingceng" T9 u8 V0 g4 \
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
  u  l0 I1 m+ Y        Obj.Label:="warehouse status";( L$ D! x$ p$ ]$ f
       
+ ~! J7 U+ _. a' W, w8 z* R& _        for i:=1 to WH_nums loop
/ o4 V7 p" y; N8 M1 G. j2 Y: ^' ?+ w                Res:=sprint("Store_",i);# ?9 |* z, J) d
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
0 n* x$ _" }3 Y0 `& r+ J                Obj.Label:=sprint("huojiaceng:",i);
% }2 E: B* c. ~$ |" D* T, |% `9 Z                Obj.xDim:=WH_x;
$ l( e# n0 G- I# a                Obj.yDim:=WH_y;
# [4 p+ L. k7 [                Res:=sprint("StoreData_",i);
; W4 \. J1 s/ W                & }7 K, M) x4 l; ^
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);5 q) `" L& {8 i) v
                Obj.Label:=sprint("huojiaceng:",i);
/ w1 G- i$ T. V2 v2 R                Obj.inheritFormat:=false;- y, G2 t) F4 u3 c: r8 Y0 N
                Obj.maxxDim:=WH_x;7 w8 w* r4 _' [5 J7 _3 m! B
                Obj.maxyDim:=WH_y;
( t3 V& s0 f/ l. f, u                Obj.ColumnWidth:=3;- k3 W; S3 W# u) n+ J. d
        next;
+ `" J/ o7 L6 o       
" h8 F6 F2 O! P        .Delivery.MUs.Forklift.speed:=2;) h) [& E  v% \6 ?
        WH_var.delete({1,Part_Nums+1}..{*,*});. Z1 W% j, a: a$ a- Y1 E
        for i:=1 to Part_Nums loop% d8 c) g2 e4 ]/ r9 O  H  k
                WH_var[1,i]:=chr(64+i);
( ]. _$ E1 M# p) V3 f* A" [        next;
$ V9 O, t& Z$ Z, k% jend;
3 y/ |/ L4 [: S# q3 J" F  Q( S出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
; w' ~' g+ O. S8 C, x9 |8 h, W+ M, l, }

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2025-9-14 10:39 , Processed in 0.017379 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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