|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
- Q6 z' D" E# ]3 c2 i5 z( q: y语句是这样的
/ m z8 V; @" L" S0 P$ d: `is
7 c u# l& X8 a5 y$ @5 Q! h' D( k i:integer;
) w6 E$ V' @- n2 I Res:string;, {3 f g! o; \; h& d" D
obj:object;: }3 E2 \% q8 `
do* b# b' {8 ~4 _; x
if existsObject("Status") then
: A! {7 [0 [0 `5 N& q( n Status.deleteObject;5 ~. f; S, @3 z" W# f; v$ ?
end;
/ c2 @- U- v" t for i:=1 to 10 loop
* D5 I: j! p" q Res:=sprint("Store_",i);/ A1 M h9 I5 G9 Z
if existsObject(Res) then
" Z% K- h0 _; |9 |3 X ] Obj:=str_to_obj(Res);
6 B/ Y) I. {; U; S, h( V4 | Obj.deleteObject;
+ M# o: H+ G" G/ G7 g+ n# H end;
! {/ t7 a9 d u next; `+ i! S0 m( x3 c
--shengcheng Status:zimoxingceng
( s# q* R E8 N" f8 T Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
7 y* p: J# [2 g1 \ Obj.Label:="warehouse status";
, r, p: v4 f, z6 [4 x% z/ ? 7 k- P, q: c M" R- M
for i:=1 to WH_nums loop
/ x2 q" d: h- F4 g+ V Res:=sprint("Store_",i);
3 h0 }; P: l% E4 P8 Q Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
* U& c4 m q3 ^1 p; l Obj.Label:=sprint("huojiaceng:",i);. y9 q+ s2 f, n8 f9 v: e6 x- f
Obj.xDim:=WH_x;6 m9 }! x8 b2 y- a. |
Obj.yDim:=WH_y;2 F9 q* Z, [2 [: \. l- ]: L
Res:=sprint("StoreData_",i);
) i. q1 |% }- @6 Y5 q* Q: ^- A$ Z 7 T: U0 e; J* x |/ _, n
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);, X V6 G. O- `& e2 m3 W
Obj.Label:=sprint("huojiaceng:",i);& K8 I' O- g" `6 s9 D' w4 Q: A g
Obj.inheritFormat:=false;
. C7 d+ x& L) y Obj.maxxDim:=WH_x;6 F: ^2 h6 n, Q; p. F! w
Obj.maxyDim:=WH_y;
$ u! a& x& d; i3 H' o2 J& t Obj.ColumnWidth:=3;
7 R6 Q, w1 a& @- G$ @ next;
# Z% u6 K/ X9 c! |6 @$ j+ w% P! e" W
t2 J" P9 j) i+ t. x: s8 ^; R- S .Delivery.MUs.Forklift.speed:=2;- p; a3 B* R0 R K8 c# q
WH_var.delete({1,Part_Nums+1}..{*,*});
8 f4 ^3 E! D& K; T. t* n+ L2 _+ h for i:=1 to Part_Nums loop0 Q& u7 A l- }% u% ?6 z a" A
WH_var[1,i]:=chr(64+i);( T: t( K p. Z3 i+ ^
next;
% u( m* E2 V8 w2 F+ u/ ~& Pend;2 \" o% m( H. W( W8 ?. Y
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
0 p1 t1 }! }- N8 c% y* p- J
& E0 B; l( [7 G+ J |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|