|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
2 a ^9 W0 B* i7 {0 T* a语句是这样的+ z o2 }2 c9 ]4 Z+ X
is b$ n3 w3 q4 U6 I D- M
i:integer;
C# Z& q2 k( [$ @( k. j' [1 ] Res:string;% _+ f3 o& x, v% x
obj:object;- Y: r- Z! S" n2 B, i, P+ D8 `' C
do+ g6 I; B4 s2 [5 Q$ S
if existsObject("Status") then
3 V( W& D$ i/ _) r* v4 v8 t7 Q Status.deleteObject;
: F" a7 Y8 p" B% P' f end;9 D' ]+ i# C- U% {! G
for i:=1 to 10 loop1 K- E" o% s4 p- \1 ?
Res:=sprint("Store_",i);5 l9 e3 b# x5 ]2 z) f
if existsObject(Res) then
( U& q' I7 \) k K$ v Obj:=str_to_obj(Res);
+ E2 s8 W6 D9 `1 h8 G! |/ } Obj.deleteObject;9 D: o1 e8 l. [$ `
end;
* L6 ^$ g+ M2 l& B5 w next;
( u f. I5 H9 C& r& k --shengcheng Status:zimoxingceng$ j# x/ D9 c1 F% o0 H
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");, v7 m" }& c. f7 z; e- D
Obj.Label:="warehouse status";3 E8 N! E. A8 s
, h" @' D& m$ O3 s+ B$ y0 |0 M for i:=1 to WH_nums loop
- H/ V+ I \2 H( y5 T" @ Res:=sprint("Store_",i);3 p, J3 `0 f8 [6 O( z7 G
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
; T( c/ R& D2 Y2 W2 d# V# p Obj.Label:=sprint("huojiaceng:",i);
1 O0 d/ s4 r( i7 S Obj.xDim:=WH_x;/ v$ g. r: r# ]* t: M
Obj.yDim:=WH_y;
0 I5 ?- A& l7 h r. v Res:=sprint("StoreData_",i);
1 V& I: m' m- ~* c! ~' M 8 ^% V# }+ U1 \1 ]' t
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);8 [$ \& O( e- I M {
Obj.Label:=sprint("huojiaceng:",i);
8 F! w/ y/ B9 i* N$ K Obj.inheritFormat:=false;
; t5 {3 W4 H, A6 \( Q3 w$ Y Obj.maxxDim:=WH_x;
3 `0 j k' U$ ~; @1 F- ^ Obj.maxyDim:=WH_y;% O- u' s; a& d
Obj.ColumnWidth:=3;
+ e5 P; y1 ~. \' \7 B next;
5 A# B# e/ |& ~& B
4 y& T# \1 V" H3 X .Delivery.MUs.Forklift.speed:=2;: S/ ]& d9 g4 r3 ^$ q. m2 e
WH_var.delete({1,Part_Nums+1}..{*,*});' i% f8 @: H x
for i:=1 to Part_Nums loop! R% n C( A% F4 i
WH_var[1,i]:=chr(64+i);
) W+ `, K# O/ n0 c. F/ y7 i' B next;
% p. V# @* Y' \end;
) w# r6 D' K: Z6 o出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 , r6 x) o' J8 i8 @% H" k
5 o0 M" E# `0 t* f0 k' f9 `
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|