|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。6 |- z. h* A- G1 v7 o2 i9 k/ x) _' w
语句是这样的$ H4 X, O) t3 @0 u: x
is
7 e) B9 s: J' W3 } i:integer;
$ Z$ t0 f3 s9 p- ?( A" t( ^7 q Res:string;% _+ X- @! |: B3 [* X
obj:object;8 K* q0 J: {& t _3 X
do
: M9 b$ y1 v- d2 N8 ?- S2 g if existsObject("Status") then1 R2 \* o4 ?3 A: {- O
Status.deleteObject;0 ~& H+ b7 ~0 T A0 ~5 c$ N
end;$ k* W! X5 L7 y } ?2 G! `
for i:=1 to 10 loop
3 q+ `( b( m3 l# y7 x Res:=sprint("Store_",i);( q+ e v# F# J9 x2 v7 C
if existsObject(Res) then( A% {: h( l4 G
Obj:=str_to_obj(Res);
. i& x$ p# d8 ` m. f. V' G Obj.deleteObject;( {2 T8 y2 \: G
end;! l9 |, @1 M- c# a0 q, U J6 F' S" D
next;1 H# e' K7 i/ Y" T7 t
--shengcheng Status:zimoxingceng
9 d" z) O' y. [- u" H! c9 \ Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
3 O, j1 [ z5 j: N& B Obj.Label:="warehouse status";
7 b; M, g, b( l
, Y2 Z8 L8 n' Z; D# x for i:=1 to WH_nums loop
6 Z& ?1 P* u* P( _7 h& g1 _ Res:=sprint("Store_",i);
! h9 y8 ]* O- }! d% d1 y( D Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
/ ] {; g t2 s* g5 T Obj.Label:=sprint("huojiaceng:",i);
. U# `+ \7 m8 _6 v) s0 r9 } Obj.xDim:=WH_x;
% P! \1 p7 `4 t( V; c5 N3 t& ? Obj.yDim:=WH_y;+ T9 A/ m8 ^$ t( V2 T
Res:=sprint("StoreData_",i);
6 C& ^6 Y. `$ ]- i8 g: J ) K( h0 j* F* d8 B3 W
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
9 B8 H, s0 @7 m; N& i Obj.Label:=sprint("huojiaceng:",i);
]" q% B& i1 R* { Obj.inheritFormat:=false;. \3 Z/ l/ \5 o, W; K
Obj.maxxDim:=WH_x;# ^0 q0 r& P7 b4 b( s. X5 c
Obj.maxyDim:=WH_y;
2 E0 ]3 F5 f! y( \2 C Obj.ColumnWidth:=3;4 n2 {' C% u, V) Z( E
next;& u( ^$ [6 b4 B& g9 k) K5 P/ N
, j6 j) |( b! {0 {: p% | .Delivery.MUs.Forklift.speed:=2;
: Z7 |( F7 I+ r I8 i0 S3 a WH_var.delete({1,Part_Nums+1}..{*,*});8 l- U5 b4 @* i8 Q- `: v
for i:=1 to Part_Nums loop
$ t' ~2 k3 j) u; I, J% W1 t WH_var[1,i]:=chr(64+i);+ H! ~$ p0 M+ h
next;& m, W" I& K$ c9 C$ S$ i& ?
end;
! D r& y) R" f' C7 t出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
& \0 F0 Q$ Z9 c7 a
b7 _( Q: j7 k |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|