|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。# v9 J ~+ b6 R) i* Y
语句是这样的+ U# r: t" O) K' L @$ w
is
- |" Q2 ?8 _% s5 ~ i:integer;
/ g( @, [* @( j! M Res:string;. f) y% t! u* q2 Y, c/ ]- b
obj:object;4 w; g2 D7 @0 P! @3 j6 S- x/ U- V
do
y8 B. ?9 U1 O6 O9 r if existsObject("Status") then% O% y) G$ a! F. h( t( f9 Z% [
Status.deleteObject;
5 w2 {2 P# K; R8 Y5 b; E$ l end;
# S) B% g* u$ X+ l# W* a/ y1 }; M for i:=1 to 10 loop
0 H( ?& T3 |% u8 e Res:=sprint("Store_",i); ]+ v3 O7 ~0 T. R4 P
if existsObject(Res) then
% J0 H" R& L6 f, ^# T0 a% S Obj:=str_to_obj(Res);- S3 F* P3 E- w- C" t
Obj.deleteObject;
4 G! U- L; o4 P" f& g# K. [ end;8 K2 ?9 j' s! ]8 U( C
next;/ G9 m4 E0 O0 D7 j% M
--shengcheng Status:zimoxingceng( H; q9 X1 e* e5 \: o: P0 |
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
. t* u7 B8 m/ Y# Z C6 { Obj.Label:="warehouse status";
& S# w$ N! Z" r0 N( J4 V. o
5 f; k9 B6 ^- L/ k! Z1 E6 l4 z7 L: \ for i:=1 to WH_nums loop2 R' I( t. ~+ T* k* |7 a
Res:=sprint("Store_",i);! ]0 J/ q# H' N2 V6 ~
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);" n D+ K2 E3 {4 K, P0 p
Obj.Label:=sprint("huojiaceng:",i);
/ t( j4 n1 v5 ]% a8 _, w0 H P Obj.xDim:=WH_x;: \. Q# R7 L- {' K% F% H( X& o
Obj.yDim:=WH_y;
1 d2 M9 t. ]' K2 f8 s Res:=sprint("StoreData_",i);
4 o$ B8 p1 c* W) C6 n$ c
7 D, T0 \" q; @. M3 {% X0 Y Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
" N1 o2 `6 J2 h. H) w( x. F7 q Obj.Label:=sprint("huojiaceng:",i);1 ~2 Z r3 Q$ ?6 c
Obj.inheritFormat:=false;
! b9 B- D2 l5 a Obj.maxxDim:=WH_x;0 a5 v4 ~- p! n
Obj.maxyDim:=WH_y;
1 q1 [0 N& Z& k* z G: C# P( v Obj.ColumnWidth:=3;# g6 r) r% h: H( v- a* _3 @$ c
next; a2 v' _1 t: }0 i s' T
! P0 w. R M" E' b* }! w .Delivery.MUs.Forklift.speed:=2;1 P. O. g8 S, ~3 O' {! s
WH_var.delete({1,Part_Nums+1}..{*,*});
6 A9 {$ K# N+ x for i:=1 to Part_Nums loop! \2 @* c- @ S
WH_var[1,i]:=chr(64+i);
! f- i$ x0 ]( q0 s5 H' \ next;
! D7 H! n, t+ d8 b7 @5 dend;" H% |! R. G- O$ G8 T( ]3 W8 I @. ?
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
$ }' l6 i: I3 f
_" q6 u; q. x/ S4 q, i! j. |( v' F |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|