设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3923|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。2 C5 ?7 h5 W0 \' T( c! J
语句是这样的
$ V3 U& W# w* L' Dis; s) f: X) o! N/ ?. k
        i:integer;  q9 @3 S1 d' X+ u$ v2 M
        Res:string;
$ u- k' Z& P# e3 Y9 ^, W        obj:object;6 h& K3 W$ t! r+ ^: _# l
do
8 a' e  Z3 ?# a, ^/ S/ Q$ w        if existsObject("Status") then- b* ~+ a  ^9 O) j9 M. _& }
                Status.deleteObject;' c- o. L# H/ |
        end;
0 k$ ?  f9 ~2 |! e- f' d+ ]7 U$ `        for i:=1 to 10 loop9 K9 ^5 z! W7 p* q5 d: S
                Res:=sprint("Store_",i);2 \6 n3 E3 t- \: }. _) k% k
                if existsObject(Res) then
, K( C% v3 K1 q                        Obj:=str_to_obj(Res);
2 t- S8 @* l5 }# P9 e! j                        Obj.deleteObject;
3 j1 s  l9 \- X9 P( y9 Q                end;- ?$ J5 ]: c  t3 ^. m  I" _# \& m
        next;8 |5 T# V- v# i  w2 V" U
        --shengcheng Status:zimoxingceng
$ [3 x1 B" v6 w  A& ?8 p: |        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");) {2 c! G! c2 o
        Obj.Label:="warehouse status";
, Z  o5 ~: O0 c  U        9 h) |9 A  K  H7 b& h( ~
        for i:=1 to WH_nums loop% j1 v' O1 l6 q) k
                Res:=sprint("Store_",i);
$ g5 M' Z, z5 ^) j' Z0 i2 z                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
! |/ ]* Z- `; E# f3 ^                Obj.Label:=sprint("huojiaceng:",i);
- H5 m9 z/ x- d/ j                Obj.xDim:=WH_x;
5 I) s& V6 E0 s                Obj.yDim:=WH_y;
+ b" g6 ^; L' h; A                Res:=sprint("StoreData_",i);$ J+ |# l1 W, W! `! o' J
               
! c# ?- q1 Q! c1 i                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);. M1 B, T! `' o
                Obj.Label:=sprint("huojiaceng:",i);3 F( ~. z: T/ Y! [4 e! I+ T+ e
                Obj.inheritFormat:=false;, ^' l% I  y& C9 S- i
                Obj.maxxDim:=WH_x;
$ x0 `) J* P0 w1 D- B9 P: t                Obj.maxyDim:=WH_y;
2 ~) W" a1 }# ?; D                Obj.ColumnWidth:=3;
9 Z! ]/ g# V' k# a7 h' b        next;2 L8 e! O" }* D# q
        7 D( R# }! }& f  ~  B5 Z
        .Delivery.MUs.Forklift.speed:=2;; M" U2 E  ]2 u/ N6 S- ^' J
        WH_var.delete({1,Part_Nums+1}..{*,*});4 X  a/ U0 n& n9 s" w
        for i:=1 to Part_Nums loop
' x0 g$ D& d7 m* [6 ~                WH_var[1,i]:=chr(64+i);. U: e' y0 D3 M- @+ c5 b" O
        next;
  u# Z& c% ?3 @+ n+ b$ j- _end;+ D& J2 ^  A4 X
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了& P4 \+ E, t# s5 ^8 D7 A
1 I6 C0 X) g8 M; O

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-5-15 16:30 , Processed in 0.036676 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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