|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
( D P/ R' U- I0 b2 V语句是这样的) w; r) |& G; o6 b t$ I+ j4 P
is
2 v" S' R0 R( h+ ?0 I i:integer;; k( `& h) F( G+ b
Res:string;# C( C, ~- F0 d
obj:object;
S& Z- @8 |: b l0 Ndo
5 ?8 P; K% q3 d, F if existsObject("Status") then
7 {" |$ r( F+ n Status.deleteObject;
. x& W' C2 m. x' x1 s$ P end;0 v3 y( o1 g7 T9 x
for i:=1 to 10 loop
/ d' Y+ V, y1 J9 C Res:=sprint("Store_",i);3 s/ I; \- H0 K' _: l( P5 r
if existsObject(Res) then; I* i" z7 @ a
Obj:=str_to_obj(Res);# N3 T( r- [( {' h9 m3 y
Obj.deleteObject;
{! w( Y# J0 W8 ] end;& u r; H4 T( `! l$ K- N$ |
next;5 k3 K4 e% N6 o$ y5 s% A% f( h, f
--shengcheng Status:zimoxingceng
( U, v, f$ V% j# W% ` Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
I o3 o# L6 x# C& `; X Obj.Label:="warehouse status";
* R. `3 { U/ n + ?8 u$ S+ ]/ ?3 A' J6 U/ ^0 o
for i:=1 to WH_nums loop# W; @; W; C* H7 ]7 D+ s
Res:=sprint("Store_",i);
1 x5 B$ C( Y' [& g0 C Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
2 K: s4 p1 l( G# D1 @& |/ M( p' H& t Obj.Label:=sprint("huojiaceng:",i);, l1 n( I! F4 e1 p2 F1 I# p
Obj.xDim:=WH_x;
0 f, J& V& V1 B5 ~& A Obj.yDim:=WH_y;- l3 I. `) n9 w) @ ]
Res:=sprint("StoreData_",i);! g0 W4 k1 A& D; A' s
& \1 N- {$ k3 [" ` Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);9 x$ \% D& ]* l# I0 I/ k; j0 P
Obj.Label:=sprint("huojiaceng:",i);5 |- b1 u: _: [
Obj.inheritFormat:=false;3 \; f; P$ \' o+ T7 I9 ^& }1 q
Obj.maxxDim:=WH_x;7 Y5 u# I; F( D
Obj.maxyDim:=WH_y;
9 e* j0 ]8 J! L6 \ Obj.ColumnWidth:=3;
8 S4 S; @+ x- v5 q/ ?! a next;
" n; G3 \; U: Y7 c8 i
& T4 N" j; P4 _/ Z% @5 i9 K" n6 |# I- | .Delivery.MUs.Forklift.speed:=2;
! S4 z% c/ ?% l" W WH_var.delete({1,Part_Nums+1}..{*,*});9 {( E. B! b( n; }
for i:=1 to Part_Nums loop+ T; |& g1 k/ H/ w9 [) i$ G
WH_var[1,i]:=chr(64+i);
& B' P) R9 J( {7 f next; L4 M* J% c( o7 v# X
end;
# M, b3 X9 Y" x5 u( y$ D- u% S/ ]3 l出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 2 q F: x# G7 I
0 S( U7 o6 @! ~8 j! a* Q
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|