|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。3 _% p$ d0 v4 B/ w1 B
语句是这样的# K* C" n6 J1 a+ ^2 @! t! i
is
/ M/ t; X3 |: N; `3 O' G) s! c i:integer;
( J2 \' y6 j) v$ s: { Res:string;5 ~9 u; t0 N2 K- i& W; ?8 i
obj:object;
# O" @7 s; f( F odo
, V7 v+ b) F' H! R if existsObject("Status") then4 x9 Q" j" D, x1 j2 L- Z( u: R
Status.deleteObject;! M( r1 A* I& |3 M( b# F6 ?
end;* \ ^" D. m: L# f3 u
for i:=1 to 10 loop* K& a" j" n* S. p+ r9 b
Res:=sprint("Store_",i);
. w; U. ^. @4 O7 Q7 T3 k- N* m8 r if existsObject(Res) then
- \' O0 u/ q4 h2 {* J( D' }" x6 M* I7 X Obj:=str_to_obj(Res);
1 z. R2 S" L$ v, G, D' B Obj.deleteObject;
8 J: ]" n% t0 l* r end;
2 w1 y) I+ J1 @7 Y" c- Q next;% p1 J3 `( t y0 @" H
--shengcheng Status:zimoxingceng
1 C7 `# C6 Y1 v) w Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
6 B, u; l, B- k9 G) e& G1 j6 h Obj.Label:="warehouse status";# D% `4 @7 v7 m4 J- F, V2 C" o1 V
. p) f+ R5 ~$ r; ~3 v& o: p; R: p/ w# c
for i:=1 to WH_nums loop* `% K- M5 e, t, C+ H
Res:=sprint("Store_",i);4 M& B3 q; e- ~! v; G
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);: f: M9 k; i/ t! z1 C; t1 G- e
Obj.Label:=sprint("huojiaceng:",i);
$ c, e3 i5 V$ n* u9 Z' P u Obj.xDim:=WH_x;$ I* _+ U, S |9 x# `9 z
Obj.yDim:=WH_y;* N$ o3 y3 F% J7 Q0 `; V
Res:=sprint("StoreData_",i);! Q; P+ X# }. q
) c& A3 l% v: |( H. N2 }% z3 N Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);9 r8 ?/ Q) @' E
Obj.Label:=sprint("huojiaceng:",i);
9 ?( U( ?9 {& R Obj.inheritFormat:=false;
( G/ z5 \& W" E V Obj.maxxDim:=WH_x;4 i4 l& O% V- J) H- Y! \
Obj.maxyDim:=WH_y;' i) L+ f; o; ?9 R- C" Q6 i
Obj.ColumnWidth:=3;
1 V/ \8 w! d+ @ next;. o$ y7 O0 M9 d" a
$ M# ]; @% U- F2 W" p+ E .Delivery.MUs.Forklift.speed:=2;: L5 a* h+ M# y3 s8 G$ j
WH_var.delete({1,Part_Nums+1}..{*,*});
( p0 `1 o' S1 R* }3 \. b& v for i:=1 to Part_Nums loop
- E$ f: A2 W1 O) p- }8 U WH_var[1,i]:=chr(64+i);0 {" P* P' s0 K
next;
0 p' l' p- L0 ?$ E6 \) K3 oend;
9 I5 t$ s$ Y. G ^出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
9 P3 }5 V7 ?' ~
: m+ z# q8 f! p |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|