|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
0 m$ J; r* E0 n语句是这样的% l" N% @4 W# t4 b& V8 m9 p0 ^
is
+ K( x2 q. n4 b3 y, _; Q i:integer;
1 |/ z ~3 {, M: x Res:string;
/ s" { D- E* f. x6 J& ~1 ` obj:object;
3 i! @) L. t$ Ldo
' p! D: \! x8 V9 V/ ~+ r8 X! A if existsObject("Status") then3 n C6 g, d' G% C
Status.deleteObject;# I% y6 X7 {9 g6 x2 `- x4 Y2 Q
end;7 B0 `$ P& ~0 Z; k, E
for i:=1 to 10 loop
3 ^) {1 h" N8 C# N Res:=sprint("Store_",i);
4 I A7 I0 E) p7 [- q0 v' d if existsObject(Res) then
7 L2 u* u2 N6 w- m$ Q! f( g) L Obj:=str_to_obj(Res);( q \* [! H3 N1 G( }% ?4 c
Obj.deleteObject;
U1 J( D- ^) c9 J3 U! A& { end;9 R" b5 `* s# C# f# G
next;
8 P4 b9 W! `( \+ o* a --shengcheng Status:zimoxingceng6 h! ?4 q0 F: [1 r8 M3 c+ ?
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");/ |) p& h0 x( t( H; c- ?; w4 y+ v
Obj.Label:="warehouse status";
6 h7 M4 z& J5 Y; j* d6 Q4 q8 O, S 0 [: j! p0 `1 O$ l! {
for i:=1 to WH_nums loop
- Z5 B# h, H; q- x Res:=sprint("Store_",i);
8 w! O# u) Y2 |; m2 u' t Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
0 Z# M$ I4 R! S- s: u Obj.Label:=sprint("huojiaceng:",i);8 o" L# G! \3 }" R
Obj.xDim:=WH_x;1 z/ x4 x" R! R
Obj.yDim:=WH_y;
- q+ g' J8 [- J" e) |4 m8 A1 U; D3 l. S Res:=sprint("StoreData_",i);5 _: H% P/ C! N' c1 ]
$ y' K5 ~4 ^ r+ A9 |
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);7 s, o. l- x4 w O$ y
Obj.Label:=sprint("huojiaceng:",i);
' P" q9 a; h: Q Obj.inheritFormat:=false;7 y9 V1 G9 A) P \% g
Obj.maxxDim:=WH_x;! m3 x: f) Z- c
Obj.maxyDim:=WH_y;
+ e$ ^( T( M1 _5 a2 R4 `: |1 Z Obj.ColumnWidth:=3;
6 d% d1 E8 }8 S, C next;$ V+ C& P/ ~& y3 l' G
4 Z. ]" e* ^; ]3 f7 }8 q7 f7 Z8 i" m! G .Delivery.MUs.Forklift.speed:=2;
, b5 g3 b0 o6 A, `9 I WH_var.delete({1,Part_Nums+1}..{*,*});" `5 {- c3 a- S, r5 g2 N7 V4 N
for i:=1 to Part_Nums loop
5 ~# \) e9 ?( f1 Y3 d WH_var[1,i]:=chr(64+i);
, z, ^, S( S, N' l* i# J next;5 l6 F: P3 r J: k2 n4 s8 z7 V
end;
2 E6 s6 l6 a& @, G. k8 S2 T出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 ; f' o2 `# j& m# A
. y: s3 H: ?5 a |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|