|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
/ T2 K1 y8 [5 t0 J8 y- n7 n语句是这样的
$ a4 X% o& O* u3 W5 F1 ^7 F4 {is. }$ K1 y$ O9 S) s+ J4 H
i:integer;
- m) |7 o) s6 |6 H8 Q Res:string;
+ `3 j& L! T/ H" J7 D) w! v. P obj:object;/ T& g% E( o! A% \
do
+ {4 I% T9 }3 u4 T if existsObject("Status") then
9 w$ ~% C2 s$ l0 s/ ~ Status.deleteObject; A+ ?+ z0 M2 W" Z
end;0 |8 g6 j p. _; _
for i:=1 to 10 loop& h' b [7 K7 m, z
Res:=sprint("Store_",i);
- N0 u& Y, l4 h2 X v if existsObject(Res) then
, r% |/ q) c4 Y' ?) t Obj:=str_to_obj(Res);
; R7 n1 p- p: ~5 F, M- [ Obj.deleteObject;
; z& I2 ]! B* b0 B+ t end;
( w$ V+ T& y, L: R% q% K next;7 ?/ o4 H: n- `/ k, m
--shengcheng Status:zimoxingceng
- A4 x) z# V7 A) r( u7 A Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");9 y" x# O. y @; H& I+ {. G
Obj.Label:="warehouse status";
, ]! ?) r/ ? @# S# S. u8 D& x * I9 K: n, m- z8 r ~2 Z% l8 v/ f
for i:=1 to WH_nums loop
7 } q- R" k3 c+ L Res:=sprint("Store_",i);9 o7 I1 s9 b0 y9 V0 c& U$ J0 I$ T
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);/ N/ G/ `( Q) r, J. A. _
Obj.Label:=sprint("huojiaceng:",i); }7 G' _( R4 Z8 g
Obj.xDim:=WH_x;
" ~/ ?3 @# C$ m7 O) }7 ^ Obj.yDim:=WH_y;: A7 `, ~5 ~; `+ X( i( Q
Res:=sprint("StoreData_",i);" z+ Z: n& Y1 Q2 l2 |2 }0 V6 N' Q) L w
) U% R& \. T' \0 a& c
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
: [ [/ K' ?/ h* Y, d4 h* ^( d Obj.Label:=sprint("huojiaceng:",i);
9 p. v" i2 Q- o' B" o Obj.inheritFormat:=false;
% P9 S( u5 d$ O7 `1 [! N Obj.maxxDim:=WH_x; E5 l% }; O) t" N8 a
Obj.maxyDim:=WH_y;8 x4 B7 _2 I1 V( K: O
Obj.ColumnWidth:=3;
+ J) v/ Z3 ]1 d0 Q next; s- s. o9 Z) s! A4 R- ? [
. B3 _3 _- O c- z
.Delivery.MUs.Forklift.speed:=2;
# p0 T) n5 v& q: a1 o WH_var.delete({1,Part_Nums+1}..{*,*});
o* n/ m. D6 p3 V for i:=1 to Part_Nums loop4 Q& l# W' y4 L; d( n9 X' c
WH_var[1,i]:=chr(64+i);6 D. K8 y. Z2 d# E2 n/ \% n# R
next;
( a0 E5 g& y: ^' h! s9 ^end;
8 @( H/ w- @# o; H! y出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
W9 u4 h& f7 C; z8 ?( P
! O7 t' ]. S Z' U4 w |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|