|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
6 |. |1 K1 R% |语句是这样的* C5 T& |3 d2 u4 ^
is
( Z6 u' C7 ?$ G. k i:integer;
% g9 c. \2 o- P- |+ f0 |/ o$ D Res:string;
( F6 O2 F2 l1 k" H+ s7 ? obj:object;' j& T- ?1 n/ A D6 q% S1 U. f' V
do
8 h' Z1 A# K$ Z# d8 q if existsObject("Status") then, } `) z2 U; {
Status.deleteObject; z% t) _4 ^$ M: x5 d
end;
8 \9 r. t1 X; \# m for i:=1 to 10 loop
+ |2 ?5 ?$ j1 n3 @. | Res:=sprint("Store_",i);' O5 x+ M' K: c4 ]
if existsObject(Res) then
5 h3 D0 U% x) W$ `6 F Obj:=str_to_obj(Res);
6 O0 e7 g( W6 K& Z- ~( O H Obj.deleteObject;6 P$ H5 {9 {& U" F
end;
1 b$ e R: [$ w; h& R next;+ o# p* R, P! w, ?$ h F
--shengcheng Status:zimoxingceng
$ A5 p$ K: G$ l3 d( @ Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
: h/ e& @' x: q& I$ F Obj.Label:="warehouse status";
, p6 w7 T; v3 C/ V ! J9 A, {! c- r! [6 k
for i:=1 to WH_nums loop0 B8 ?! u8 [ `+ V% o
Res:=sprint("Store_",i);
5 c; X2 T- k1 A' K: l& Q Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
& p6 A) E9 z; A, b, i. ~9 T2 M Obj.Label:=sprint("huojiaceng:",i);( H% t$ Y3 z `+ ~1 K: X- c- S
Obj.xDim:=WH_x;
1 W" e& W9 ]$ z" Q Obj.yDim:=WH_y;
; p+ f, ~7 }/ o, H2 g/ Q Res:=sprint("StoreData_",i);
% }' e, g3 |1 j
- P) w2 x2 [ x9 ?4 P6 r Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);, c$ F/ I' f' G0 [, \
Obj.Label:=sprint("huojiaceng:",i);) c3 P; b' R5 y4 `
Obj.inheritFormat:=false;! l4 D: S8 i }$ E% N& `( q
Obj.maxxDim:=WH_x;
3 h* k, U: ` {0 a Obj.maxyDim:=WH_y;
: m% l3 U/ f* }# I+ ~; S Obj.ColumnWidth:=3;
; r) {6 w( c; V% U, c next; \ N* B% i) R s7 _
" R# l. ^, n7 C3 `2 `
.Delivery.MUs.Forklift.speed:=2;
3 ]1 d6 H2 F) V5 V+ m, V- x' h WH_var.delete({1,Part_Nums+1}..{*,*});
4 |/ f( s1 p- H+ f, q- U for i:=1 to Part_Nums loop
7 ]0 A8 y9 B; c0 p WH_var[1,i]:=chr(64+i);
: q+ B* w: g0 A. i next;
$ Q8 {: F0 W3 ^end;# ~! `$ \+ o8 g! D- A
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 # p+ Y/ x& |7 G( u& X
; F2 q& [6 ^& _3 O4 |% c0 P0 l4 A: H |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|