|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
# X# c8 l; g" q" B/ ]% Y语句是这样的
8 {1 W c! v9 F! Y& l, Y: Iis
# a; q `; T- ^- f5 D4 ? i:integer;$ C z. \4 c: @* E& N3 w* ?: ~- t
Res:string;
* S6 p# D6 _: l% |8 b" U obj:object;' b! L s* d6 P6 y4 T" Q
do
9 s8 e0 ^' o" M3 I2 E3 V* b if existsObject("Status") then
2 G0 {4 _( ^2 ~) S1 W- R1 P Status.deleteObject;
8 i2 A8 X9 l W end;
; h; c) c, ?+ B0 @6 y for i:=1 to 10 loop
2 V% S1 r5 {4 T: ^/ R Res:=sprint("Store_",i);) X+ _8 |& a" W6 D; C
if existsObject(Res) then$ V5 V% a% }) w8 y- ^
Obj:=str_to_obj(Res);
: h$ W9 y" G" _; G Obj.deleteObject;
$ I0 h( {$ b' B( S$ U' y. _ end;: b O- t G5 {! y- c: u, O( }
next;+ W- R# ]" o, p3 J" b
--shengcheng Status:zimoxingceng% |, j, l6 S4 w7 P3 T
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");0 }& l9 g+ J; c, B: {% Q
Obj.Label:="warehouse status";# E0 ]9 H; M q, {4 ]
" q8 s7 D" K' J+ R
for i:=1 to WH_nums loop
$ S% l0 O; y# I" w) l: S2 d# o Res:=sprint("Store_",i);
9 K( C4 h5 L2 X" a; v1 d2 a Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);. \ W1 R" p! Q) r0 ~, b
Obj.Label:=sprint("huojiaceng:",i);, P/ d. S0 P1 b* O3 J f( A Y* F; t
Obj.xDim:=WH_x;" ]- [/ X* H3 A
Obj.yDim:=WH_y;( d! W0 z1 B) C3 y/ |
Res:=sprint("StoreData_",i);
$ [1 l) Y! `- G0 S" g( x! c & b! D8 B# {; N. X
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);1 m6 |% {% `1 W; g C9 U3 ?
Obj.Label:=sprint("huojiaceng:",i);
3 \% c, T, T3 Q+ a6 {: |- @, E Obj.inheritFormat:=false;9 J! Q- }! h1 |
Obj.maxxDim:=WH_x;) Z9 J% i4 U1 V, x6 ~' u
Obj.maxyDim:=WH_y;
7 f. s9 B# w$ r8 R Obj.ColumnWidth:=3;
7 H" E4 M2 ?3 E( G! g0 Y7 J next; a' f* Y$ Y: u& b: V& b/ a
8 o! ~/ {2 R* J* c: H* e$ S$ k
.Delivery.MUs.Forklift.speed:=2;5 J& y( t1 G; ^7 o5 E
WH_var.delete({1,Part_Nums+1}..{*,*});" d' E D4 r) X9 }
for i:=1 to Part_Nums loop6 x; g1 P% P) R0 ?: Z
WH_var[1,i]:=chr(64+i);+ N% d+ p7 b7 _* k! [! G
next;6 {: L7 X2 u2 N! |7 K! R# H0 y
end;1 k4 h* n8 E0 K' X# O
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
4 G% J' \4 v5 W5 [2 C4 ~5 H# D
4 e+ F) u0 f# L6 E. K% {2 b7 y* q |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|