|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。: ^, b0 b! W/ {2 O( h( l. Q
语句是这样的
3 s2 r f- \, H- G. w" o4 Lis
/ F1 q# f+ o' x) A1 u( r1 ]) I i:integer;1 x, b) `# D8 s# u: C
Res:string;
) a q' U. [ d% Z7 t obj:object;& A: j" d9 G3 G; ~- [& L
do
9 @. o3 e* f' S' I( Z2 U! W% h% T if existsObject("Status") then3 C% m% ?# @6 K- P% G6 h
Status.deleteObject;
& x& g: b. i! \9 S end;
+ e! M7 q" C* u+ \5 |& {, g. E for i:=1 to 10 loop3 A" c6 I" v% ~. S# e" p
Res:=sprint("Store_",i);2 T8 h9 S% \* @' u4 J. B5 n8 b
if existsObject(Res) then: {; z: P2 J. m& s
Obj:=str_to_obj(Res);: g( O0 R2 ]; m7 ~& M3 R
Obj.deleteObject;
" y6 r) T$ E8 Z3 T V end;& r6 \) P, \3 ~# R9 o# K( T
next;
1 B1 s e. t/ N9 J --shengcheng Status:zimoxingceng; S4 I4 i9 s$ h& W
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");% X: @+ K- E9 I- I( E1 ~
Obj.Label:="warehouse status";7 }/ q- B0 p) A! s. i- |& K
- z) a( h- R" G3 f for i:=1 to WH_nums loop
% N& U7 U" b1 Y# h3 d Res:=sprint("Store_",i); w( `% {1 m& h5 D, N
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);9 h8 a- f9 `3 C: Q6 d
Obj.Label:=sprint("huojiaceng:",i);
2 j4 c/ b6 Q' }2 @ Obj.xDim:=WH_x;& B" J, j/ J' q' L. P! `
Obj.yDim:=WH_y;
2 k) p" L. G2 S4 x. H" ]* P5 T Res:=sprint("StoreData_",i);6 S) X n' E) @! D0 Y. d, f/ |
9 n# Y( _! k! h% ?9 J* M) B! w" J% H
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
% O) D9 V/ [2 u. ~) k Obj.Label:=sprint("huojiaceng:",i);9 v: {) U1 d6 H$ j
Obj.inheritFormat:=false;
^- n" b) G/ ~+ I* \2 B: c' J Obj.maxxDim:=WH_x;5 F; y4 t+ c5 m3 i, X% }; H& F$ Z/ X
Obj.maxyDim:=WH_y;
* h" o& H5 z- X" f! ` Obj.ColumnWidth:=3;& |# e2 E1 s0 D1 Y" ^
next;. h& [& D% I+ Y$ A; p4 V' y
+ y1 q, u; |/ [* X+ [. O .Delivery.MUs.Forklift.speed:=2;
; c3 A: n' q/ [- I. M0 E" J WH_var.delete({1,Part_Nums+1}..{*,*});
/ O; w9 T4 ^! p2 Y Q5 _. A for i:=1 to Part_Nums loop6 g; j1 q& ]* z) G
WH_var[1,i]:=chr(64+i);/ r8 q/ p/ H4 A9 F6 O6 c" B3 t
next;
+ r: L6 o2 ? x: bend;( O/ }4 ^4 `1 L- |
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
2 N9 T1 Y" M/ i. ^! y; S9 w
% K4 Z) w, h) E! L$ w |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|