|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
& p4 ^( s9 F# d1 V2 o4 p( A. m9 M- e语句是这样的
6 g- ~) i( V( q8 b+ |0 iis* u7 P1 ?( P, ^0 [
i:integer;
: u5 b5 n7 f* f& W# j Res:string;
: A0 X) Z# [' H obj:object;. [& ?/ Q8 W7 k3 N# g
do" U5 c2 f; V$ m5 l
if existsObject("Status") then
' H' w" } o7 Q/ _, ~* n y: x Status.deleteObject;
$ q6 p) ]0 _$ Q% U) t7 M end;5 Z- z% N2 [" q! Y. C- u! }
for i:=1 to 10 loop
" r) w' b9 W! H+ l% Z5 _ g) M Res:=sprint("Store_",i);; [" U Y5 M& W* |" J
if existsObject(Res) then
+ {! R& Y/ o# Y8 o3 x6 J3 y: b Obj:=str_to_obj(Res);. b# M! z1 m+ g3 \3 R0 H2 |, a
Obj.deleteObject;
! C X/ Z ?8 z( ^3 Q: B end;5 q, A" M! u! _$ v! _; Y% S z
next;
; W& M6 c' T( \$ d --shengcheng Status:zimoxingceng
1 w* f- @# P" v0 H# u( k9 B9 K Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
5 c) v# O% F6 o( o( W/ M/ ? Obj.Label:="warehouse status";
$ J7 S5 M- c z% X& G" a ( i9 x' ?5 j+ S+ V
for i:=1 to WH_nums loop
% J6 N- k1 T$ V# C5 Z' w6 P) N! h Res:=sprint("Store_",i);
5 j. M* t' M: P; }; t Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
. J3 v) ?7 \* U+ |1 u Obj.Label:=sprint("huojiaceng:",i);0 I& x% }1 A( @9 v# U) o
Obj.xDim:=WH_x;- g# P. D. i) F5 C. X( g" C
Obj.yDim:=WH_y;
# E5 ^3 r1 ], m# {" e" l% F Res:=sprint("StoreData_",i);
9 g W7 s A' c% s 8 Q' H: U U% o! g0 k4 w6 b
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
+ [% w! |& t. Q6 ^ N6 i5 s Obj.Label:=sprint("huojiaceng:",i);
2 a5 T8 [8 n5 e/ U Obj.inheritFormat:=false;
& v! e! b+ I- H" a3 V; y Obj.maxxDim:=WH_x;* Q+ N% T9 b" ]$ j3 B: M* c! H
Obj.maxyDim:=WH_y;
5 m6 Z9 A' g* s# ~ Obj.ColumnWidth:=3;* S; I$ c3 V" ]$ {1 n& {
next;
6 d' U$ r5 @" J, c, n ) Y& s" q! S# |' z y+ z
.Delivery.MUs.Forklift.speed:=2;, m) m! c8 L* c3 E
WH_var.delete({1,Part_Nums+1}..{*,*});! K; M4 t. c6 Y4 ?
for i:=1 to Part_Nums loop
7 V2 d2 D5 _+ K2 T WH_var[1,i]:=chr(64+i); L( `' ]" Y" A* o
next;' v/ b; F, I* _: W+ P& k
end;) G( \ Z* Y; b7 i5 r9 V5 @" ]& v
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 - w( Y, x9 Q+ E- x2 B. M
2 \" M0 g5 I7 N5 t) Q3 _
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|