|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
6 v# w" J2 `, a1 P- j3 O5 T' h) `语句是这样的- s8 E: H% a% l* z5 u% e& W4 b
is
( N0 g$ _9 H. a1 ~ i:integer;: `0 H9 Y0 s) c% F9 L9 f
Res:string;
. H q+ g- {) M& ?# J) B obj:object;
# o% y- S! ^6 Q# ]do/ R$ ?* R2 ?1 O3 k
if existsObject("Status") then- N0 n" d+ I. E* s
Status.deleteObject;
: R; k/ L7 z) } end;
& ] [/ ^! D8 r4 _5 p; j7 d- I9 | for i:=1 to 10 loop
4 s6 D& `( Y$ B Res:=sprint("Store_",i);$ u$ F" @( p, U
if existsObject(Res) then0 b3 }6 O' R: F. _: @9 G
Obj:=str_to_obj(Res);
9 u, K( S& E# Z% w$ d6 y; v Obj.deleteObject;4 {4 q6 {+ C7 {% a/ a
end;
( H9 ~6 o/ e9 V: [3 [ next;& ]6 {9 W6 a5 O( g
--shengcheng Status:zimoxingceng# \# w! v9 l6 p, q* y
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");. a. m# k" N# t( O, d$ w; \( A
Obj.Label:="warehouse status";
8 f( l- j& P3 u8 e$ t3 u4 N
' W/ |7 S# p9 S4 k; O for i:=1 to WH_nums loop
. ?% A2 P8 p& s' S Res:=sprint("Store_",i);
( l3 N7 ]& Z& D Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);& ~ l' U, E% b$ D0 F& @4 J+ ?
Obj.Label:=sprint("huojiaceng:",i);
8 t$ n& h5 K. C9 e Obj.xDim:=WH_x;" f# y- ^; `# `7 P- h. D8 r
Obj.yDim:=WH_y;
% f6 a" \( }5 S2 D- u e8 Y4 o6 ~ Res:=sprint("StoreData_",i);
4 h# t6 r* S+ _! A6 \
/ x; a" _$ W* U Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);: Z3 l/ b) H0 G
Obj.Label:=sprint("huojiaceng:",i);& N9 s" A* T& D% P
Obj.inheritFormat:=false;: I- l' g0 a$ L7 q
Obj.maxxDim:=WH_x;
/ a, ?# L9 d7 s* H. q Obj.maxyDim:=WH_y;
7 Z4 l- r! ^# [( R- Q Obj.ColumnWidth:=3;2 {! I; G5 f& S# k% _! K/ r
next;
; a! ^, T# \. ^' v 7 Z% R" n4 _* F2 @
.Delivery.MUs.Forklift.speed:=2;: d& `* A! U1 f- G
WH_var.delete({1,Part_Nums+1}..{*,*});
! H/ W! K& M' a. X for i:=1 to Part_Nums loop r- a4 t* }- L3 x& B
WH_var[1,i]:=chr(64+i);
( w9 o, E/ H+ ^) [$ W next;+ p+ c& p- Q/ I. x; s
end;
8 t5 l! X6 ~- B! F- I出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
7 D$ p& k3 o' `3 a* C5 {: y& k/ m4 }+ O) d9 d& ?$ f; f
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|