|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
- Q* N/ @' a8 [8 {语句是这样的! ~* b$ r9 A) b/ s) s2 d. y
is$ E5 E4 c+ y0 Y6 }: H$ H, h
i:integer;
/ Y ]' [" w' K# k Res:string;
% q/ K/ x; k+ J+ c% Q. m8 W% A, A obj:object;# K7 Y4 O6 L6 Z3 I
do2 i( C( i& U9 S2 H) [% z
if existsObject("Status") then8 h! T. P. g* Z/ j& o7 ~# h5 G( O3 c9 R) w
Status.deleteObject; l: ?; g2 |% w- _' x4 g O
end;3 |/ i9 E2 F4 i3 a' H# H+ a
for i:=1 to 10 loop
# t# d: w9 f9 o4 a: p Res:=sprint("Store_",i);5 ^, L# o; E6 K- \. [. H( n
if existsObject(Res) then" ^! D% D( ]+ N
Obj:=str_to_obj(Res);( D. o& v' o* B0 t
Obj.deleteObject;$ s' G# {* j3 t( o/ e
end;
( M) K- q1 F& O: L7 h next;3 Y X7 I- d& @
--shengcheng Status:zimoxingceng& c+ s& b& h% H& j6 Y* i) @* T" ?
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
4 D5 g# v, _7 {; q* N; Z9 u! } Obj.Label:="warehouse status";8 l9 j, D" }6 V4 Y
9 ^' R: h0 ]/ T- |6 _: u6 a1 m
for i:=1 to WH_nums loop/ |. i7 a0 J8 I, I8 m
Res:=sprint("Store_",i);7 ^) ~$ S6 A. i& C8 w% ~
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
) l: j" v- Q9 Z- E Obj.Label:=sprint("huojiaceng:",i);* ?8 l e4 f; E5 J1 I0 ^& h
Obj.xDim:=WH_x;+ i3 r2 ~/ [! ]3 u0 r4 [
Obj.yDim:=WH_y;
1 ?9 p9 v7 \+ t, n/ g Res:=sprint("StoreData_",i);$ t8 F+ e; i* f, F# P1 K
& b V2 j- a! d% e2 H x) ]
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);9 h5 N$ O( f0 Q& Y' o2 F
Obj.Label:=sprint("huojiaceng:",i);; L% [0 \3 ~4 }2 T' v2 \
Obj.inheritFormat:=false;7 Z7 j% H" o5 E4 s& v0 z( n5 V
Obj.maxxDim:=WH_x;' v' K' w u, x/ A& {
Obj.maxyDim:=WH_y;
g4 y2 m5 M0 v Obj.ColumnWidth:=3;. h% u2 O2 [: |% V2 K) c" M( S
next;
% }9 H$ B! B0 P6 O1 |
$ V( a" e* _7 [* G& ?$ X .Delivery.MUs.Forklift.speed:=2;
0 d) W! _: ]/ l# A% G WH_var.delete({1,Part_Nums+1}..{*,*});4 ] X; i+ Q. @7 b* r( W- G
for i:=1 to Part_Nums loop
$ G% b& l$ t5 C4 i* [' Y* R WH_var[1,i]:=chr(64+i);6 \8 c9 u9 X7 \( J) k: x
next;
# J3 J. ~9 t$ m" hend;
# @. j4 g" R! Y0 g8 X* z" k出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
; {( t, T* ~% e
) H: x, M, g: [1 X) F0 d$ q |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|