|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。( }" l: [: g! ]1 s" y3 D' a2 ?
语句是这样的
; M) Q; m+ h, m8 V- d F, A4 x4 [is
$ m* H/ I+ J( y; q# z1 {; W4 ~& h i:integer;! X' m& ]! V: E: k" u. w
Res:string;
; m# m8 @4 Q1 l7 U X6 Z3 ]+ Q( F obj:object;% G' H! i! ^' Z9 i! i6 r
do/ a" c! A# t* @; H3 m
if existsObject("Status") then& B) y n# n7 P- C f
Status.deleteObject;
+ \5 I9 ]+ g$ _1 s! \- ] end;& ]: J, _; F9 B U" Y/ v9 q
for i:=1 to 10 loop( h+ h' W/ z2 P p
Res:=sprint("Store_",i);* j4 V3 J! n: H
if existsObject(Res) then9 j7 @" t! g! W* }5 j2 r x- i1 s
Obj:=str_to_obj(Res); t4 A9 d- q) A. u( E
Obj.deleteObject;
* ^- ^4 y1 T: u& z$ x end;* S" ~$ u; d c9 P. c
next;( {$ s, v w9 A, X# ~( D
--shengcheng Status:zimoxingceng: \- S7 G# ] S& t3 M
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
- a+ q& d8 Y. m( t+ P* ?" J9 k6 v Obj.Label:="warehouse status";2 I* G! G$ q. o/ i V1 f6 P* [
s6 e) G, F8 j1 [7 I
for i:=1 to WH_nums loop
& N4 {" B& H8 R. [ Res:=sprint("Store_",i);+ C6 x4 |) d F3 P# J4 J' C% S
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);* V" u9 R9 n. `: i& v3 Y$ q# j, V$ e
Obj.Label:=sprint("huojiaceng:",i); p, w( ]7 U$ r& k1 ^: n
Obj.xDim:=WH_x;! `1 @; X% m: t- G' z! q
Obj.yDim:=WH_y;
% P1 |8 j$ B7 k" {5 Y Res:=sprint("StoreData_",i);
5 x) j6 I) ?7 J; o9 T1 X, _( D4 f
, x0 B/ K% M) t6 v5 @ Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);+ y3 l% S6 A% L6 s
Obj.Label:=sprint("huojiaceng:",i);, ?. Y7 C& y- Q
Obj.inheritFormat:=false;
$ E% n; v+ s, S6 ~% x Obj.maxxDim:=WH_x;0 T: I$ q/ w T W* W9 c1 K
Obj.maxyDim:=WH_y;- p' K5 a: E4 V; W' t% E
Obj.ColumnWidth:=3;+ T' ` H* K* j' H% \. n, Q
next;, [5 Y( H2 }1 H0 Z- [! g( D2 R
3 c. f, \3 H1 H8 k+ S0 M( p2 }2 p# ^: y" e
.Delivery.MUs.Forklift.speed:=2;0 Q: Z4 p3 \! W# D: r8 c
WH_var.delete({1,Part_Nums+1}..{*,*});
8 `9 @" U, M6 ~# E, j: e" ]' r% Q) D for i:=1 to Part_Nums loop2 h `. k0 b- F" c% `
WH_var[1,i]:=chr(64+i);( l) ^4 Z3 k) u9 \; ?
next;
; m6 }. ^8 H+ Aend; m1 N% c N2 _$ _. J9 a
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
% B; H. f8 b/ w1 S9 T, s9 m( ~+ S: M- C4 _9 I
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|