设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4001|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
" Y; C6 ]* v! q# h: ?* R2 S语句是这样的
" Y$ `; f% Q  X  ^3 Tis3 H& c8 }4 ?+ q+ {( b3 a/ ?
        i:integer;5 z$ x1 T% u+ K- S
        Res:string;, ^* C% D& Y5 `; ]8 I9 D
        obj:object;) M8 C2 W9 B1 Q, T/ y
do
* L1 J, h7 p2 v/ r' H) ~        if existsObject("Status") then
, {. Q6 K$ c( E                Status.deleteObject;
' @, V) W% ?: l' S0 [: X        end;
5 n; Z0 |8 F" Z, S( j4 v$ Z; f        for i:=1 to 10 loop
6 p0 b1 @* C/ b, x/ ~                Res:=sprint("Store_",i);2 |  P; @, P+ ?
                if existsObject(Res) then4 E0 [. ^% n! e! }2 R) A0 z# o
                        Obj:=str_to_obj(Res);4 F" M3 P; t% ^- u' f, Q' Y
                        Obj.deleteObject;) u, }7 v2 B& Y* \) t
                end;
% Z" G4 ~& x+ t" P        next;) ^! G4 p- `# \: u7 c4 U/ ?: d8 g
        --shengcheng Status:zimoxingceng
. s% L0 u5 ?9 K: A# p9 \" F( i        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");% i1 Q- N4 |/ d& _: u9 r
        Obj.Label:="warehouse status";; n3 N* A/ v) z; H
       
$ w% C# B, t2 r9 Y* P# l        for i:=1 to WH_nums loop
$ x5 y$ Z$ E7 ?; s7 a                Res:=sprint("Store_",i);
  a" a2 }5 z' r# [1 Q' j- X; K                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);0 k3 q8 s9 [5 w% v
                Obj.Label:=sprint("huojiaceng:",i);; i; u; ]4 v6 [9 |' b
                Obj.xDim:=WH_x;8 O3 O# n: D* |. k0 t+ _6 n! b
                Obj.yDim:=WH_y;
# Z1 T/ L4 o( j( z8 B: N& b% o+ m                Res:=sprint("StoreData_",i);- @) R+ h7 N% _2 w5 t
               
  D; h$ C. ^) X) `) ^& f: Y; Y1 \                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);2 j# w: [9 @2 l  ^+ i
                Obj.Label:=sprint("huojiaceng:",i);
1 o# D- h+ X& q% P" m2 g0 W- c( I                Obj.inheritFormat:=false;
- s% U4 X6 s9 }' ]                Obj.maxxDim:=WH_x;
8 O" v' I+ Q: M7 S: b4 b                Obj.maxyDim:=WH_y;
/ k" d4 @- ]: M1 z6 ^! u                Obj.ColumnWidth:=3;
- F8 y/ e" P* Q. s. @        next;8 @/ j) b# n' Y4 j# l
          ?% X; [% a/ |6 i
        .Delivery.MUs.Forklift.speed:=2;
/ K4 s" a; A1 x: C% r) d9 N        WH_var.delete({1,Part_Nums+1}..{*,*});3 `  ]4 H% i% E
        for i:=1 to Part_Nums loop
$ ^8 E7 q9 ~- w2 z, ^                WH_var[1,i]:=chr(64+i);, U* _/ p. g' U9 T( d
        next;& Z2 ?  J4 Y' @$ m) ?2 e
end;
/ j; v% Z$ n8 M+ X0 S& ]* s出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
1 y: s5 b5 u* S+ G9 }/ i1 C
/ P% ?8 U. B, g6 W, o3 v

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-5-29 00:12 , Processed in 0.017165 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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