|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
1 |/ J' K: \) @- B语句是这样的8 |" B# p5 J% H0 d! ?& v8 X: f m
is
$ ~3 d$ K- q* i" m- @ i:integer;
3 n' g. h2 o: H' Q- G Res:string;
* u! c6 x; t2 o) m$ E% @3 G/ B obj:object;
- S1 s4 z: t2 a' S9 C/ g( sdo
* b/ G% a( L! P1 S i: q, p if existsObject("Status") then
3 X; o* e4 b) e4 `! ` Status.deleteObject;# e& ?' ?0 t, K2 [5 {9 p7 ~' _
end;' j& F0 U9 S& U) `
for i:=1 to 10 loop$ M% n2 [; b2 [1 w
Res:=sprint("Store_",i);
% l# s J' \ T9 q: I. I' b if existsObject(Res) then7 q3 b8 p4 c$ m* s& `# n- i$ A& I4 z
Obj:=str_to_obj(Res);) z6 a" h c3 `/ V! N9 i( j3 k
Obj.deleteObject;
+ q5 P- G1 Q8 [- i) X end;1 n) b! [ v, ]. D+ }
next;- Y2 c: \4 N- Y# [; q% K0 G+ n, b
--shengcheng Status:zimoxingceng
# V# |& r0 j0 o0 w) ]( s- ?/ ~ Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");5 z$ C" P2 {& ^' X7 `
Obj.Label:="warehouse status";' j1 v( ?/ [) V- k8 {, P/ P x
% N* u. b$ v% U; j1 P. f2 E for i:=1 to WH_nums loop
: ?9 o U6 u: l% S Res:=sprint("Store_",i);3 f& O2 }/ N, Z2 z3 h
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);! Q! y0 w! ]. ~- u5 |0 Z" x- `2 l
Obj.Label:=sprint("huojiaceng:",i);$ k# R) P' l0 L6 O2 X, M
Obj.xDim:=WH_x;
2 e' J1 b: t z% j+ A. X5 ` Obj.yDim:=WH_y;; ?$ t' ?- K, R$ W, n _
Res:=sprint("StoreData_",i);0 N4 S/ o1 T5 j2 O6 ]
( c/ ~% k# D& Z' V3 C+ Y
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);& |/ F% E1 W& T( Q A! H K
Obj.Label:=sprint("huojiaceng:",i);1 X/ l: D% t, b. `
Obj.inheritFormat:=false;
0 A7 z& S; t$ l. E/ d Obj.maxxDim:=WH_x;
6 [) f" ~! |# ]5 d5 F Obj.maxyDim:=WH_y;. |0 q) O" l# y+ p* C
Obj.ColumnWidth:=3;% i5 D- o+ Z) W$ G& M6 `% z4 W5 `
next;
" i& f) p& h; j4 i6 l8 H 3 y8 g- O4 |& m7 }+ g% k- t
.Delivery.MUs.Forklift.speed:=2;# V) K: ]% I' x O& N
WH_var.delete({1,Part_Nums+1}..{*,*});% U- G9 d8 y' v0 B k6 V# l
for i:=1 to Part_Nums loop
7 s6 @8 H# p; s7 v7 [+ F" ` WH_var[1,i]:=chr(64+i);
. F7 T: l# A) J: t k next;
8 k6 L/ U6 o1 p6 u/ ? iend;
7 k, w# q; r) N出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
4 m8 w" _# ^: @+ G' Y# W7 a. ?& J# e9 X4 G& o, s
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|