|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
9 D! C( N+ M& G' }7 }语句是这样的/ V1 Z0 Q& j, h4 H
is
/ g( Y) L( t8 p2 I. i( g i:integer;
# \% i% C; X; D8 n$ L Res:string;
2 w$ g! e. w* g obj:object;$ Z8 j# n* X/ I& t. U
do6 l8 a0 }# }3 c a1 S
if existsObject("Status") then% j1 k. I* l3 l% Q Q1 \' V
Status.deleteObject;7 d: i5 c$ B* Y/ P$ j# q
end; M: {7 N4 ^; c; Z
for i:=1 to 10 loop
6 d: d; V$ [% T9 y; A! p. U$ _8 m; w& x Res:=sprint("Store_",i);" J1 M6 f6 r/ B" F. {
if existsObject(Res) then# E2 _ s) t! C; P1 C; l
Obj:=str_to_obj(Res);
1 L) c# J$ b, J: G+ o Obj.deleteObject;! A) e% H9 a' h+ ]$ |$ F
end;
7 z/ R* f3 G" H3 u7 {# R4 v next;: I, D c" a. O G4 y$ d7 c& L' A9 ^% p
--shengcheng Status:zimoxingceng5 l6 {4 M3 s7 Y; d
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
3 t" I" G5 n* W" P7 K. Z Obj.Label:="warehouse status";6 y6 j0 P! R- @1 v" A5 W
" A5 D0 q4 R1 b! L% x
for i:=1 to WH_nums loop2 t( R7 Z! B) i* x/ D( g
Res:=sprint("Store_",i); q( D" E7 Y' p3 H* r9 F4 b
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);4 m; T2 G2 h+ z% s5 z+ J! c/ l
Obj.Label:=sprint("huojiaceng:",i);
, q: \1 l! i' E( S1 P Obj.xDim:=WH_x;$ q. z6 t4 c2 n
Obj.yDim:=WH_y;$ U: B$ O0 Y9 H5 J
Res:=sprint("StoreData_",i);; u2 \# s8 g' X) x) @) v4 y
1 E$ n6 m4 L6 J* u, ~6 n Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);; y8 t; k8 \1 }1 z5 \7 |7 }
Obj.Label:=sprint("huojiaceng:",i);% {. ^" e; i( n- P3 u: N( ?
Obj.inheritFormat:=false;* r" p2 ~: u+ f! U( i9 o3 O3 u0 X
Obj.maxxDim:=WH_x;' t& s, N& E" m2 U
Obj.maxyDim:=WH_y;
8 K3 p; j+ n& b7 c s0 k/ ~ Obj.ColumnWidth:=3;; a9 b7 }% e, w; m2 }2 r% w
next;4 d, c, C: H/ v9 ^
8 t( ~( E t- z4 y, j% d8 [* x# `
.Delivery.MUs.Forklift.speed:=2;) G. u. J, j3 V) t
WH_var.delete({1,Part_Nums+1}..{*,*});
' X& ]1 s* H8 m) v. [ for i:=1 to Part_Nums loop
- R) }& R( C" } WH_var[1,i]:=chr(64+i);" ~6 v- X6 M5 p }
next;
) R% Z* S7 V vend;
" Y! f V9 I( G/ R+ D) c出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
! d9 H Z" @* O# W: M! U$ C! y. w. ^ Z4 I2 s
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|