设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3218|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。9 o) v  J7 @+ c0 \  e- F4 `
语句是这样的. l% _# j( X7 A$ R1 x
is5 ]: n/ |/ x# D8 ]" m+ J+ N. y
        i:integer;  ^+ i. ]/ y4 J* Z$ M( k$ m
        Res:string;
) o8 L; M" h' M$ W. ]& R9 s( b        obj:object;
+ N- q- C' q# O! bdo
! A" d2 W. T6 U2 l. K# h        if existsObject("Status") then
$ }" ]' K8 G! U                Status.deleteObject;
* b; t3 n( F- W1 M7 K        end;9 Y$ n, c: c- m8 }. q7 L6 W1 P8 d: {
        for i:=1 to 10 loop
# }3 n) m' f" D. O' Q% q                Res:=sprint("Store_",i);5 s+ }( U* @+ P% `' i/ M
                if existsObject(Res) then  O* h  @4 o! W* ~
                        Obj:=str_to_obj(Res);
" W: m: j/ ?; c) v& M5 Y4 l6 _% L                        Obj.deleteObject;. O, h. F' q% q
                end;
$ B2 k0 y! e5 Z. ~% F+ a2 c! `4 O        next;- r, B3 x9 r9 e) r* E. M1 H. n
        --shengcheng Status:zimoxingceng
1 s* `' _1 w9 p5 L2 G3 G        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
$ R2 Y# X; r" ]) }- g, N' T        Obj.Label:="warehouse status";
/ G7 D6 ^! {) U/ f        9 {1 B4 _! U7 H0 d& j
        for i:=1 to WH_nums loop, |6 T4 [5 w0 `3 V( l# y1 {
                Res:=sprint("Store_",i);
' B4 x2 s4 R1 U) \# u( \1 u. l                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);$ \0 _6 w* N% J5 T0 H
                Obj.Label:=sprint("huojiaceng:",i);) W  b! B, V  d7 B
                Obj.xDim:=WH_x;
( S% ]4 w( A9 a2 n% q6 `( m5 _                Obj.yDim:=WH_y;
7 {# G5 D+ a7 j$ {& U                Res:=sprint("StoreData_",i);
9 @6 j7 O. ^9 _. ^2 l               
) U3 V( n- n, H* O0 M0 [                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);8 {, t7 t% a9 ~  e: s# i) x+ u, N
                Obj.Label:=sprint("huojiaceng:",i);: l- u6 k3 B1 l  x  V
                Obj.inheritFormat:=false;: ]1 P! m3 T4 z# S4 _9 r) i7 B
                Obj.maxxDim:=WH_x;
9 }! g: j% S% u# M                Obj.maxyDim:=WH_y;4 f( Y( M  o& f* F7 O
                Obj.ColumnWidth:=3;9 a7 O( b6 t6 G
        next;3 C/ P. @: `/ C$ x& B* V
        * q. f( M! V4 P6 W- s, u8 n( C, M
        .Delivery.MUs.Forklift.speed:=2;  k; W+ h8 Z7 D* n, X4 t
        WH_var.delete({1,Part_Nums+1}..{*,*});4 w0 K6 e/ M, z) B: D: i
        for i:=1 to Part_Nums loop
6 }1 M! U% O# M* C                WH_var[1,i]:=chr(64+i);, m3 l4 H; N, v
        next;, V& l& M" f* L7 _% a/ t( y. W
end;
3 ?+ X, l6 X! X7 I出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了7 \( ]7 i  H% D" L/ A6 u$ Y
- D* ?0 a+ R) e! C; c  q

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-1-21 09:40 , Processed in 0.018439 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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