|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。) p+ ~. l5 z. r! q" I% N2 t9 U
语句是这样的* y6 T( C; S/ F' B
is" P" i D# I3 n/ y5 b/ l9 S
i:integer;4 t( x, G7 V! W
Res:string;8 A! X! [6 g7 ?. ^' i4 }1 K u
obj:object;1 @8 M/ f0 K2 w4 |
do# w6 S* f( l7 I( _( P
if existsObject("Status") then
7 b2 a v5 W% c/ o5 Z' f( m Status.deleteObject;+ S9 g4 i8 t$ v; H& E3 Q
end;
! _5 m' N8 Z. B9 y2 z for i:=1 to 10 loop
; [5 T' U5 H l w/ ` Res:=sprint("Store_",i);; n5 s7 ]1 f3 M# X
if existsObject(Res) then/ m$ m. {# X' s& B5 q: @& E
Obj:=str_to_obj(Res);
7 S' r9 u! W) s% ` Obj.deleteObject;* U9 F- ?) W" `4 S( w4 [
end;
! C z7 i. j4 ^' ] next;
7 G: v4 s% t, o! V. A9 T" e --shengcheng Status:zimoxingceng$ E' l5 e d, J
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
9 r8 }7 K T- T* P5 F" q Obj.Label:="warehouse status";
# s7 J3 T' e# U- B+ C: K$ d% Y * K2 P+ g0 P% H. {/ h3 R( V2 e
for i:=1 to WH_nums loop3 g9 _. H" ~- V/ R ]: h
Res:=sprint("Store_",i);
( X# @( S# l2 X) X$ `$ \7 V) j y' k6 | Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
7 e: ~ r& M' o7 m4 s) T Obj.Label:=sprint("huojiaceng:",i);/ |/ ~7 y" J/ L, t7 |5 ~
Obj.xDim:=WH_x;
2 `3 O0 \; q. g, ^: R* H5 _ Obj.yDim:=WH_y;
, h6 @, w$ k' n+ ?2 y! @ Res:=sprint("StoreData_",i);
4 n4 v* e; s, r& |6 e2 c
0 S. S# H! {- q3 k+ W Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
( G; c; V7 O2 s4 f Obj.Label:=sprint("huojiaceng:",i);3 ~& _& \/ g3 y+ m4 o$ S( J5 v6 {! C5 t
Obj.inheritFormat:=false;* ~) M# N; M# E4 `; n
Obj.maxxDim:=WH_x;
) r3 e8 D' f6 ~' n+ n Obj.maxyDim:=WH_y;$ }: Z: A5 J5 f# M
Obj.ColumnWidth:=3;. ^3 y7 r& K7 d" }% l' q+ \
next;7 ?) q0 v2 V1 Q4 ~* F* n* D
! H2 |( g. G" o$ F5 i, i
.Delivery.MUs.Forklift.speed:=2;! {! _. C% A- i" l5 ^
WH_var.delete({1,Part_Nums+1}..{*,*});5 E& z) @5 [: r+ U6 b& j
for i:=1 to Part_Nums loop
% o8 S9 W. y) u$ Q) m. o5 K& ]3 R WH_var[1,i]:=chr(64+i);' C; Q( v$ ~& y }% x: E
next;
. U# }- V2 R2 f* send;
& s Q* j: u% J出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
7 d* A; v: ?- Q) R, ]& |2 i0 T6 i, ^5 K/ x% H/ M% v- ?
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|