|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
' [# H+ x! l. [, F X8 W# y5 e: i语句是这样的
/ F& n+ L, v) n" zis9 s$ P) ^1 ~1 Q8 l( R
i:integer;
' N% x; @; m% i# p5 Q; h Res:string;
6 V# I* a8 s5 @/ t obj:object;/ t4 N' f1 t. \8 k' o9 e; U7 Y, O
do
) m4 r8 W! e1 S; z% s4 o if existsObject("Status") then
9 B! z) V' F9 x Status.deleteObject;5 }' r: U. L3 u4 [/ e8 B1 M7 a. s
end;
6 ?! j* ^' w8 R, {' P for i:=1 to 10 loop1 U2 ?7 M) @( t$ f! a* g Z: V5 g
Res:=sprint("Store_",i);
6 V* P: _7 @9 ~0 A% o6 R7 Z if existsObject(Res) then2 S, d% e, S( L
Obj:=str_to_obj(Res);
0 \5 d- W g/ @! e' { Obj.deleteObject;6 k; h1 U7 l6 v" d9 f$ i& C4 _
end;
2 {& X s0 d- X; ~0 Y! k1 M next;
8 V' C8 R0 _& q3 z) j4 ^/ w* \7 o --shengcheng Status:zimoxingceng
5 B& s! w) ]; h; R7 h" s Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");5 F# ]( d9 v4 `" M
Obj.Label:="warehouse status";8 ]. H3 V/ s" {! n0 f: J
4 u0 P* z3 J: L0 u9 o
for i:=1 to WH_nums loop
5 j6 E2 x* d$ j' {; D2 i2 S Res:=sprint("Store_",i);
$ T; N% b" v4 ^0 q" E$ W- {5 c Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
8 f0 v; [; \ v( Y& o Obj.Label:=sprint("huojiaceng:",i);
! A, I/ Q$ B% s3 M( V$ l& Z Obj.xDim:=WH_x;
% v' o3 W- \/ s) X) Q Obj.yDim:=WH_y;
2 T8 E) n) E. @3 n Res:=sprint("StoreData_",i);) f$ V3 J! Y# r6 X' V; g3 _
( r+ e" e5 q: K; K1 q: V Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);4 v$ T) [+ f) q) V
Obj.Label:=sprint("huojiaceng:",i);
8 a/ L# c. D+ J' ]+ l: d Obj.inheritFormat:=false;4 |' K% F M# L2 I! j
Obj.maxxDim:=WH_x;; i+ t6 t' n+ K7 @7 \; W+ v" {5 y
Obj.maxyDim:=WH_y;
- r2 J4 W, `, ]8 s" l* q Obj.ColumnWidth:=3;# W. v/ ~4 `) N- S$ ~
next;; E4 a; y5 ]8 a5 p: o% o* S
3 o& x# O' B6 Y. |( Z .Delivery.MUs.Forklift.speed:=2;6 y: M2 ]2 Y( u* e% W, H) m) l* {: I
WH_var.delete({1,Part_Nums+1}..{*,*});) G+ z. }2 l" Y3 Z) }
for i:=1 to Part_Nums loop
0 h' Q' Q7 e7 m7 p" q WH_var[1,i]:=chr(64+i);
+ J' S. Y B; j4 ~8 | next;
2 M2 U5 O* Z' h# X) Kend;. a* F h& [. C1 ^
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 7 U- t5 }* p: V* G6 [ S
, z! a8 i' O6 B
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|