|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。5 c) }4 `4 N4 U3 c" G9 `& t% b0 O
语句是这样的
: w5 L$ t& p, E! |! }. i% q; T$ Nis
0 U* u) P. |+ {: J( k9 } i:integer;; e& D2 b. x) b2 ]# v6 n" u- w
Res:string;
w% S+ b1 a- W' b obj:object;$ J. U2 D: `" t' R; `4 |1 Y; H
do
$ P! s! d6 D" I9 W7 ~8 s3 R if existsObject("Status") then
+ N! D! i/ L# a8 i' Z Status.deleteObject;
, ~8 e6 t! [7 F3 {: g. i5 t end;: O$ _9 s$ Z; m% W. x% {6 Y8 |$ y1 T
for i:=1 to 10 loop
( ?7 w; C7 z/ } ^" _9 } Res:=sprint("Store_",i);
; x1 D' L' M* R$ O- }' N if existsObject(Res) then, P0 E! A- K- Z
Obj:=str_to_obj(Res);# u h9 f2 b" X
Obj.deleteObject;
9 w6 U* @7 t/ K: c end;: u% x8 ?0 `3 e+ z* O6 a
next;
7 Q0 Q/ K5 N1 M6 V5 M% ? --shengcheng Status:zimoxingceng+ g. K% F8 w2 c% l) Q
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");" [2 Y- H; o! ~$ h4 s7 l A+ T
Obj.Label:="warehouse status";
* l" Z3 Y- R7 |; ?9 h9 L- x4 f 3 P& z* X& V# ]1 Q3 Z9 w
for i:=1 to WH_nums loop
/ \: U( t# _ I+ W Res:=sprint("Store_",i);+ I M1 U. {" g1 q3 ]
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);, w! _3 ]( J- g/ D' c. L% b
Obj.Label:=sprint("huojiaceng:",i);
& {6 Y) d K- I2 K. G# [4 V. y1 h Obj.xDim:=WH_x;
6 g2 i' V- q: J3 \" S" a, q3 m Obj.yDim:=WH_y;' h5 b5 a2 j1 Q
Res:=sprint("StoreData_",i);
; _% u6 ^4 m$ c7 b0 f8 J 0 y z& H9 d' V2 B7 R6 m t6 [
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
. w4 a- M8 q1 w2 j Obj.Label:=sprint("huojiaceng:",i);
6 d0 E" J1 W( ]! s Obj.inheritFormat:=false;5 Q: h$ j0 p" y' R
Obj.maxxDim:=WH_x;
7 \" b- y# \2 I5 _8 K1 k3 I; E Obj.maxyDim:=WH_y;* N9 Y0 ?2 y3 F+ Y" y* M
Obj.ColumnWidth:=3;
1 F, Q- z- i$ O7 h' R8 t' M next;
( m4 Z( k3 J! o1 p- o
7 j. }/ R. f) D .Delivery.MUs.Forklift.speed:=2;
r) S0 I- x3 q1 v8 E: O WH_var.delete({1,Part_Nums+1}..{*,*});& H( ~5 z2 f8 f2 d* W: s9 s7 _
for i:=1 to Part_Nums loop' h# S9 e: s& ^+ I& F6 n
WH_var[1,i]:=chr(64+i);
% a3 v' ?, w+ n0 V next;' {% h+ I' s* ?4 n. r9 G
end;8 V+ P6 Q `8 G" ]/ y7 @
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
; P p$ I8 |. c9 I7 A4 R( f. x
1 R" X- P2 K' b, t- `5 D) m |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|