|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
2 r5 R1 c" l) {, r4 o' {" [语句是这样的8 W, l8 l7 i/ j$ a# g, w) R$ o
is
) R, h! K* _6 W0 G' a W) x- S: ^ i:integer;' N( }# w- @0 y6 L: P; Y
Res:string;
1 C" x" V# r9 y* i/ A" g obj:object;5 [- e3 K) d% \/ s0 H. z1 v
do
; L: T+ X8 \. h) v* d if existsObject("Status") then
, h& B8 `. B3 P2 r Status.deleteObject;) H9 d- w+ o3 T
end;
g$ | j% v7 {( ^- O for i:=1 to 10 loop7 ?6 J h* q; L* l+ z* q, Y
Res:=sprint("Store_",i);
. s! q' s- H" s! [ if existsObject(Res) then$ g( C( u$ c! Q! n, R
Obj:=str_to_obj(Res);" V8 @$ x3 L" s$ L
Obj.deleteObject;
, R5 j! P# h( ]/ | end;0 n i: X" t8 [! X7 w; X8 B/ y! [
next;
& m$ k3 d$ u. t6 ^% ` --shengcheng Status:zimoxingceng
0 `; U2 A. D7 Q; o$ b Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
. k6 \7 ?- r3 d Obj.Label:="warehouse status";
6 l6 g( ]& R1 @( @! d) W7 `7 r
: p. j& B- _( Y& z' y$ M0 u( V; A; h for i:=1 to WH_nums loop
4 b4 d# Y; ^8 X7 v Res:=sprint("Store_",i);0 Q9 \9 w- B8 U; w
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);+ ~, B F B' M" {, o
Obj.Label:=sprint("huojiaceng:",i);
2 x; O% Y+ A/ B' r. [ Obj.xDim:=WH_x;
9 w9 B* n% S) T8 Z0 o Obj.yDim:=WH_y;
) J5 T% |6 D: y% h% i9 q+ @ `' G% M Res:=sprint("StoreData_",i);* m. I3 P9 Y9 q: E, R2 q
* S$ x3 S& Y# ~3 H- g1 I. v6 u( H# N
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
1 |; Y- s9 @6 _& X4 { Obj.Label:=sprint("huojiaceng:",i);
- _! |# z- D5 U' S Obj.inheritFormat:=false;( x3 p+ d2 V3 |6 n
Obj.maxxDim:=WH_x;
0 A2 s7 _5 c2 ~- x Obj.maxyDim:=WH_y;9 ~2 r5 y4 C- g0 G8 F
Obj.ColumnWidth:=3;6 u+ E% K8 X% Z
next;6 Y* ]% h) { q2 i
$ F8 q) z2 ?' I* G/ q; r
.Delivery.MUs.Forklift.speed:=2;# V1 R& w( [# A8 U D
WH_var.delete({1,Part_Nums+1}..{*,*});$ p( K; N0 \! A, |) |
for i:=1 to Part_Nums loop4 w. w6 Q2 T: n) A5 e# w: g4 ]
WH_var[1,i]:=chr(64+i);
# q4 \# @; A) [' z' P next;
+ s7 l' n; e+ [3 W ]7 _) ?7 \end;2 n' u* m1 W* B# E
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
\3 p" |- w( L
" G+ Y, m4 _2 o0 X. ~( b |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|