|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
1 ?+ W5 i( S0 v8 H$ X* g语句是这样的" }2 O2 {8 }6 ]; C& e. s
is% F+ R3 L5 r- w5 _ U7 e9 _
i:integer;
; d( E- G/ _5 a7 ?# y' i8 u Res:string;
/ m, Q4 Y+ w m* E/ ] obj:object;* n9 S; C; S, L9 |
do
* E! _6 I9 j& u: W if existsObject("Status") then
9 d" }( h# w+ j$ ?- O' \ Status.deleteObject;
- f- R9 {# ?) F/ |% p end;0 W' ], r" _ S4 {/ a! X# G
for i:=1 to 10 loop
, E' p7 J8 s O3 p3 b: o( g% Z1 \ Res:=sprint("Store_",i);
0 Y1 ]* B/ ], d if existsObject(Res) then: x5 _3 K) v. X4 T3 G2 M
Obj:=str_to_obj(Res);; h/ Z2 S% ]1 C& i
Obj.deleteObject;* t1 `8 s6 k4 b
end;6 A- h1 M, v }6 t/ ^" T+ @
next;; C3 j3 g c9 W4 F6 a5 _
--shengcheng Status:zimoxingceng2 ]# f1 \. i2 U; J; t% `7 a% s
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");5 u) ]9 U2 [( T( s
Obj.Label:="warehouse status";* B6 t- w% M; T- O
, B9 P5 t p1 A2 k* @9 Q3 e for i:=1 to WH_nums loop
% @0 s& n; I8 k/ N+ T& Z) L( c Res:=sprint("Store_",i);
* g# y. N: v) a6 F Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
( p4 e5 Q" s; Y- C/ u% {: [: ~ Obj.Label:=sprint("huojiaceng:",i);/ N! Q+ b/ m: x% W# G1 |0 {
Obj.xDim:=WH_x;
. n: u1 n O9 j# b/ B; H Obj.yDim:=WH_y;
. f! f9 y' Y3 `% v Res:=sprint("StoreData_",i);6 W, V/ s( ~. ?6 n7 Q( E- d
4 k8 \) R- j8 Y: b0 V
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);" |; q# z" w: l6 B `
Obj.Label:=sprint("huojiaceng:",i);
2 ~8 Z1 L6 d& t- U$ V W Obj.inheritFormat:=false;
% ^7 n6 y" o- `+ j* a" t Obj.maxxDim:=WH_x;
. S. e6 `! W6 g% W& f) ` Obj.maxyDim:=WH_y;( D. ^3 ?* Y$ [) E- h# {
Obj.ColumnWidth:=3;
% {& Z T! ~" q& y, Z( R# w& L next;& A# {1 K6 a: r* }. M0 @
# V! L' x4 }6 }# h2 O) M
.Delivery.MUs.Forklift.speed:=2;
' \- I# j% S& k" d WH_var.delete({1,Part_Nums+1}..{*,*});
, T( E E2 T6 q for i:=1 to Part_Nums loop
1 s# t# e) K5 o6 U WH_var[1,i]:=chr(64+i);
) \) t5 _# h$ ?, w. Z, @ next;
' L6 N- ]! ~3 g$ J3 Xend;
, U$ ?" R% |; ^3 g7 D9 |出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了) a- y% s$ x8 l1 v
* m1 |' x- ~/ S+ w3 A
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|