|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。; Z3 `1 b( t; J0 x R. T* i8 {
语句是这样的! P0 J( {; r* w
is' |$ _8 _9 d/ J8 R4 }5 C. w% j: l1 m
i:integer;8 J1 X; z# T7 c1 A( u; k
Res:string;
8 o. m5 j- c2 z7 z: y obj:object;
5 R5 l4 I: m7 x: ?3 t; I4 ido# A0 Z! Q0 C0 ~/ ~. J: j1 ]+ s1 X1 t
if existsObject("Status") then
% K4 Y- _- l" o5 Z* p Status.deleteObject;4 K/ X r. A1 G5 B: f* B/ m
end;
) K1 x( E: C* _" w- Q for i:=1 to 10 loop
X2 h/ X d5 h2 _& o Res:=sprint("Store_",i);$ W$ d) r$ P- F! o* F
if existsObject(Res) then
: D: n2 `( c+ s) A/ _4 v( n8 X4 I Obj:=str_to_obj(Res);, L; L7 E& u) [
Obj.deleteObject;
2 i+ x; {4 F" u S end;% { y% M4 [1 \/ I: c* U
next; ?* Y6 D, r- p& T
--shengcheng Status:zimoxingceng* i: \# T( e: b0 E" E. U
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");" d) h' T/ t6 M l6 ~' R
Obj.Label:="warehouse status";
. p; ]) d/ P& [' y+ N% g
! L# I4 c1 ~. s4 C for i:=1 to WH_nums loop
5 k9 k4 b2 G- t# ?1 P Res:=sprint("Store_",i);
`2 e6 o4 Q! F, _ Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);2 d, j$ M1 Y" ]3 v
Obj.Label:=sprint("huojiaceng:",i);: [- M# A, O: W; q1 Z' a
Obj.xDim:=WH_x;
) P% L$ e: g- F& X Obj.yDim:=WH_y;
7 l7 ~8 @8 H/ [! O Res:=sprint("StoreData_",i);
( g: G A9 S4 L4 g. G& _) T: \; P0 \" W
# [6 u+ j: J3 C7 a( c. b" m Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
: c; @# N# R( H! Z2 A" T4 T. f Obj.Label:=sprint("huojiaceng:",i);
( v1 [$ m3 ~9 V: j Obj.inheritFormat:=false;: L! S9 ?2 o; N* k+ `/ I3 P
Obj.maxxDim:=WH_x;) z5 K' V) ~; t9 X7 a
Obj.maxyDim:=WH_y;
- {& V9 K( y" r" K" t3 a Obj.ColumnWidth:=3;: y6 @9 N( h6 ]) r+ u! c; P. r% s8 {
next;0 M5 C' C {. l
( d+ Q8 r3 ^7 l! p
.Delivery.MUs.Forklift.speed:=2;
v" S) {% G0 g WH_var.delete({1,Part_Nums+1}..{*,*});
" |* y4 ^7 F" _6 X" V& H for i:=1 to Part_Nums loop
; h5 }# f" [1 y: R/ y+ u. m) M WH_var[1,i]:=chr(64+i); `2 d/ N5 \: l5 U
next;
* V7 S- j- b8 X9 H. X! q6 Y% e7 s, aend;
4 i5 l: ]# V" y出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
R7 a6 W, m4 {. Q. M
! L: ?; i7 H/ e |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|