|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
. {! N' P( Y: \- h2 H8 m! F4 M6 u, L语句是这样的1 x" }* ~$ u7 E
is/ p1 U& d1 n- y1 p, z: v
i:integer;
" v! C- g! K5 n3 ~ Res:string;
/ q6 Q8 R5 X8 y3 g+ z obj:object;
& ?2 e. C) Q+ W, N3 D+ g% Mdo
+ l0 P) k8 o6 I2 S if existsObject("Status") then/ {1 j+ T1 Y7 y b, C8 k: f) g
Status.deleteObject;
: n+ z/ R! ^ h: v) d) S6 B end;
: o. c' R1 {. N) k- Q for i:=1 to 10 loop
1 _7 A, j5 @5 d5 c: }* W Res:=sprint("Store_",i);/ L* V4 n8 s3 t: o
if existsObject(Res) then
$ ?1 h/ h1 F3 I# A+ T Obj:=str_to_obj(Res);
0 n8 i1 X- H+ W/ a Obj.deleteObject;6 }3 J% i1 g5 y0 K
end;8 z2 \3 {$ |; J$ e) V# D
next;" j) q0 h6 Z: @2 `( W% }
--shengcheng Status:zimoxingceng9 Z1 \- x/ T2 {) o5 k/ P( ]9 m$ u
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");$ M9 d/ i `( k: g* B, {
Obj.Label:="warehouse status";
8 x9 i5 ~/ W0 H( `& g
! R- A& W$ j f5 I7 q; f for i:=1 to WH_nums loop
2 |' B# Y' r* C9 v* j Res:=sprint("Store_",i);1 ]# h, n0 J$ S- q- ^9 n% h9 |
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
& U4 K$ R/ w' ~8 L& R0 J Obj.Label:=sprint("huojiaceng:",i);
' t9 F. t9 v: c/ U: @/ V* a0 F Obj.xDim:=WH_x;8 ], F m& ^- M1 V) g
Obj.yDim:=WH_y;
) N. A5 g. s; } Res:=sprint("StoreData_",i);
% w0 e3 x1 E6 } Y. w, D3 b
! F9 f5 [: i* P% k9 C Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
u( F* o! E! ~% c% y Obj.Label:=sprint("huojiaceng:",i);
. e$ ]$ g' K1 y+ W, ~. o Obj.inheritFormat:=false;( A# e6 U8 X5 ^, m/ D u3 g
Obj.maxxDim:=WH_x;
% i7 y/ l, G* e( u, R! n Obj.maxyDim:=WH_y;
; i9 L3 l- o6 Q4 _& h7 a( K Obj.ColumnWidth:=3;
2 e Q- x. j0 R( d9 | next;% M+ X1 x( L: ?$ j n& g7 z! F
5 A/ q+ q# z3 n/ q: P/ m .Delivery.MUs.Forklift.speed:=2;4 X5 c% ~/ ^- F, K2 w2 z! H0 Q
WH_var.delete({1,Part_Nums+1}..{*,*});
' B; v# U+ y' X b9 l9 H" t3 q for i:=1 to Part_Nums loop/ `0 A* i( E9 |. x% A
WH_var[1,i]:=chr(64+i);
: g$ G; a) P; p p6 \! S, d next;8 a* |$ Y) g! _9 N0 `3 ^, j
end;. G2 f" z9 z. ?* J$ b7 ?
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 ) F$ X6 G2 G& u* e6 @' Q
1 y5 }1 y9 f# G1 S% n% s7 q. x$ L
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|