|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。: g$ a* c# ~: a0 a) W" ?' A t* D
语句是这样的* ]' _: I3 j+ j& h6 F# g
is$ n- `, a0 c+ m4 P/ M6 `" T
i:integer;
5 i* d9 o) S0 Y- c9 M) N0 C3 D1 U Res:string;
" R" G7 T& {: K' N+ R) e" u obj:object;
. b1 F$ o8 v' M9 qdo
/ E! g- W1 ~: A+ y) r if existsObject("Status") then3 W. {4 G" h+ f. q3 l' b
Status.deleteObject;7 B6 s% o) ?2 i" u2 o$ B& l
end;+ D) j. X% l, r8 P) I9 T7 m) m
for i:=1 to 10 loop& N8 D' I$ Q8 y$ b8 O+ e/ P& M0 C
Res:=sprint("Store_",i);6 A+ {* Z3 h+ y( P% u$ f
if existsObject(Res) then4 y! \6 U j1 ]# L4 G
Obj:=str_to_obj(Res);
& ?% w: B% B! z! y3 Z( z8 ] Obj.deleteObject;3 E' {" D! j, o) Y
end;. N, {4 k; c: \7 [, ]; w, O: c
next;
3 n3 M- a9 ^! K8 i% p% y --shengcheng Status:zimoxingceng, ~" g$ g9 i; Y. W
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
- h2 F: e& g0 s- W* A5 ~' d Obj.Label:="warehouse status";" _) {9 f4 k$ _6 L( s
- L& C* \; f( q' |2 ?" D+ p
for i:=1 to WH_nums loop
2 F6 V& Y3 q2 {$ C5 _* L( {' V Res:=sprint("Store_",i);1 w- _) R" }' [1 L' X7 W( d5 q
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);/ C& A9 j6 Y# Y( L( o/ w4 h- w
Obj.Label:=sprint("huojiaceng:",i);
+ t) s# }( z" q4 v% I3 q Obj.xDim:=WH_x;: i5 x/ y/ ?, g
Obj.yDim:=WH_y;
4 C$ x$ D6 j% U/ X2 u9 o7 B& {+ T6 V Res:=sprint("StoreData_",i);
: X% ]7 m6 O' e: j% e9 m
# E: j ~5 L, w! G& ?3 V Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);7 d9 x& \3 ^& g) o% Y2 D
Obj.Label:=sprint("huojiaceng:",i);) k- K I/ Z) J9 r
Obj.inheritFormat:=false;
8 E9 k+ _0 Q9 |* u0 N Obj.maxxDim:=WH_x;
5 y% e- E+ b0 \, | Obj.maxyDim:=WH_y;
- |) h* o7 `. j3 I7 }2 x Obj.ColumnWidth:=3;
" R+ f" }+ O4 e5 |0 l! }" Z% B next;
! F% {) K7 `, E0 w" v 8 H4 r9 H2 j' d9 }# x5 \. W
.Delivery.MUs.Forklift.speed:=2;' A* X( U$ r. {
WH_var.delete({1,Part_Nums+1}..{*,*});3 u. Y {9 U x- s W
for i:=1 to Part_Nums loop* t# \/ T$ R' e* J; K
WH_var[1,i]:=chr(64+i);1 u" I+ J, G2 F& C. n3 h
next;# A; \# N" ]: E
end;
1 H) G) ^& I2 I1 K2 ]出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
3 }' z9 S# G2 @; a" R- c g: P. h6 ~1 j9 Q
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|