设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3289|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
# }7 q1 f: g1 I9 n, ?6 y语句是这样的5 \8 R! A9 ?/ v
is' p7 l- @( H) U( }9 `: M3 M5 h% ?
        i:integer;
. @- n6 a2 T# [9 z        Res:string;4 @$ h5 O5 e( ^% D/ B3 n3 D1 h
        obj:object;
9 y. d& [( Y$ T# ?do
8 j  F) e5 b9 C3 T% X$ U! y# c        if existsObject("Status") then
2 y- g! P( E* j5 |                Status.deleteObject;
0 W0 X8 S* V( i( y# q+ F        end;5 s  c+ ^  J" }' i: Z: j. h
        for i:=1 to 10 loop
3 v/ Z' v+ @) s4 S9 V. [                Res:=sprint("Store_",i);( V, N, l+ M% \8 V
                if existsObject(Res) then
; {7 ?4 }% U0 C                        Obj:=str_to_obj(Res);. J% i% y/ s7 z( @  ^1 N5 l
                        Obj.deleteObject;2 t2 ~& L" m9 Z
                end;% c6 c; _9 V6 P
        next;- |+ y; P1 y9 ^! Y/ r/ ~+ f
        --shengcheng Status:zimoxingceng2 e; F2 S0 D8 e5 W: u
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
8 N0 }) S8 Y# F' ]! _% u        Obj.Label:="warehouse status";+ n1 q  e& e" ?4 Z  Q3 Q
        , x8 j  p5 T8 D% J" M; e
        for i:=1 to WH_nums loop/ T: N7 @- o+ Y  `: B8 L: v8 B% r9 o4 ?
                Res:=sprint("Store_",i);9 p  o/ g8 `) L
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
) x4 ]  }6 d( X: v) A% p                Obj.Label:=sprint("huojiaceng:",i);
# W: |! \$ {" o* Q* y. G/ k6 a                Obj.xDim:=WH_x;
3 q  w% }+ q" T  t( q+ E. t1 t0 k                Obj.yDim:=WH_y;
, X( C! ]/ `( I3 Z: y8 l+ ?( g                Res:=sprint("StoreData_",i);- K0 j, d6 i7 F' C( a# j, m) I5 H
                ; e* i+ y0 a0 C6 B- B  _" g! w
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
+ k/ B; v) r! d                Obj.Label:=sprint("huojiaceng:",i);, i" Q. D5 q; @* O9 |
                Obj.inheritFormat:=false;0 q6 U+ c+ ^1 n$ s
                Obj.maxxDim:=WH_x;0 U/ \$ W8 S) ?: b: o! [
                Obj.maxyDim:=WH_y;
6 g- f' @4 {3 U4 E                Obj.ColumnWidth:=3;
9 Z* ]9 P2 {6 o" a' d- r2 \$ Z        next;' ^: L* Y) R5 z! i2 e) M
        " p( g- s2 g8 o& f
        .Delivery.MUs.Forklift.speed:=2;
1 }9 q1 y3 W& j) l. R3 N6 _) B5 e        WH_var.delete({1,Part_Nums+1}..{*,*});
( l" {3 x. u. q$ w        for i:=1 to Part_Nums loop
5 X3 K0 X3 o+ n' P                WH_var[1,i]:=chr(64+i);
7 A2 w4 m" i* x( `" a8 ]7 x& A9 G        next;& n; u0 K# j4 I2 n
end;7 {- b, e7 J$ k* o
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了5 v+ ?! H! j/ n$ i- i$ _
5 n3 v! f% S* V, }, k: ~  ?3 E

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-2-1 22:50 , Processed in 0.020517 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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