|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。+ o; ]* N. t# J0 e
语句是这样的
7 m" |4 V. p* {0 fis
7 V7 {' D2 o: Z2 p( y2 Y0 f1 o i:integer;" f \$ U# n: s6 s8 P( z# }" h
Res:string;* `; q3 \* _, R0 A
obj:object;
3 [! e" b' V# k, G9 \2 b/ Vdo* c! @, O& [. |5 u1 i
if existsObject("Status") then
8 u: k' J0 S7 z! p0 H Status.deleteObject;% w9 a) u2 a+ f: t9 h6 V# B& _1 S
end;2 M4 h6 F5 f2 {3 f& s9 o
for i:=1 to 10 loop
4 x. h1 q/ P* _( i2 Z Res:=sprint("Store_",i);
3 M/ l7 b2 Z( {% W8 r3 L if existsObject(Res) then
, W6 d- Q6 x' J6 ?; x Obj:=str_to_obj(Res);' B4 h. V& N( g: m/ _+ z9 s# P
Obj.deleteObject;# ?0 x- y) h% c5 t; c
end;2 t" [. c+ _3 B, u! u
next;: R4 F b, p8 R( q4 ]
--shengcheng Status:zimoxingceng
% w" U6 G' `) ~. O! B! n5 D Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");" e5 [- _* p4 H3 M0 ]2 a
Obj.Label:="warehouse status";
/ R+ q9 S0 f; K2 M( E$ e3 i% } % {4 c6 m& y! u2 `7 g
for i:=1 to WH_nums loop
r6 j7 j4 @, @' X/ Z: W3 j Res:=sprint("Store_",i);
8 S1 l5 Y, A0 Q9 T" Z Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
+ X( d! l/ J7 n" y) f( ^ y4 @ Obj.Label:=sprint("huojiaceng:",i);( [% o) v( N1 m D4 S/ Q' V
Obj.xDim:=WH_x;
0 V& Z- {. ~" i9 \3 M9 f Obj.yDim:=WH_y;# O- D% k! `8 V
Res:=sprint("StoreData_",i);
* S3 }! S+ E7 _1 a) L6 z ( }+ n( V3 Q! h7 z0 s
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
6 a7 \* l# e( @2 g) T Obj.Label:=sprint("huojiaceng:",i);
2 w4 X" w1 @& ?+ i9 d: A6 } Obj.inheritFormat:=false;( d, q; T7 O% u
Obj.maxxDim:=WH_x;- O6 s/ q; G7 M+ h: j4 m
Obj.maxyDim:=WH_y;
- n. S: ^6 \* ~. e9 v6 d Obj.ColumnWidth:=3;
9 s0 Q5 r5 u/ I next;
; ?# q- S b i7 J5 Z: N6 l
" B' _& k' U \; B+ C% `1 s7 o; j" V .Delivery.MUs.Forklift.speed:=2;; t$ W; @8 f+ L$ P+ _
WH_var.delete({1,Part_Nums+1}..{*,*});% ~& L; T, F$ L& x/ Q- R, X3 a, s
for i:=1 to Part_Nums loop' G$ j# F3 M. R% a- ?, n( A
WH_var[1,i]:=chr(64+i);; I9 s; S% V" l7 _$ a
next;
( C. @; n: N& J( ^end;
8 v! c& _- I9 B( w" n出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 5 x6 U: R4 B# @. C8 z
3 e9 p% U# P2 q' O# ^ |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|