设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3908|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。$ L# \; {9 c6 W' b/ b: }
语句是这样的2 L( H- u/ S6 ]6 s! o( K- t' k8 x
is/ t; a1 G  f5 o
        i:integer;' S% b, @2 S: A4 {' j
        Res:string;
9 k: |" v1 E7 Q* u5 P" D+ t5 j7 _0 l        obj:object;
- Q3 w; x) w: [. k2 v& V8 ~  ?' pdo% m6 _6 n% f6 N1 _
        if existsObject("Status") then+ [; k9 m' g% c" X6 M
                Status.deleteObject;' B, Y5 @' p/ e
        end;) t2 S$ R4 z1 H' d2 I
        for i:=1 to 10 loop
: }) N" l- b; l& R: s                Res:=sprint("Store_",i);0 k9 w, L: T" l$ M& K# P% {) F& L
                if existsObject(Res) then
8 }) w  x$ |3 K* x& L* A+ h                        Obj:=str_to_obj(Res);; U+ H/ G0 I# ?' C2 K! B: I
                        Obj.deleteObject;
, {0 v7 c, }% \) j' l: h( Z5 ^                end;
2 h0 {- J0 N/ ]% B        next;; l/ A5 f, N7 p3 O1 D
        --shengcheng Status:zimoxingceng
9 ^. o+ K1 z+ k        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");7 s2 h* G6 Q  Z
        Obj.Label:="warehouse status";
- D- W" ?, A( k+ V" a) c        1 p+ B( a6 M* M$ g6 s+ A" ]
        for i:=1 to WH_nums loop) b5 g) r# Y9 k% U0 m, N
                Res:=sprint("Store_",i);/ c0 ^3 y1 J1 G3 u) {
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);: _! A) {4 S2 E  {* B9 o
                Obj.Label:=sprint("huojiaceng:",i);
' K$ Z3 j  w7 p6 X; I                Obj.xDim:=WH_x;: f" ~: y4 l! ^( h2 u* r9 i" x; N- z
                Obj.yDim:=WH_y;
' ~- r( i2 O3 R0 Q/ U                Res:=sprint("StoreData_",i);
* P) v- B$ P  j0 K' S8 n5 J                2 n# O. O; O# J, L/ z
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);: J3 M2 `. B4 i$ ~& S5 V
                Obj.Label:=sprint("huojiaceng:",i);
& ~+ P" r3 _* b" t! @4 a  X                Obj.inheritFormat:=false;
8 Q' A" C8 d% ?( z- Y2 ]7 t                Obj.maxxDim:=WH_x;5 J% e& v3 h4 z3 ?
                Obj.maxyDim:=WH_y;
6 H* p/ @' U- n                Obj.ColumnWidth:=3;, o, l. z$ Y3 {4 {. L+ r
        next;
' Z5 v) d  r* T        ; P/ S% D  ]( a
        .Delivery.MUs.Forklift.speed:=2;
( T  u7 L" a" `4 p. G) S) f        WH_var.delete({1,Part_Nums+1}..{*,*});
, E/ G+ {$ K+ z3 _; d4 o' q( s        for i:=1 to Part_Nums loop# x% ~8 ]; O4 f
                WH_var[1,i]:=chr(64+i);9 E6 \- U2 a' y# H4 H8 {
        next;- [* b' V# ?1 D* m- ^( w# u
end;
) k' M# a) y, T7 n2 p出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了) X! Y2 B3 @! j# i3 U

5 t, q$ b* X; C& `( Q$ D

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-5-13 07:38 , Processed in 0.017972 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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