|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。* {8 {4 k, P% P* G! Y( U
语句是这样的
, @) q# a" | o' [6 N9 O) ]7 f' Vis/ V v4 o1 t. I; t; n
i:integer;
9 @! \$ |" H, L$ V' Q Res:string;
( f4 Z% ~& I4 c$ E/ ? obj:object;
. Q' s( D% A- b% b# b8 ldo% x1 V3 e) ~8 j7 t) q# r! |
if existsObject("Status") then
" s9 d6 e, a, {. i8 C Status.deleteObject;/ X8 j" q/ I6 Y+ r7 V. O4 p+ h
end;
! L: B' }* U& q [6 E5 I for i:=1 to 10 loop Q/ l* L! ^! ^0 h0 p7 ^: X
Res:=sprint("Store_",i);. D8 m' a$ ~! t' |+ v; j! @ E; X
if existsObject(Res) then, n/ l. e/ _5 `9 \
Obj:=str_to_obj(Res);
+ y: M7 v: S' U% R: k% @5 X Obj.deleteObject;- X) h: u; y/ _$ D, z3 W
end;
$ o q; c( N1 f0 i( n" N1 v next;: D9 K# |- ?1 h- H# o" p
--shengcheng Status:zimoxingceng) ~) Y8 C. ?3 J8 Q+ O' J, |2 q
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
% A0 h5 M. _. R T% B! F Q Obj.Label:="warehouse status";
6 N* f& @" D$ P* D, M
7 ?' Q8 {6 Y5 R- [. C- z2 \ for i:=1 to WH_nums loop
0 F/ |$ G U/ M Res:=sprint("Store_",i);
% Z* A! I2 {3 e% ` Z Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);8 f) e; N4 o( a/ ^" y/ o
Obj.Label:=sprint("huojiaceng:",i);
/ S0 o. d' Q! y8 ]: V% p Obj.xDim:=WH_x;2 C" L$ _$ H9 b, |7 N
Obj.yDim:=WH_y;( g& j# v8 [6 y+ s% v, {2 _
Res:=sprint("StoreData_",i);
) t2 W& E# G0 m9 d$ @ & c- X! ?3 _( {( X8 ~# J
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
3 {9 O+ x* d( y! w Obj.Label:=sprint("huojiaceng:",i);
! y! Q0 o5 \1 p, o0 b Obj.inheritFormat:=false;7 ~" [ h8 c( d3 u
Obj.maxxDim:=WH_x;
1 G+ o/ ?1 a- |% y' V8 d7 _; d Obj.maxyDim:=WH_y;
" }& X$ f7 r9 ? Obj.ColumnWidth:=3;
# ~4 u. G4 s" ~ next;
4 d$ F' j' |7 f
0 Q6 C9 B; t. X& G- n .Delivery.MUs.Forklift.speed:=2;- M' ]: Z5 o/ T9 r" ?
WH_var.delete({1,Part_Nums+1}..{*,*});
9 [; c$ l% x/ W5 \ for i:=1 to Part_Nums loop2 N8 T* I" R7 V e0 H$ k
WH_var[1,i]:=chr(64+i);
0 K+ N; }0 s" c$ b1 K% M( Z5 F next;
5 _+ m8 }; y! E6 C) \0 e' cend;3 d/ Z0 f4 r! w( d' x! o9 H
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
/ ~" k( l/ U7 i) L1 i0 e- S# b& \: B6 |! L5 u% l. X& J/ S1 I
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|