|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。9 e' S5 F; C$ G0 @
语句是这样的 H9 z) i. r8 x# U" j& m' H- O& i/ _$ J
is3 c* T4 a' F: E N
i:integer;
) Y" S$ }) p- g6 }8 J9 y3 k Res:string;) E" W* ?+ S4 j# t0 O
obj:object;
( u+ W+ i) q0 J5 k- Mdo6 }0 B. F. u/ L- ^% P
if existsObject("Status") then
1 W7 s3 y/ I/ _/ \9 z Status.deleteObject;
( A- N6 M" k7 |4 ? end;
0 }: G. p8 N0 i7 z4 R for i:=1 to 10 loop+ F) r- N; s0 D' E$ J( }# v
Res:=sprint("Store_",i);
5 y2 A# @7 K3 K T! P, z- H/ y if existsObject(Res) then# `, Y$ b# u7 G9 t% G! j/ M
Obj:=str_to_obj(Res);9 P: i$ o! |- l/ N
Obj.deleteObject;
. q0 \- [4 x) a* Y0 Z end;
, ]! ~7 C; g. y9 p: d" e2 G h next;" e' W( H: R1 d+ }) ~# z3 a
--shengcheng Status:zimoxingceng
& |$ S7 ^7 ?) w+ J" ~' D: f Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
0 A2 i8 o6 J# |$ X* Y1 _8 u Obj.Label:="warehouse status";
$ ?8 Y$ {9 a" s: G
! f, K0 G, G5 K; ~3 V# D- [2 R for i:=1 to WH_nums loop @+ w! q1 c# _, r3 g# B5 [
Res:=sprint("Store_",i);$ d& @! K j+ U6 H" Z
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
* @3 L8 u M/ c7 U Obj.Label:=sprint("huojiaceng:",i);% {2 {0 I3 R( N% _; R: e0 G
Obj.xDim:=WH_x;, X3 m D7 N. j% u8 ]6 a
Obj.yDim:=WH_y;1 m- L5 u; b0 B( C
Res:=sprint("StoreData_",i);
+ p1 y- _! V0 K/ q3 T# {8 \- D* v. \) t
: s a" b0 Q8 x% _* }' n7 F Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);. t. N g, L7 T! G+ S: g1 V
Obj.Label:=sprint("huojiaceng:",i);
6 z M6 t: h# b Obj.inheritFormat:=false;& m) a+ b& \+ E+ P5 c) `# O
Obj.maxxDim:=WH_x;
/ H2 `) z# J+ U Obj.maxyDim:=WH_y;, n* R+ z7 }! |2 ^
Obj.ColumnWidth:=3;" T0 Q" w' g! h5 A7 @; c' }7 B
next;
2 S1 I, M+ l: b3 t
! W; K, n/ C, J# E7 b; A0 G .Delivery.MUs.Forklift.speed:=2;) t) s; {* R8 E4 R6 t% j ^( W
WH_var.delete({1,Part_Nums+1}..{*,*});
* m) y _. T+ }" E+ ^* D& ? for i:=1 to Part_Nums loop
7 a7 B. y( c5 r WH_var[1,i]:=chr(64+i);. J7 u8 W" r3 {; E5 @
next;
+ `) l! ]$ V) |8 H; x) B4 tend;
6 [- w1 [3 ~5 n. D5 r4 s出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 " R4 `. v. ], `7 q9 i
1 J; @/ j1 O, O- u
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|