|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。/ ~% M9 g: D! [) Z! Q, H# i
语句是这样的- ~+ G4 n }$ r8 E
is$ Y! i! Z- }" U- {! W8 e
i:integer;, O- L% ^& n, ?# k
Res:string;- W1 G9 E4 N/ W c7 c
obj:object;
# n' S5 I9 v0 D- [! Sdo4 G1 X2 | i& p
if existsObject("Status") then2 E) W7 o/ g, Q# Z( i) m2 x
Status.deleteObject;
# Z$ s" O/ ~% }6 W end;6 _( l) {% i) e/ G/ Q# r" G
for i:=1 to 10 loop
! n$ k( d% D# L3 ?& R- A- y Res:=sprint("Store_",i);: R, d! l' N' l3 Y& \, p$ e8 A
if existsObject(Res) then5 E9 z* M- Z/ r) o- i
Obj:=str_to_obj(Res);) T9 z, ~5 A- @7 J
Obj.deleteObject;4 M; d, ?1 P( @% }% ^
end;
- L/ i6 D, y& K: j) A* ?% A next;+ M- `% S- B3 p E: v9 A4 ~+ @
--shengcheng Status:zimoxingceng
. V5 v0 U8 k" q7 V Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");7 ?2 F- U% C: @1 N. ~! H: w3 ~, [
Obj.Label:="warehouse status";( f! E+ Q# t, n% ^3 ?$ h
9 }9 z7 N( `" j. ^) U for i:=1 to WH_nums loop N0 G( y8 A' c! ?1 ~) e# e2 \
Res:=sprint("Store_",i);
$ ^; l/ P, a1 d( Q; m Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);5 n, ?+ Y8 s0 t& W; X5 r
Obj.Label:=sprint("huojiaceng:",i);
" d7 s0 f% M* e- u5 O Obj.xDim:=WH_x;) I, B' b9 v; X }& {
Obj.yDim:=WH_y;" @) a- }$ U) t6 |$ {% f
Res:=sprint("StoreData_",i);8 i$ e" \& C* \$ [+ s$ Z. h
; q% ^) h* k# c: t7 g Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
2 Y1 _8 ~# m: ~) C Obj.Label:=sprint("huojiaceng:",i);0 D/ q2 v$ p! v7 t1 V' w' }! v" p
Obj.inheritFormat:=false; |" d2 y1 ?! a/ W. q2 M2 j
Obj.maxxDim:=WH_x;
' T& y" F/ K/ u, `% a Obj.maxyDim:=WH_y;1 y9 W! F0 Q4 E1 I9 d9 n& o: Q
Obj.ColumnWidth:=3;& {7 V1 N2 X" B; f- ~, M! |+ A3 a
next;
1 |2 a2 M3 ^! U# @. H
, q' D7 S5 [5 V U6 ]5 h( u5 Q .Delivery.MUs.Forklift.speed:=2;
1 c& F7 A8 }8 ? WH_var.delete({1,Part_Nums+1}..{*,*});& N1 e, G3 z3 A M
for i:=1 to Part_Nums loop' [6 q# H5 Y9 x, o4 ?6 L
WH_var[1,i]:=chr(64+i);! S/ i6 ^2 m" {8 H- G2 w# z
next;- ^* b" n* D" m6 Y
end;
2 E; b4 ^1 U! j8 X: @ s出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
; {6 x% O8 J9 q; M- \5 K& ^5 \
, l3 C' M; M8 p- |" t9 o |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|