设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4096|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。3 E5 N" G9 l; ]" X. k" z
语句是这样的  X4 `2 O: C; L( l& y* t( K/ `. A- w/ m
is$ Q( G- y0 V- D" D/ f! O+ u
        i:integer;
" ?$ ]3 P1 h0 [# p* ^% p        Res:string;2 O% c' [1 Q: ^# U
        obj:object;. w- p: S' ~( ]
do- B7 U* K' l2 l7 J- B: D% U
        if existsObject("Status") then
0 Z7 M) B8 y. \7 ~( }( B) y- ~                Status.deleteObject;' d' V& H0 h' [' O4 v
        end;
+ L3 Q- s+ A- c6 I3 e        for i:=1 to 10 loop4 F; n, s7 {6 c. u3 l  A4 H8 V
                Res:=sprint("Store_",i);
, ?) b0 q/ A" j( T% r# W                if existsObject(Res) then
* K; `: V2 s/ T8 g9 }2 r                        Obj:=str_to_obj(Res);
8 o& I8 b4 |$ m: M! D% P                        Obj.deleteObject;
3 v3 b# u. J/ G' H, r, V                end;
& P/ {) _; E5 F        next;7 q0 `: Q3 ]! @
        --shengcheng Status:zimoxingceng# m% S- u5 ?' z3 b% L, q9 D  T
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");9 x  v+ Z# I# Z% c- T
        Obj.Label:="warehouse status";
, u/ G2 A' k0 k% Q5 Y       
3 A& G4 p; z: D3 n7 A: _5 A. J        for i:=1 to WH_nums loop
) w8 M& {! v& U/ |/ r7 n                Res:=sprint("Store_",i);
3 P- S9 e+ r: V! ?# \                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);, L- y: t( X' q* d. H! A
                Obj.Label:=sprint("huojiaceng:",i);
- t5 E- k' ?7 z% \, q                Obj.xDim:=WH_x;/ t7 g0 q" `  d
                Obj.yDim:=WH_y;
2 `. ]. t# ~& ~                Res:=sprint("StoreData_",i);( b3 p2 q) B. M8 |% h( t3 U+ t% b
                - E9 u* C" u: W  |" e4 W0 n
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
- [; j  F; w/ d! p, `; E3 V                Obj.Label:=sprint("huojiaceng:",i);
( q8 _! V. d) ?                Obj.inheritFormat:=false;
' M' z% y3 s" O# n) y                Obj.maxxDim:=WH_x;+ q( H: k. R( e9 b" K2 t0 U  b
                Obj.maxyDim:=WH_y;
- \) g( ~! O. S' f                Obj.ColumnWidth:=3;+ ~$ q1 m; A- e/ @' z5 l
        next;+ Z* D$ z/ l: o7 K
       
# E  d% V) ~. E9 Q( L' b$ _        .Delivery.MUs.Forklift.speed:=2;
3 Q; _0 G4 n; T2 t$ p        WH_var.delete({1,Part_Nums+1}..{*,*});
3 Z4 D6 M. g8 u( b( N        for i:=1 to Part_Nums loop/ |$ n1 G+ M! _! ?* P& V7 `
                WH_var[1,i]:=chr(64+i);
8 V* C6 f; Q$ s! O, H" s        next;
% _9 i2 H) q6 g8 cend;" ?  {; [% L6 v. P; e
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
: R# U1 f& T4 T3 `9 O9 L5 `$ X! A! k3 v1 b
" `- g8 ~8 K0 R/ {

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-6-19 05:14 , Processed in 0.017501 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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