|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。% N& Z0 L3 r; x1 ^6 W( ]( g
语句是这样的
I/ G0 `: b- R( @8 b4 fis
6 y! M8 s$ w# T+ _4 G1 D i:integer;
) \+ E, {; E4 E: S8 r G/ p$ d Res:string;
# A8 u8 H" C0 P( } obj:object;& R! g/ W/ {3 v: y/ D3 o: z
do
' G/ v: e; ?. P% [" m! o( K1 { if existsObject("Status") then: m1 t7 L! s, l# l
Status.deleteObject;8 `. ?. g# s' c' x2 f
end;
& A7 Q; E8 O2 W9 q, f- v0 @3 _ for i:=1 to 10 loop- w c6 b: l! e. x6 Y
Res:=sprint("Store_",i);
6 c: a( Q: k# ^. g8 ? if existsObject(Res) then/ W9 K3 K! q% w9 M1 s( ?) t; G
Obj:=str_to_obj(Res);
2 I! D$ ]2 F# J9 b" U Obj.deleteObject;- z% I- M* G- r$ c/ g, t/ G
end;" e! H6 ^ L( \# O; L
next;& ~ B3 g1 G1 E. u3 ^' \) S
--shengcheng Status:zimoxingceng- J8 z) n: S3 t; ^8 j# ~
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");+ s- k5 a6 \; ]: q* r" r7 T5 ]
Obj.Label:="warehouse status";: {! @, `3 p7 r5 f- y5 a
6 I: I! D8 X X/ C7 r& [) @. m for i:=1 to WH_nums loop
2 x% ?( h. |! o3 W6 } Res:=sprint("Store_",i);
/ S0 o" y" u8 w+ T4 ?# H Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
& ]! k- b5 n6 X( O* C1 i Obj.Label:=sprint("huojiaceng:",i);
- m( q0 @ f; X# u Obj.xDim:=WH_x;
2 Y9 I/ g$ Y g& `, D# P5 u Obj.yDim:=WH_y;! P4 O1 w [( n f
Res:=sprint("StoreData_",i);3 r' Q: Z2 U* K9 f' J o o
2 ^4 a$ ^5 D9 U, g* a) \ C
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);. Z( T- x3 r. N" g1 m7 U/ ~( r
Obj.Label:=sprint("huojiaceng:",i);
' x# t9 v! w6 }" m7 N- H' r Obj.inheritFormat:=false;
P" x- I' N- `* Z) f. E/ }/ U Obj.maxxDim:=WH_x;3 d! U+ |% X+ |) x* Q. n
Obj.maxyDim:=WH_y;
% R+ ^+ T) P3 x ~- i* ]* g Obj.ColumnWidth:=3;
9 Q, E: R1 M% b6 g( e next;
% [2 y, J6 [% `9 P + r$ K8 h* ^0 S, l4 s' o# D, @. j6 l
.Delivery.MUs.Forklift.speed:=2;
0 r) k- [" m* I2 P/ D: u WH_var.delete({1,Part_Nums+1}..{*,*});
1 t5 O( R+ D. z( w for i:=1 to Part_Nums loop( R& G3 p( Y5 m' x/ I/ P* O3 j
WH_var[1,i]:=chr(64+i);8 I- Z. e& m; R- w
next;
6 q! |- w" n- w4 nend;
/ r% x$ s5 x9 x" w出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
) X* x' L% P4 c6 I! x' q/ W/ l9 G7 D" B8 ^" w! u+ \
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|