|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
/ n0 P2 z { ?5 D% Y9 [: V语句是这样的3 W. `( [/ r4 ^ V' M/ M3 Q
is
5 W/ L; W. v/ w. C8 w i:integer;
& t/ f7 f6 Q3 t8 f w; S8 s Res:string;% r8 ^: w1 a+ Y& Q6 V
obj:object;
M/ f2 Z4 N0 @' G1 m( V7 Y. r. n" ]do$ F7 _& G$ K+ C2 x( d) K8 Z
if existsObject("Status") then4 ?, Y/ T! Q' K! ^$ @& R
Status.deleteObject;
* o$ \' J# S( y end;6 \7 ^4 Q2 n# N( O9 K
for i:=1 to 10 loop
1 l. G* F* T5 O7 {5 I+ P. r Res:=sprint("Store_",i);: S0 |8 ?- K, [$ {
if existsObject(Res) then _: Z: p% D" _' t# Z
Obj:=str_to_obj(Res);: D+ M/ }+ Q6 }) R3 Z; Z
Obj.deleteObject;
# C) Y/ s3 T/ Y% c" M end;& o$ r6 h6 r7 U) w1 Y s
next;
0 O G+ h( U$ w* { --shengcheng Status:zimoxingceng/ M! R' }; \# r: |4 F
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");& {2 c" L7 T6 N& h4 h. L6 G; z
Obj.Label:="warehouse status";, X# h ^) Y- p
5 X6 ^$ C- h2 y- X0 `
for i:=1 to WH_nums loop Y h/ f% L7 f* B$ U2 p
Res:=sprint("Store_",i);
9 @7 d4 P5 o# P Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);2 L7 `( a( a! U2 ^
Obj.Label:=sprint("huojiaceng:",i);
" A- W- \+ E1 d4 v2 I% q8 E Obj.xDim:=WH_x;
3 L5 d7 \4 T4 l$ y. c Obj.yDim:=WH_y;& G# \0 y+ r3 i% f/ c
Res:=sprint("StoreData_",i);1 ~( _/ O4 L$ W) q. p- e! d8 ~3 h
6 {7 K$ P% R3 d3 r2 Z8 E( g/ H Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);7 ?, j8 G* p- Z" J3 _
Obj.Label:=sprint("huojiaceng:",i); J+ i' z3 Q) b( _
Obj.inheritFormat:=false;: ` v$ r e3 B6 H. |7 r
Obj.maxxDim:=WH_x;& s0 C& d! A. d9 Q6 w q; L6 v7 P
Obj.maxyDim:=WH_y;
7 ^( o3 C) \$ o Obj.ColumnWidth:=3;- L. j- a- F& `
next;
& d# v7 g5 O3 N9 c
% a6 W. \0 l1 u* ]4 g) F4 _0 @/ D .Delivery.MUs.Forklift.speed:=2;0 j# Y8 ~. y, J
WH_var.delete({1,Part_Nums+1}..{*,*});
; j( z9 ?7 g# v4 D4 G for i:=1 to Part_Nums loop; D8 |& e9 p& F8 V' `
WH_var[1,i]:=chr(64+i);
9 r/ r; W0 i% f8 C& @ next;
, v8 O3 Q4 A8 |/ a9 s9 {end;% \& N+ @, b: ]# ? l9 v" F
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
8 W- G* A8 ~# {8 o; d0 L1 a2 Q6 ]1 L) t& l! f4 [
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|