|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。# E8 {( X2 [% F7 T0 s. L
语句是这样的1 b) E1 J8 V+ s/ w) s: i" t6 |
is
! i ^/ R( [+ B2 ?6 g' ? i:integer;
4 d* t7 x/ P9 y1 T5 H, D. j |6 R7 | Res:string;; E( U8 ^8 e4 p W6 P2 U0 C$ s
obj:object;
, P! |* E, o8 z/ Rdo- Y" ~* N: U1 |7 u. _
if existsObject("Status") then
( a' n) U% y, l Status.deleteObject;( Z3 W% H C( T& N
end;% O! y7 }9 L8 ^! d
for i:=1 to 10 loop0 J) u2 g9 x9 d& X# e. m+ Z4 b
Res:=sprint("Store_",i);5 K7 j1 u5 B" f7 K {* E, K! a
if existsObject(Res) then
+ R% }, e, l0 g: Z Obj:=str_to_obj(Res);8 S/ ? d9 F1 U- E, ?$ ~" W; u
Obj.deleteObject;
# }9 ?. F c/ W& l end;
( N& |3 z% L* V1 i& J next;
8 e" c& k. g( U8 s3 s/ ?5 j --shengcheng Status:zimoxingceng
; l/ N6 N/ K, @" Z5 _ Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");$ Y7 e% g5 P$ O( d
Obj.Label:="warehouse status";1 W# k2 J( h. D M# ]3 b
4 i! a+ M9 n# u/ W7 j. n& P5 c for i:=1 to WH_nums loop
. k. Z- M4 w; B z Res:=sprint("Store_",i);
% K' s* j9 y- t9 D% c Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
3 [- g8 o) ?9 _3 C- Q# j Obj.Label:=sprint("huojiaceng:",i);% r8 ^0 [/ ^1 g2 o( |3 }" y9 W
Obj.xDim:=WH_x;8 m" [& t, W# q% o9 U. R, k$ _7 V! ^0 }
Obj.yDim:=WH_y;
* F2 F* q7 \" r6 m Res:=sprint("StoreData_",i);
0 r9 h# u: _0 E2 _8 {
2 E& X: s, v9 [ Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
7 y' f. \0 i, u) I Obj.Label:=sprint("huojiaceng:",i);) L% a x3 c1 x6 \. ?3 B1 x, R
Obj.inheritFormat:=false; P. E4 Z5 q* V6 A2 |0 S% s m {
Obj.maxxDim:=WH_x;
. `, a' ?; _) Z2 s/ T3 m Obj.maxyDim:=WH_y;: R) B0 e7 C4 B* X4 L" I. Q
Obj.ColumnWidth:=3;, D% ^, V+ t5 y6 U5 v
next;
4 s5 G+ ]6 m# Q! ?" P" Z3 ]: e
, l1 n+ f3 H6 T$ B3 C7 R' ^ .Delivery.MUs.Forklift.speed:=2;
$ Y2 B# q. Q$ [! F$ s4 u WH_var.delete({1,Part_Nums+1}..{*,*});
. q& s2 L) ^2 d' U( v7 U X for i:=1 to Part_Nums loop
9 C9 W6 z" H" C) {# {$ Q, B) P WH_var[1,i]:=chr(64+i);! B, K* Q3 J$ }+ C$ ^4 K- {4 w
next;
% q, @3 y+ i/ Yend;
% U# \- `0 I5 h2 w2 e出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 * P, a- O6 Z6 V/ F( g! ^
" o" u! X) Y/ K5 I6 ] |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|