|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。/ E% S1 w. {. K2 t
语句是这样的: H6 c5 p: d) |0 v6 [; |: s; E
is
* F, F3 G* I9 |$ U0 J$ S i:integer;
& n" Z- d2 _& [7 g4 c Res:string;
5 G1 o$ s. R% C/ m% ? obj:object;0 S! S! M# ~+ E( W3 m: p7 P
do( S. c; M% L9 s$ d* }$ y4 I
if existsObject("Status") then
9 F6 \0 c6 @- U7 ?2 b, Z- s Status.deleteObject;& `* P% z9 {% k$ i: U* O
end;
% @7 y/ {- u2 N$ Q' ~/ h for i:=1 to 10 loop
+ S2 Y5 k' w4 Y' T; L* I3 g Res:=sprint("Store_",i);
! r) q9 l6 b) R) X if existsObject(Res) then
3 M3 {; P" W: V a0 ] Obj:=str_to_obj(Res);
3 ]3 c( L* y) }/ t Obj.deleteObject;/ t1 M6 I& T6 y; |
end;; ]/ X/ N* k; E" V3 A$ W) v/ V
next;
3 e9 u% r) ^% t --shengcheng Status:zimoxingceng, e8 U5 Z8 B6 h: c1 q
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");" |. x& F; [; b3 d+ e; l
Obj.Label:="warehouse status";! O/ L6 k! J8 v' a, S! ?/ h6 @& L
4 o1 ~. C! H6 |1 O0 s0 D# e for i:=1 to WH_nums loop) q# o! _, Z0 g: q
Res:=sprint("Store_",i);
; h6 z* J a! w6 R, U Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);$ g/ e# e# V: O3 X4 X8 |8 z( ]
Obj.Label:=sprint("huojiaceng:",i);
1 ?5 T9 M. q/ x1 S5 j, g Obj.xDim:=WH_x;; v7 i; G2 G4 r- M4 Q" k
Obj.yDim:=WH_y;6 c' ?& l. G0 A0 x6 M
Res:=sprint("StoreData_",i);
/ b, K" P7 e$ {
1 p) @% c* I7 _3 z Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);& B! F" q: z& Q# F" R
Obj.Label:=sprint("huojiaceng:",i);* O* w- ~: a6 p- }3 X! x
Obj.inheritFormat:=false;
+ F, V1 {4 Y D% b% v; a Obj.maxxDim:=WH_x;
. A3 P2 F6 `1 z# s& E$ K& Z Obj.maxyDim:=WH_y;3 Y. l& M1 u' l2 D& n# m+ j
Obj.ColumnWidth:=3;
; w3 r/ P( R+ ^1 X6 ~ next;8 C5 d- K% h3 O) \4 x% i5 n- n' a
8 ~2 l/ H, L6 V' Q7 h, `: u
.Delivery.MUs.Forklift.speed:=2;
6 k; T b/ P6 k, ]/ @ WH_var.delete({1,Part_Nums+1}..{*,*});$ J2 A% h8 z; b2 _
for i:=1 to Part_Nums loop. N( K- z5 U0 X; Y* o: [# e5 Q
WH_var[1,i]:=chr(64+i);$ f2 u# H& T3 J
next;- \: F3 z% j/ o; Q
end;
7 O& r: r# _& n, x. |出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 8 f a4 T I( _8 ^" R! t
' O8 [ d, y+ G9 @* r, H0 C1 |8 q
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|