|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。; t# O7 G2 p! j' {8 u; P
语句是这样的2 v5 @! V$ x u. f- j3 O
is" c& j; E% C9 ]
i:integer;
8 A7 Y1 N% J# ]6 P5 P( \+ h Res:string;: R% Q6 p) e1 N) u N7 \
obj:object;
+ [# I& q; C7 n4 p$ X, L( W% d: Gdo7 w9 h* N4 ?, J& c* z! Y
if existsObject("Status") then3 S& f/ q0 C# _, \- u+ B
Status.deleteObject;
: ?8 d% b2 Z$ |$ [ g end;1 ^2 Y6 d) G- a2 X
for i:=1 to 10 loop
b) k, \) _2 n3 E$ ^ Res:=sprint("Store_",i);
, g" d9 `& I, X" U if existsObject(Res) then. s/ p& A7 i2 C' [8 b# i, I
Obj:=str_to_obj(Res);
8 p d S8 }3 ?+ h: O Obj.deleteObject;. B# r+ v" r1 s" t7 F7 j7 \
end;- O: }$ n" T7 z, U+ c- m
next;9 a5 V6 e( W2 p6 U
--shengcheng Status:zimoxingceng3 [8 g" v z* i: w9 Q: A1 d
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
$ L3 P+ n; ~7 c/ m Obj.Label:="warehouse status";* Y3 B$ T! _. a
! c7 E* g* [* Y0 R; i
for i:=1 to WH_nums loop
3 \ n, ~; A& w5 _ T% v. y4 U' @5 P Res:=sprint("Store_",i);! D# ]( Q* `( r! D) b# v
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);3 S% J3 E! G) Z7 J9 s
Obj.Label:=sprint("huojiaceng:",i);8 W: y7 S$ ?9 W/ K# @
Obj.xDim:=WH_x;
5 s5 {: L u" Q% c Obj.yDim:=WH_y;
7 d: }! V }3 g5 I Res:=sprint("StoreData_",i);
* u7 Z2 v0 @8 L2 D ) U$ W Z- S- H% V4 S
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
( z( C8 A# t2 t9 Z Obj.Label:=sprint("huojiaceng:",i);1 t* n' X' J) ?
Obj.inheritFormat:=false;
: z2 Y# _8 ^ S( y$ v' A. w Obj.maxxDim:=WH_x;
& B! l/ [& q( f/ F Obj.maxyDim:=WH_y;
[' _! ]+ p! Q% K Obj.ColumnWidth:=3;
- u9 A3 ~! I. x; [, X' ] next;& K) p/ \! I# W
" U6 J5 [/ c4 k% h. b( t
.Delivery.MUs.Forklift.speed:=2;; ^! T. p. k) b* ~
WH_var.delete({1,Part_Nums+1}..{*,*});3 h, f1 j, {4 S
for i:=1 to Part_Nums loop
5 b. @- `% a; l3 z" }( \4 ? WH_var[1,i]:=chr(64+i);
5 ?% x/ T" e7 }: O3 D; K2 r/ a" S next;2 u7 m7 Q" c3 O1 Z; p4 l
end;9 z7 m, G% `2 r- l* R+ D# z" \
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 0 f* N8 L" N7 O2 \, |; q7 n
$ ^: X, h; p) d+ p+ z8 K3 v
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|