|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
; D, s. e/ \1 `7 Y0 G语句是这样的
, T" {: C" ^4 tis: {3 y6 S o, Z& J# [
i:integer;
& r( d N% J- x/ j% j Res:string;% P2 C* R- n5 Z+ h ?4 _- n' S5 g3 ?
obj:object;6 X$ w5 b- d( y) |( X* R8 f
do6 G* l5 q, U( ~, G8 M/ k# o- Z
if existsObject("Status") then* Z# h- @2 P( b
Status.deleteObject;: ^! I& M" C; L" Q0 ^3 I' }
end;
0 @* }% m8 b8 l+ G1 f- Y5 A( B for i:=1 to 10 loop
t" y$ _/ H4 I# P& P3 s Res:=sprint("Store_",i);
! \6 R" R, s. R" ` \, `! o if existsObject(Res) then
7 w( E5 U0 t6 W3 H Obj:=str_to_obj(Res);
- N9 `& N9 Q2 G4 F( s, |0 T Obj.deleteObject;
6 E7 M( ]9 N2 y5 V end;. u5 a& J% O: Z% m# i. g# |6 K
next;
8 H1 v' j/ ]3 D5 y. C( _: z --shengcheng Status:zimoxingceng
1 E, B- E' L. _+ T% _; F' S Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
1 L6 X2 w! Z; Q! n( e6 n5 L Obj.Label:="warehouse status";& s, n B& Y o, p! m0 M2 S
7 w$ h& R9 _8 T h* ?. J7 S
for i:=1 to WH_nums loop7 U/ M, U/ p9 V$ o
Res:=sprint("Store_",i);
9 x+ i+ o% V6 ^: }. s Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);6 W& c8 U" b1 m: q4 j1 Q
Obj.Label:=sprint("huojiaceng:",i);
6 S8 w7 N; E r" P* W- S Obj.xDim:=WH_x;1 J# O* j& E- g; }$ |; a/ V! b
Obj.yDim:=WH_y;8 G8 L- A" i2 P0 C2 h9 ]
Res:=sprint("StoreData_",i);
' C, d, J, G) H3 q
* B7 \8 I, M" c Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);5 W, Y) E: B. w. Q# {; B8 |
Obj.Label:=sprint("huojiaceng:",i); M* d7 C& v2 t
Obj.inheritFormat:=false;% s3 c7 H5 C# o( T/ ]4 r
Obj.maxxDim:=WH_x;
2 x- b. N( k; v; u) W( a) c Obj.maxyDim:=WH_y;) D: }3 W* a9 a2 h4 I7 d. A2 b
Obj.ColumnWidth:=3;" N0 a8 G' Q% n% ?! T( \+ c
next;3 e! j9 o7 T2 U0 t0 w& S1 L
# o& I+ E! l& f% M& G( H1 C
.Delivery.MUs.Forklift.speed:=2;' m& l$ b1 E6 q2 Y' r
WH_var.delete({1,Part_Nums+1}..{*,*});
- D9 x# }/ v/ r; l& ]& V) f* Z for i:=1 to Part_Nums loop
: P8 {# C* Q0 k/ D: D2 f2 }* \ WH_var[1,i]:=chr(64+i);0 u) ^% q5 L( x! X1 G' [
next;8 S5 R5 U7 A' D; J% P$ O) a7 G
end;4 z4 g! H0 l* I* j. |: L
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
& C/ ~7 u2 E. h; s5 |* C8 z) i+ `
" x( D1 ~: K' s5 ^ |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|