|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。/ I: t G+ R2 `
语句是这样的
$ q. X1 X; C; K" z9 c5 Gis( a4 q! ~! s1 x( }
i:integer;
" \5 y, Y& `; w; x/ } Res:string;
8 g0 j8 C5 [. R5 X% p( P. ^ obj:object;9 u3 r) n' i. S+ u
do3 E9 D! m9 {/ t
if existsObject("Status") then6 u" M; G$ s6 l4 I
Status.deleteObject;" Y. }6 F) j( i; X; g3 P
end;) V0 r" O: u' _/ @/ H
for i:=1 to 10 loop( k$ K' h) v0 c1 F$ _0 ^0 m A2 M
Res:=sprint("Store_",i);
! l4 W0 i- y# Z. C if existsObject(Res) then- }% f* `4 N9 k8 w7 j0 Z
Obj:=str_to_obj(Res);
8 k( m; L; V: e7 O' ? Obj.deleteObject;% `( M3 a! c. P3 `, U
end;
+ k% T8 K* c* H9 Z next;- W$ W# x; W t) v q a- b/ s9 V
--shengcheng Status:zimoxingceng, k- M; I. ^8 X" H( R
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
2 G( t ~0 a3 f/ p J7 z Obj.Label:="warehouse status";
- G, b) U: }& {6 b1 j5 {3 L 4 h; l1 i; \$ t9 C6 \2 n
for i:=1 to WH_nums loop
* t" `9 c- `/ r1 i5 l Res:=sprint("Store_",i);3 r) i/ c# Y% J! B2 e
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
# F7 Y, ~& o5 ^ u0 y Obj.Label:=sprint("huojiaceng:",i);6 K' L: N8 W' K. V( K5 B; o
Obj.xDim:=WH_x;, b3 w4 r$ N! o! h' F) a
Obj.yDim:=WH_y;
/ S- F7 o' Q! w7 R) g7 G$ @# } Res:=sprint("StoreData_",i);
: E' Q4 t+ X* L
( _5 h9 q7 ^0 [* x& Q# @, S- N% S Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);& O0 Q9 W/ k- G0 R* U0 f
Obj.Label:=sprint("huojiaceng:",i);
1 K2 j$ f% C) }% S+ l8 \ Obj.inheritFormat:=false;: y2 k( `$ X& x' p7 o# ?
Obj.maxxDim:=WH_x;' h1 i5 Y' S t# A/ z
Obj.maxyDim:=WH_y;2 u' r" _$ a( _1 c* j( Q9 s4 i
Obj.ColumnWidth:=3;2 x/ l9 X5 L: R- c a) Q
next;
- p8 Y4 _6 D: _' \" J* E' m
7 q/ @( w: \/ l: A6 F .Delivery.MUs.Forklift.speed:=2;* E' K( F- ^! a b* }
WH_var.delete({1,Part_Nums+1}..{*,*});
8 |# v/ u/ }( z' M# v for i:=1 to Part_Nums loop3 O* @1 R+ W: t$ z- v) n
WH_var[1,i]:=chr(64+i);! m7 ~9 W3 g! p
next;
* J7 q) F* U ]6 [9 |! m. ]9 L; Jend;
! G: {& C2 }/ F. }出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
) K+ |9 G; c/ N6 e
8 Z9 i; w* c3 {# b: J0 s1 \ |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|