|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。4 O0 q( Y. D( C* A2 P: u. i+ S
语句是这样的
$ Q ~- o; c9 e; jis. f! X. J6 b5 |1 n* _9 P
i:integer;( d u& K6 Q. e* d
Res:string;
5 E3 [: k) N6 L! f- E2 B8 _ obj:object;
/ V: h* S) d) wdo
* B+ {; g* b! n5 |( }% R if existsObject("Status") then
* ?8 j# N8 i8 R0 H) e Status.deleteObject;, q9 g! w) g: W9 w. e8 t
end;
& q3 X" z8 Z! c9 Q) S7 [ for i:=1 to 10 loop
) n6 Y" w! A, y2 V) R Res:=sprint("Store_",i);
( I P1 A5 O, f3 s5 A* N if existsObject(Res) then
2 r d2 d1 y' Z+ J3 m$ S Obj:=str_to_obj(Res);& C H# c1 j6 L
Obj.deleteObject;
+ n4 I$ D. ]$ G, D& b: X% X2 Q0 U end;
! B+ q1 V. w+ |% I next;
/ e G: W. s3 W --shengcheng Status:zimoxingceng2 r1 S! K- d- D; q3 |; `$ l! a
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
4 k5 _5 \& O# K Obj.Label:="warehouse status";
: F/ Y4 g" \/ \! b / j4 ]( L8 A2 E4 k3 V! D* N$ l& c
for i:=1 to WH_nums loop
B/ _$ l/ Z" h( P( i& `' z Res:=sprint("Store_",i);
$ q6 N# n: J5 I# m: T3 R; y Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);6 d9 J- Z& `# B. T3 i$ i/ q/ \
Obj.Label:=sprint("huojiaceng:",i);( y' U+ c. x0 j0 T+ i% O
Obj.xDim:=WH_x;9 {* _ V# U% @% B \3 W: b( p
Obj.yDim:=WH_y;
1 L( w3 H: j8 I; }" V Res:=sprint("StoreData_",i);
# v& b I0 I) ?( _" T8 z! U0 W
" F$ v+ ^$ I7 E: B9 H! j) s+ x) l Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);: G1 }) p, e% z- s
Obj.Label:=sprint("huojiaceng:",i);; N" @6 f( F1 Y: C0 S: ]3 _
Obj.inheritFormat:=false;
, w/ q4 [# R: ^* T: J; } Obj.maxxDim:=WH_x;
& r$ ~7 Z: C' r; b Obj.maxyDim:=WH_y;
; x* `( J' `0 E$ z Obj.ColumnWidth:=3;
; z# E$ {, ^& t+ k" h next;
9 k1 d' `/ M" z 7 |$ U! e+ S6 U# y5 N6 }
.Delivery.MUs.Forklift.speed:=2;* M. f& \) P% ~+ a5 U( W/ a
WH_var.delete({1,Part_Nums+1}..{*,*});
+ C/ I/ z( i( O. I4 | for i:=1 to Part_Nums loop" p* C. s: B+ G5 _6 }( n& q
WH_var[1,i]:=chr(64+i);8 p% q! V3 @' A* k B2 g5 m' z
next;7 \9 [9 {' O2 J0 o; x0 p* ?
end;
: a( N1 n* e8 J8 ~, D/ X5 \7 a* k3 o出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
" Q' S" M, o& {8 [% x7 t- ]1 Y& h8 a5 a. W" m: z- \
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|