|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。3 V4 R& Q5 j1 B% a& Z5 G
语句是这样的
* s% ]6 Z, H+ s' p d* `is9 `8 a) k: `% Y& x
i:integer;5 U4 s; W6 b+ A2 l0 Z" G' T
Res:string;+ N0 F* P) p( O9 O) n* X
obj:object;
0 f5 ?) Y' ~4 K% {do3 S* Z7 o: k% X& f7 s
if existsObject("Status") then
4 S- D5 X+ {2 C$ s0 w( q Status.deleteObject;2 H8 W; N$ T5 i' T/ a- z+ X
end;
6 t. U1 h$ b ]* |; z for i:=1 to 10 loop; c8 f3 C( r8 L
Res:=sprint("Store_",i);
: a9 l8 F: u. m: q: C( `4 a& W if existsObject(Res) then2 I: Y. n5 w) P& g0 C
Obj:=str_to_obj(Res);
0 U# L* R6 Z, N, `; ^ Obj.deleteObject;
+ U/ m6 f' ~% I/ T h end;
( H+ x7 T- R9 [ next;. h6 D7 C9 [8 U* d6 n/ {4 e+ n
--shengcheng Status:zimoxingceng
# J' w$ ? ^2 x; S- n: J Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");/ s8 P, G0 D9 H2 d
Obj.Label:="warehouse status";! j% b8 w; a5 `5 W+ g9 s2 d7 c" _
( ~* g6 C- h D* g& S# p" ~& A V
for i:=1 to WH_nums loop S! R( g7 u9 k+ n3 N) F
Res:=sprint("Store_",i);! c+ j9 H5 l9 S3 U2 g; P' F& o
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
1 |* W4 N& e0 C. ^! H Y Obj.Label:=sprint("huojiaceng:",i);
% e4 R# U5 F) i7 c3 ] Obj.xDim:=WH_x;- l# b: k: E1 ~
Obj.yDim:=WH_y;+ r9 b1 r( y& ?1 N2 p; {: r1 Y
Res:=sprint("StoreData_",i);$ M2 M/ ]- U! [; `
6 s5 n0 c* y+ Q" q, m( `7 B
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);; K4 n1 n- \: l! _( W6 z
Obj.Label:=sprint("huojiaceng:",i);+ ^! S5 S3 ]( _! }, {6 T
Obj.inheritFormat:=false;& k; G& L& e7 ?% v7 C/ i
Obj.maxxDim:=WH_x;' n4 X6 O0 ?; P( P9 y( U" Q/ ~
Obj.maxyDim:=WH_y;
+ u, H( l! w% ^3 Q Obj.ColumnWidth:=3;
( p5 } ^1 T0 u+ R" ` next;
0 V$ y3 E$ T' G* {; b2 ^2 \+ B1 t
) \- Y& D, g6 l9 W H .Delivery.MUs.Forklift.speed:=2;
; n! c% A4 P! H& q. M" S4 \ WH_var.delete({1,Part_Nums+1}..{*,*});
2 d1 K) i! E. m$ b/ j' t for i:=1 to Part_Nums loop
2 B/ }" Z" D: U5 o; X WH_var[1,i]:=chr(64+i); F& I/ }, e7 F
next;/ j! x' p1 d" s/ l z. m
end;
. ]' e0 A& d( i3 N' t W1 g+ X出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 ! j8 Y0 }$ Y \% Z1 K
; u# l; {3 o: J$ A. e, I
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|