|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。* \+ v+ M" b8 i6 I1 ?9 [1 e9 f
语句是这样的# O- k0 N3 i6 e( x3 l
is
/ F" w9 b7 _4 Z: R) } D0 {* S5 Q i:integer;
9 V+ Z! W) b$ p( J) }+ k( @/ T( s+ P Res:string;! l! |: o7 S/ `0 z# V3 d
obj:object;
" R# ?; p; w& N* a, [+ r+ m" wdo: q5 G7 M/ J! e( w, L
if existsObject("Status") then+ e' ?# J& p3 x8 \
Status.deleteObject;' Z7 f# _* s2 D- R3 o
end;3 O- A ]1 ?2 D$ ]' V9 Y! Q; q
for i:=1 to 10 loop
1 u# {3 [6 ]2 L- c K) f Res:=sprint("Store_",i);& O2 d9 X' c/ b: X4 ^
if existsObject(Res) then
+ W$ h+ L* D4 j Obj:=str_to_obj(Res);$ m/ V) r8 ^& J8 F# \9 i
Obj.deleteObject;0 l& b0 t9 P3 y, ~
end;% }9 r g9 B7 o8 m8 _
next;: M& R, h/ U& y' g. d! x
--shengcheng Status:zimoxingceng
Z3 w/ |8 [$ A/ k! R5 h6 y Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");& K1 Q, M4 @1 @! Y# X
Obj.Label:="warehouse status";2 ~( k0 S7 Q8 ~ o. h
& A' o7 {% l/ d! H& k9 A for i:=1 to WH_nums loop0 k1 K6 j+ Z& @( j( P6 M
Res:=sprint("Store_",i);
, E, P6 h# U* a$ U5 k Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
! j) s2 W6 k- Q Obj.Label:=sprint("huojiaceng:",i);
' L$ J8 n9 Y! E9 j g Obj.xDim:=WH_x;
$ H1 b6 Z4 b9 \ Obj.yDim:=WH_y;9 d' U* C+ i" T0 x, T5 Y! {
Res:=sprint("StoreData_",i);/ e* W h% @ j" O. Y
1 o6 P E+ v! ?! o- f. T0 [% U+ e Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);! {( p# }) D4 m* J( ^
Obj.Label:=sprint("huojiaceng:",i);
( T- |$ Y( R q9 C$ N Obj.inheritFormat:=false;2 H# g0 \# b: ^2 X+ `! V
Obj.maxxDim:=WH_x;) o) k: P* {" b/ X' w$ |
Obj.maxyDim:=WH_y;
' Y9 w Z9 U) D6 n+ P Obj.ColumnWidth:=3;
5 S' v7 t' |8 m ^- j& p next;6 q2 Q7 q; T& w8 K( S. [
# B4 U! O% p {( s0 f" I .Delivery.MUs.Forklift.speed:=2;
0 B9 v0 [- `5 j* X* X' k WH_var.delete({1,Part_Nums+1}..{*,*});* O, }( h- Y% W+ K# v+ Q
for i:=1 to Part_Nums loop. d9 B7 E ]) y, ^8 w! }' y
WH_var[1,i]:=chr(64+i);$ [5 T1 O" R: D+ h4 `. [3 N8 U6 R' M
next;
j4 W6 P) H5 W! ?4 i& _end;
+ L" L) l7 G' |2 z( |0 @0 U# {3 j出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
8 T- \- c' U% x' @4 A$ q( X
) i$ ^" Y7 p0 K3 H/ I |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|