设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3209|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
" ~$ M& J" x! F( K8 s) h; `语句是这样的$ A+ m7 d( A8 A" X6 G% y
is
, ^7 h$ ~+ F" }' i1 B        i:integer;
( p' D. K& ^7 Q+ X        Res:string;
: X( X: e" m- F# q* p  n1 ]        obj:object;/ ~5 Q2 X( r, n
do
1 A# x; h1 I" F6 }! y' ^  O        if existsObject("Status") then# w# }; _' d5 a" S7 x1 j1 j
                Status.deleteObject;! l, Y* m2 P* }% y# w
        end;6 c7 q2 r5 @) L. ]
        for i:=1 to 10 loop
. ]1 I( _5 Q9 i3 B/ _                Res:=sprint("Store_",i);7 G( }0 A, \) ?. r# t5 m
                if existsObject(Res) then
! @4 K* h, C' x% N. @. ~* p8 D                        Obj:=str_to_obj(Res);
& p* g% h3 T+ R- y: f0 h- W4 v) P, G                        Obj.deleteObject;
! g( ?  l/ U! }. |) Z& \# E                end;
" {0 v+ U; B: T( m5 |        next;
" _: H2 ]: c! w0 c1 h" E) {4 f        --shengcheng Status:zimoxingceng
# {! H0 `: \' d" H( H7 A% w        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");1 H& x% o8 q( z" z1 F: P1 k
        Obj.Label:="warehouse status";
; O5 G. [- a+ |% N        ) Z. J! F: Y4 G' f/ g
        for i:=1 to WH_nums loop/ \/ v3 [3 {; Z, ~
                Res:=sprint("Store_",i);
7 m4 N  F& u! t6 H! K                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);# ?; {% Q7 p1 u. q2 t4 s3 V, V
                Obj.Label:=sprint("huojiaceng:",i);0 q- \1 y! n/ h' N; _) O
                Obj.xDim:=WH_x;
/ m  C5 d  a3 G& L                Obj.yDim:=WH_y;
; d$ }7 e. N$ T$ ]4 W                Res:=sprint("StoreData_",i);
% j( q' }4 ]  }$ F                ) ~4 n4 @+ n* K- E2 ~" o' D% Y3 r
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);4 l6 j0 Z7 D0 O- L9 q+ l
                Obj.Label:=sprint("huojiaceng:",i);
- t( A8 A7 m% H% j2 ^/ f                Obj.inheritFormat:=false;
+ }* {1 {* F3 ^2 l: a6 L" E                Obj.maxxDim:=WH_x;
; Y' n0 u9 @- c% S  B' A                Obj.maxyDim:=WH_y;
0 o' A- G& L  H  i/ ?                Obj.ColumnWidth:=3;
* ~& R' D0 z* G4 `' ~, X  s        next;1 F. R& [& t! l7 R7 @( c5 Z0 K
       
! B+ I( V3 Y# Q" X4 C8 z- h        .Delivery.MUs.Forklift.speed:=2;
3 P8 u* E* L/ L% H        WH_var.delete({1,Part_Nums+1}..{*,*});
2 C1 E; I) O5 ^9 Z) `4 e        for i:=1 to Part_Nums loop
! A5 O! G) c% r                WH_var[1,i]:=chr(64+i);: b0 M# n  C5 \, s6 U
        next;: W6 K1 c3 P& d; @% i
end;% b$ d! W1 ~, D/ t5 Q
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了. x, m2 Y* o# G5 l2 q' Z4 s' i
# b0 {5 k' y- N9 F3 e( C

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-1-20 07:43 , Processed in 0.023011 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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