|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
5 I$ ^) B6 W4 v! U语句是这样的) M. \6 D: Y/ h+ |" X+ o2 a
is
7 f- g4 I( B$ p8 M+ u L i:integer;
9 M7 c$ i+ Y9 z* Q4 @, Q Res:string;3 @0 E7 W: ]& P2 S$ t& \- P
obj:object;: w. U& H: f% M& x+ c" o. ^( G
do
$ i2 U e5 b7 z( Y/ _! l) F if existsObject("Status") then
l j+ ^1 X, X( x Status.deleteObject;- |" Y( \' B' Q: D! D' ^
end;! P9 m+ f( _* v: z, O* v$ P6 t- J% F
for i:=1 to 10 loop
. B4 r+ {+ z3 U/ E- M( q1 b Res:=sprint("Store_",i);9 K' ~8 U. p( V6 W6 o
if existsObject(Res) then
% `: s4 @9 o" Y1 z/ u Obj:=str_to_obj(Res);: `8 x. c1 x( a: U* A) u" t* M
Obj.deleteObject;$ w, T( [2 |) G7 q1 l
end;
0 m @# z; ~# `" x5 R K8 {2 P6 V next;
) N2 a- k! p; d8 f- K. H1 Q. V --shengcheng Status:zimoxingceng' |8 }& g- [+ p2 L5 {5 y4 M( |0 y
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
* v! ?6 ?3 V) S' V1 A# `, S Obj.Label:="warehouse status";8 `2 y/ [8 P5 l; {7 S
, E! Y, p. o$ y
for i:=1 to WH_nums loop
6 e' R7 @. H5 [( T0 { Res:=sprint("Store_",i);
- B1 L; ?: N- c6 @- ^ Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);2 s! j! Z- Q/ l- p
Obj.Label:=sprint("huojiaceng:",i);
( T; h1 b$ m* P1 t# ?9 l+ v W- @7 w Obj.xDim:=WH_x;
7 }+ B/ B9 b1 m4 q* R; Q Obj.yDim:=WH_y;
" F( M$ K# q! t* T& @6 ]$ J: i Res:=sprint("StoreData_",i);
6 ~- c0 g# p8 z3 }- j" l 3 }. {/ D+ N. c. t' J( f# S
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
: `9 q, W* ?2 |% o Obj.Label:=sprint("huojiaceng:",i);
: Q% Y! G( Y9 ] Obj.inheritFormat:=false;
5 G/ C- ]. k" K* ^ Z. y Obj.maxxDim:=WH_x;
8 ~% P. y1 |2 a% F3 Y! ` Obj.maxyDim:=WH_y;
! Q1 ?# c, | T, T Obj.ColumnWidth:=3;
$ |( Y3 x8 z' Q$ ~1 ?3 f next;5 [/ Q5 T# c. v2 w4 D( s4 D
# _/ K0 d1 L; {5 |( L( c$ N
.Delivery.MUs.Forklift.speed:=2;7 ~+ ?" w7 T% w5 R) |$ l
WH_var.delete({1,Part_Nums+1}..{*,*});
. e* J% V3 S" v/ M9 o for i:=1 to Part_Nums loop3 L+ V) Q0 U6 {5 |' I
WH_var[1,i]:=chr(64+i);% h+ T M3 A3 I( E3 c' L/ q
next;
6 r* ^9 p! G$ G d `% kend;2 a2 i# }- @- x+ p& y' A
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 $ U! [' U8 ?- \2 u8 l: u: h M* t
3 V8 z1 T" D" S2 G s$ T7 l
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|