|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
* C- o$ t2 K4 P7 S( s语句是这样的8 g7 q+ R4 ^6 W, P# p8 g- h H( S) K( A
is/ W+ M' p3 B5 ~+ R; {$ _- o
i:integer;1 R% e+ {9 [* V5 l! D& [* K
Res:string;1 m" J1 o/ M4 d9 R( S* ]
obj:object;. J3 K8 Q& e# b5 u: d: I8 Q
do: l' w. F6 X' _6 _8 L: n0 {3 e
if existsObject("Status") then
1 t' ]% w- S% w3 H7 T+ \7 I( ` Status.deleteObject;
# s: J# l3 }0 Y! w+ O# T end;' I4 _9 T2 I" K [$ [
for i:=1 to 10 loop
- f. J8 Q% J* j9 r5 G Res:=sprint("Store_",i);
4 `2 l* F! x' V. }. S if existsObject(Res) then$ d% V% L7 m# A6 k, ]
Obj:=str_to_obj(Res);
3 }/ {2 Q6 F( S) i Obj.deleteObject;
) c0 z( w6 G/ k, ~4 P8 n end;9 v4 J2 X% P% `8 ?+ A& ^
next;( B. A1 [$ N( E2 K4 j; B% G0 U
--shengcheng Status:zimoxingceng! [% J/ y. U: k1 l4 m
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
! E- }$ q& k2 ]# F Obj.Label:="warehouse status";& b+ e, w$ ]4 M( G5 q
" ]2 r* b2 @" t' B Q$ a7 y; V# R
for i:=1 to WH_nums loop
4 d b4 D9 U3 P/ t- b+ ]. i Res:=sprint("Store_",i);- D/ _3 d; c9 p0 n! h' |
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
3 d$ I+ @# M: c# L Obj.Label:=sprint("huojiaceng:",i);
/ `5 w; j+ d4 d- J Obj.xDim:=WH_x;2 O4 Y/ X6 _5 p5 U# P
Obj.yDim:=WH_y;5 S/ S) Z; y7 J) b
Res:=sprint("StoreData_",i);) f, K+ q8 n6 p9 y/ T
' j( r! k0 } u/ p5 z3 m
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
$ [3 I% k* s7 e+ i( d! I0 E V Obj.Label:=sprint("huojiaceng:",i);
" M/ K9 l! Z/ _ }; J Obj.inheritFormat:=false;
% j6 v) M- ^5 q; c Obj.maxxDim:=WH_x;, R* Z1 A( |# K
Obj.maxyDim:=WH_y;
7 o7 U% G; j6 R' T7 M Obj.ColumnWidth:=3;
* @' y% R0 k* K) x z, P9 U( I next;0 z1 v+ Z2 @" w% T: e2 P, A* X
" R; f/ ^+ H h
.Delivery.MUs.Forklift.speed:=2;, j' v; G+ R3 N8 i! K: V( x; d
WH_var.delete({1,Part_Nums+1}..{*,*});" c2 V7 B' @! }3 F, j
for i:=1 to Part_Nums loop- w0 s, V4 z- i% z, o% }
WH_var[1,i]:=chr(64+i);7 m- k# X4 c2 s! a" }3 a
next;
" \$ V* N' P; m5 B' p3 |7 G! Kend;
A, N' @6 t( E6 x, m6 q$ a出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 : l+ E3 w& q& D
7 t( _3 a4 o+ [* O
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|