|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
5 `" c& c+ w; O! e4 _0 G9 e. r语句是这样的
0 Q3 G2 h: J6 C; X( [$ L" a- Y$ f Dis
! Z& V6 i: w; `- R9 n/ x i:integer;: x& L$ f7 N- V* {
Res:string;
# P5 S% I! t3 L9 x# V obj:object;
* D) q* @9 A1 K& jdo
p' o; V" e, D8 G2 ]! [ if existsObject("Status") then
( ~; y8 D2 z2 U5 D7 P' ]. Q6 T Status.deleteObject;- [" H" v1 P1 z2 K9 @
end;# a, M4 Y9 ?* F' V& I/ J
for i:=1 to 10 loop
. [& j! t# q3 b' a Res:=sprint("Store_",i);8 ]- {$ i$ X6 Z0 c) v" r
if existsObject(Res) then
" F3 L h2 v7 z% ]) T Obj:=str_to_obj(Res);
, ^! H9 l( ?6 { Obj.deleteObject;' R/ Z. w+ v5 n1 P# Y& N* O1 B
end;/ b9 T9 h* _# J& ?3 P3 x$ k2 {
next;' @7 C- w4 L" m* }2 W: [$ v/ m
--shengcheng Status:zimoxingceng
3 h9 ^, s5 e0 c" p" w& S% u Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");6 Y: T- u8 h9 n* V9 d
Obj.Label:="warehouse status";
" G" ]( \5 _' S9 e/ t4 A% l! l( ^ % G/ L* v3 {; a; i, k6 U8 n
for i:=1 to WH_nums loop
2 ]2 O" K* g$ _% B b) J- E! Y Res:=sprint("Store_",i);# S* t8 d8 ~/ Y' U
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
. h" D' L$ S3 a2 c/ e' ? Obj.Label:=sprint("huojiaceng:",i);2 y/ S& W( e. n& d1 V' |* `, {5 T
Obj.xDim:=WH_x;7 g- ]- J2 Y) N& m% W% r
Obj.yDim:=WH_y;4 l8 a0 L3 \) \4 P8 R( w
Res:=sprint("StoreData_",i);2 }1 a. X$ G; _3 j- A
" @9 w( ]% s A5 t3 d8 ~
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);' ?( [; m& c+ }2 u M; J' l* @
Obj.Label:=sprint("huojiaceng:",i);
. A, S8 n( {, j7 h Obj.inheritFormat:=false;7 p7 c" i/ c1 B
Obj.maxxDim:=WH_x;
# M- o8 ^$ s5 n4 w7 u4 f Obj.maxyDim:=WH_y;) G) B3 `0 `, o
Obj.ColumnWidth:=3;
8 r; J+ P. a( n/ G- H$ p: U+ j next;
; a6 X3 _, u" H! R @ 5 J4 C' o2 G+ R7 j1 S' v% Q
.Delivery.MUs.Forklift.speed:=2;3 b8 g2 \6 o1 x7 ^
WH_var.delete({1,Part_Nums+1}..{*,*});
; _. x' w# Y8 B$ r: v for i:=1 to Part_Nums loop
& k6 y$ k( Y4 ]; T* X5 R WH_var[1,i]:=chr(64+i);
0 J1 x( J. r) z: g0 V& ^$ i next;
9 y( ]# u+ @' I6 h4 Q. O, h* Vend;: Z8 \# Q7 ?( N! ]( Z2 Y5 x$ Y
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 - f9 y& h. Z* b0 N$ f
, X0 I6 d& ]/ s5 G& H* v9 P
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|