|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
# \7 o4 `0 K; o/ f3 t. A% ]语句是这样的
+ r. @ o+ `2 n1 |: U0 r/ ~is
6 Y- q- Z0 I9 g1 N1 ?' p i:integer;3 `; {! h' d5 b5 o
Res:string;
1 M" a" L6 B. s& l obj:object;
v7 u/ f! O k/ y% l5 A1 S# }do
J v. b& \( X if existsObject("Status") then2 t5 e$ `1 z3 d, c4 h! ^ t$ e! A
Status.deleteObject;
3 h7 i+ C- ^' M5 l end;8 T0 J4 V+ f, y" y1 B" ]3 z' t' J
for i:=1 to 10 loop9 r% A! I# w i" g1 I) y
Res:=sprint("Store_",i);0 E/ f/ B, ?0 Y$ g
if existsObject(Res) then0 K1 g" h7 x9 S& `3 Z# `- s, Q
Obj:=str_to_obj(Res);9 J% Z0 \6 j2 X( w) y7 v# T
Obj.deleteObject;
: M# B0 V- G( S end;; n9 {+ w9 v R5 B0 e
next;
& t6 I9 P6 F P( f --shengcheng Status:zimoxingceng
, @6 d; Q3 E3 E# }6 I* } Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
+ Z4 O) j( [0 r6 D Obj.Label:="warehouse status";
# D) t& V8 j0 L) c
6 F+ H O. g& s4 e4 E for i:=1 to WH_nums loop
1 R5 A$ _, y Y! _* j9 E3 i" f Res:=sprint("Store_",i);0 G' A8 U% @* ]1 ^! K' K7 s, D
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);3 d& H9 M1 p+ v3 d E
Obj.Label:=sprint("huojiaceng:",i);
4 s7 c9 U) W1 u- v+ Q& e Obj.xDim:=WH_x;
+ N0 U5 D: ]' i) J: X T Obj.yDim:=WH_y;3 Q; F" N( T4 ^4 C& }# Z- o
Res:=sprint("StoreData_",i);6 V6 J) i$ C. I5 M4 K# S* n
' T+ h2 Q% h8 w. I
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);, c$ J- u9 F* ^& [ c
Obj.Label:=sprint("huojiaceng:",i);% A3 m* V/ I8 z4 t5 W2 F
Obj.inheritFormat:=false;
9 l( s5 O9 t, `) T Obj.maxxDim:=WH_x;
9 E/ W8 \' k3 O+ j2 b Obj.maxyDim:=WH_y;
* T" z9 T y$ C/ F k8 x Obj.ColumnWidth:=3;( m3 W0 `6 @( R1 r; S
next;
% _8 f7 ]. y- @' s: I$ p+ O/ r' O4 T 7 r' ]( n; r: I6 N
.Delivery.MUs.Forklift.speed:=2;! U' q: H8 C6 b Q* R) F( e
WH_var.delete({1,Part_Nums+1}..{*,*});
}0 y" }5 R- {6 d4 l( c0 @ for i:=1 to Part_Nums loop- y. w. E9 _3 ]
WH_var[1,i]:=chr(64+i);( S; g. ?8 a0 ~! _+ I) f/ X
next;
/ c$ x [1 O2 e! o0 P# Mend;) q! B# _/ f, e& i0 y
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 ; o$ r6 R3 _7 ~ P7 [" Z
: E) x: m$ Q% f- O
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|