|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
$ x# W5 N$ o2 q. W2 Y( x语句是这样的0 K; p, B8 {" d+ m3 y- A' w
is, Z U/ u+ r& V* {0 e
i:integer;
) K8 E, N6 I9 m: _* _2 ^ Res:string;
6 ~2 u' z. ^8 K. c' W obj:object;
& x3 T- W- f5 s; ~$ m8 w$ ydo
2 M9 G. {+ c3 N# F if existsObject("Status") then9 y# }4 O2 U/ M! S: s; d
Status.deleteObject;
# @8 L$ y+ _3 {9 l6 Z' u end; s. L" V3 \: X/ S
for i:=1 to 10 loop
# @) T0 B1 A- w1 @ Res:=sprint("Store_",i);
! s8 z d- O6 g* |* A7 y' {- X# W% J1 K if existsObject(Res) then' P/ c1 i- \: q: X
Obj:=str_to_obj(Res);
/ [9 }/ P5 G& M9 d- i/ Z X$ ] Obj.deleteObject;
! V( Y5 m* {; x8 ] end;
0 L0 f: v. j( w+ T* C* | next;
0 T. x9 v8 J! E% W; w% f --shengcheng Status:zimoxingceng
0 ^, b7 b, F. _/ I Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");6 u. H9 c* A5 Y7 Z3 d
Obj.Label:="warehouse status";2 q! C2 |: t4 I2 e/ t- M( U7 Q6 m* u
2 x2 o. J. J4 u7 `( s' |' \ for i:=1 to WH_nums loop4 z6 f5 f% Y, o. i# a+ |
Res:=sprint("Store_",i);# X0 N" j$ {& O$ `7 w8 L
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
. B+ d- [$ G0 |% p3 a9 m% x Obj.Label:=sprint("huojiaceng:",i);
3 E4 I# E9 ]$ B. E7 O n Obj.xDim:=WH_x;
+ E# y5 O3 |" D& b! o Obj.yDim:=WH_y;
8 E! X9 U" s0 R2 D Res:=sprint("StoreData_",i);
0 i6 D7 h6 c$ u- e& Q, e
& m! d/ r# f9 X, A0 Q9 V) ` Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res); p, _* H: E/ `4 q; J4 C! [# p
Obj.Label:=sprint("huojiaceng:",i);# r: r5 {' ^, i& Q# S
Obj.inheritFormat:=false;( t8 h- D$ _* H; a, o
Obj.maxxDim:=WH_x;
8 r0 p {" [) |7 ` Obj.maxyDim:=WH_y;( S2 Y, B. U6 v. A: e& T
Obj.ColumnWidth:=3;' P& ~ E* C5 b, V
next;
0 p% w4 ~9 K% |$ @ : K9 V/ \0 G, i- A& f9 m7 P; l5 V# L
.Delivery.MUs.Forklift.speed:=2;8 ]7 ?3 m& E# H! Y
WH_var.delete({1,Part_Nums+1}..{*,*});" L* j9 d% m9 U; F. a: Y5 k/ q. J
for i:=1 to Part_Nums loop
7 `. \, v9 J$ t# M1 j$ v WH_var[1,i]:=chr(64+i);
1 U$ W' |$ n& J! q next;
- S B+ T8 k; B" Y$ eend;
) C, S5 B* k! Z/ H% F& p; X出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
7 h9 K. r% w) I
& h. v3 E& n( C" {, z |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|