|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。7 V8 E. T5 y* _5 R
语句是这样的9 @% V% k: G9 a+ v2 B6 I
is
1 s( |" H; {" H6 b; s9 i i:integer;
! l* A: H* ]9 w6 X3 V Res:string;3 j2 b# P' q6 _: N
obj:object;
7 \+ o* _' V4 J5 M- \ v; `) Fdo$ k" u+ r: b) l% @1 u- y
if existsObject("Status") then* p, j3 `# h2 Q1 |8 m. g9 Q( m
Status.deleteObject;
5 D+ L7 L& y* c4 v% t7 Q+ Z end;, a2 }7 l+ O; _; F
for i:=1 to 10 loop. T' G9 Z3 V4 h4 v) I4 x( r: `0 J" P
Res:=sprint("Store_",i);
; G( F! v7 Z% a$ ?8 l. Y if existsObject(Res) then
1 x0 B: t) X6 ?+ I* Z# S6 s Obj:=str_to_obj(Res);" P( [; }7 j. @% r- m
Obj.deleteObject;
+ V6 `; p1 [( w9 j" V end;, R# d! R% p2 F B# c5 `
next;5 P1 Y# M9 @. W1 E# |6 h
--shengcheng Status:zimoxingceng6 T! E+ z% O9 I
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
. M1 o0 E( U5 y$ H- x P Obj.Label:="warehouse status";/ S$ j% b, B3 [% H
/ O0 B2 `+ o, L1 d1 |% j( p) l
for i:=1 to WH_nums loop
5 u8 E+ N) Z0 \! w0 _* i0 S8 R Res:=sprint("Store_",i);
2 D* Z7 v& K/ m7 M8 _4 s Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
n; q6 ~0 q! ?' `7 K Obj.Label:=sprint("huojiaceng:",i);( M/ M9 G) \! i0 S2 l X
Obj.xDim:=WH_x;1 N: N/ K3 N9 V( D' q& e
Obj.yDim:=WH_y;; s6 {4 x4 e( m: P
Res:=sprint("StoreData_",i);
" n1 B& Q6 Y$ E$ `7 x, I. [ 8 \0 F R5 K. N, d" J9 j' [3 P# G& P
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);1 G( ?# ]/ T3 _( u
Obj.Label:=sprint("huojiaceng:",i);1 e- h: M1 C5 \. P
Obj.inheritFormat:=false;; p( q! x0 \% K
Obj.maxxDim:=WH_x;
! a3 e7 c% W% a$ ?, n1 U Obj.maxyDim:=WH_y;
, n: |$ |0 m( L: \# M& e8 w( I. y+ h5 q Obj.ColumnWidth:=3;
4 V' O4 Q1 X, c$ E$ Z next;
+ g9 z+ l* n% p
& z9 T% p8 [8 ^) w .Delivery.MUs.Forklift.speed:=2;
7 d- Q, i9 k$ d: g, ^# z! O! o2 f2 h WH_var.delete({1,Part_Nums+1}..{*,*});, Q4 D" t* i* n4 b2 _' S
for i:=1 to Part_Nums loop1 v* `2 t2 b8 O) \% j
WH_var[1,i]:=chr(64+i);
e1 G& {: i& S! r j( M( n* K' ] next;
K) u0 W. D4 R, f0 Eend; K* ?' J8 L5 g
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 ' I; \/ p1 X+ l$ e% w$ ]
K1 ?! }) f" w |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|