|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。- |6 \2 d; X* o8 |( r5 |
语句是这样的, n' P1 y3 v. a& i% K) d. Q
is
' G; d# V% ]4 y5 Y, O% E( |; q; d i:integer;
& z. J0 a, ?. W$ U: J/ o Res:string;2 P. V5 p& w. X% n9 y- `
obj:object;8 X% H& \2 D9 H: W8 |3 ?. l& t
do$ P1 z2 c+ a: [ _, |1 N1 g2 t) @ P
if existsObject("Status") then; ~1 _* z5 a6 A7 p( g7 D) D! v
Status.deleteObject;& a8 l; Q+ K0 _9 t. I( f
end;
1 q0 x1 i$ A7 z5 F for i:=1 to 10 loop
$ T+ |3 \, y$ c% I1 u Res:=sprint("Store_",i);
% J* S7 k( Z+ ?" P( i3 G if existsObject(Res) then v" C5 t v9 Y1 k
Obj:=str_to_obj(Res);7 g# r3 o8 k4 p0 @* h* e/ M2 x
Obj.deleteObject;* R$ y" B3 H9 p+ b$ {( L8 L
end;0 i6 q+ i0 h6 h2 ^; W" Y; ]
next;+ P3 P1 s, j! d& N0 A
--shengcheng Status:zimoxingceng
* D, Y( u5 l7 f# D" J) V1 U Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
& x0 R. r3 W, a Obj.Label:="warehouse status";
0 ?1 L- K4 O; c( F- |
, y5 Q _1 s4 ]% ~0 O8 u for i:=1 to WH_nums loop4 R9 h' i& m/ q3 j5 ?
Res:=sprint("Store_",i);
5 G$ ]: o- ]* M) g Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
# v" S% {4 L, f! X& ]# o+ G. h- J Obj.Label:=sprint("huojiaceng:",i); P: q) d5 q& U$ M7 P
Obj.xDim:=WH_x;
- ~; [$ O9 B% d) V: Y Obj.yDim:=WH_y;0 M* ^9 ]* P" ^' y Q/ t3 f) m
Res:=sprint("StoreData_",i);
/ f3 H) d1 ~) r; F# e- Z: N+ Q. F ' J) C+ C l4 Y/ o& w9 T
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);# n7 O' Z5 w3 T& G: f* B3 g
Obj.Label:=sprint("huojiaceng:",i);' S" W `' J8 X
Obj.inheritFormat:=false;3 M8 D! g: {/ W. H0 T, [
Obj.maxxDim:=WH_x; B4 y% Y2 x, E1 k( i4 j, Y
Obj.maxyDim:=WH_y;
5 V. \# x6 S1 @2 N# B% y" o; i Obj.ColumnWidth:=3;
6 u' T4 K( a$ `9 b) [8 A; { next;
d8 A0 n+ |) n7 _4 Y, h 1 s' I8 [3 w; F
.Delivery.MUs.Forklift.speed:=2;
6 u) L, S5 ]1 | q WH_var.delete({1,Part_Nums+1}..{*,*});
% r" ?6 ?7 G6 l: z- a for i:=1 to Part_Nums loop, L* H9 r( c; ~, C7 H$ j: o5 s3 S
WH_var[1,i]:=chr(64+i);
C" w: B+ ^+ d4 x5 C0 e' Q next;
' M, g( f, l) l, Bend;7 Y+ M& j P* f2 |2 K
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 + Q; @1 ]. h G; T2 u+ P" t' L+ k
/ H4 U" E5 x/ _+ Y% q% h |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|