|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。6 J ~' W2 z0 l2 b" U" ^. d+ V
语句是这样的" }; r$ h P# v# O' e0 E- _" x
is: |, T0 V5 S* {* |& b7 W
i:integer;( |! ^9 R! |) l! }
Res:string;' B- A1 z- W% c4 f3 {# Y7 R$ q0 D
obj:object;8 i6 @4 @$ j( L" o: ?
do
3 s) x }% _7 R2 l% Q& c: S3 z3 Z6 W' g if existsObject("Status") then [0 N# i2 [; {: h/ Y! L- J
Status.deleteObject;' p8 X. ?, H A# T8 k% J1 A
end;$ w. k; b0 J6 ?( y
for i:=1 to 10 loop
. R @0 V0 O& P' L! R Res:=sprint("Store_",i);+ m1 F. O9 b! o0 T" B9 _/ Z) `
if existsObject(Res) then
& R3 `3 u x+ J$ D Obj:=str_to_obj(Res);5 O5 b8 B! ] x
Obj.deleteObject;
. ^( _! p6 i2 i3 } end;
& }8 B: I! R1 q9 |7 b+ B. R' `& S next;
2 a; ]! P5 l& V0 ?& r --shengcheng Status:zimoxingceng
% U1 Z h8 Q$ T* R Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
3 u. m- k( x# q$ r. i) Q Obj.Label:="warehouse status";
. y( N7 L, V0 f, C6 A' S$ z + O$ z& ]- u) S# y7 ]
for i:=1 to WH_nums loop
3 f4 W/ c! Z- k Res:=sprint("Store_",i);
% J* [7 A5 F0 h- B Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
# ^/ {8 g! v1 \! ? Obj.Label:=sprint("huojiaceng:",i);
4 a O. _1 l/ e! G4 n7 T: }& r Obj.xDim:=WH_x;8 e9 g( J6 o+ q3 `& |8 f
Obj.yDim:=WH_y;
+ s9 n: s' j7 ]3 l: n7 N Res:=sprint("StoreData_",i);; P& w S$ I$ @, A' B( T( T
- c( x+ d) f1 [6 t6 h8 s Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);2 a: e# Y* ?! y* K6 M; ^
Obj.Label:=sprint("huojiaceng:",i);% J- d$ K9 k v0 Q' c$ c
Obj.inheritFormat:=false;$ s5 t+ o, w# K0 V3 A: h I
Obj.maxxDim:=WH_x;
* p- e8 l( H" B' z Obj.maxyDim:=WH_y;# \ {( s6 c* z1 s, t' h
Obj.ColumnWidth:=3;
! _0 M {. y- g3 _ next;1 Z: s: Y3 Z% x6 y$ v: Y
! I( V% C% C. ^/ X; R2 D9 i
.Delivery.MUs.Forklift.speed:=2;' c1 A5 T. j& @1 b
WH_var.delete({1,Part_Nums+1}..{*,*});0 i8 p7 G, R0 T/ D" M. z
for i:=1 to Part_Nums loop& j6 {, _( t6 o) f1 p2 u
WH_var[1,i]:=chr(64+i);. l7 F9 j' g0 Z7 Q5 ?# e. b E$ t- j
next;9 C7 p1 q( Y) t7 ~5 A
end; w" t% n7 M' { x: w9 u
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 z$ y) z7 g4 s4 q: | k [
& B( f& f* r/ a. i! h w+ l |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|