|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。, P* g7 F' s( X: r. [7 n/ y2 i
语句是这样的
% @6 K6 ~+ Q4 g& I: Lis
/ J( x1 m1 V0 S& B: e6 z* o i:integer;
- N. r$ Q+ k t. O$ }4 B5 m Res:string;
/ X; W! @! M: ]8 I7 ?( c0 F. w7 G obj:object;& ~8 H/ i* ^. ?, O( x1 `% a
do
7 N& c& Q+ c; a6 ]: o if existsObject("Status") then& S9 c3 s0 H% l
Status.deleteObject;7 ~! a$ t1 E' [
end;
: ~4 t. D' ?" C+ e6 ]9 U for i:=1 to 10 loop4 ]. }; P5 a, D @( C% }
Res:=sprint("Store_",i);
5 V) Q! s% X- _' U. w% j* ~- s if existsObject(Res) then
, |: J- u! }8 p" C Obj:=str_to_obj(Res);
8 E" `; a# r# e: [* K2 C. B$ v Obj.deleteObject;
/ j1 c+ @! i8 c3 I; \3 W end;% |1 E) y' e l' v. O6 ]
next;
! Q6 b) P# J- `# o --shengcheng Status:zimoxingceng
* [5 i5 z/ G5 |) V5 ^ Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");3 K8 @8 B) Z0 N* d! T
Obj.Label:="warehouse status";
; ^1 e3 D) {2 U3 d) o t, G' M1 | * c/ j: y5 D5 K; u+ r0 u
for i:=1 to WH_nums loop
: `! C4 d% n) I+ p) E3 K7 U- ]$ Z2 p% T Res:=sprint("Store_",i);
$ D: A4 Y8 O! T- n* g3 {( P Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);$ s1 h# }9 f6 d/ Q+ D3 i
Obj.Label:=sprint("huojiaceng:",i);
0 y! m+ m. [- x5 d2 n7 C- d" S Obj.xDim:=WH_x;' |9 A0 m# _6 Y" B3 T2 m# o
Obj.yDim:=WH_y;5 }$ B- s+ a: P( F. ?, N# O
Res:=sprint("StoreData_",i);
; f0 x' o: ^4 l' v1 ?
' f9 U+ r6 S% h* E) b9 n' n/ o Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
1 t1 [, X9 @# G/ S/ r: l& G) n8 O Obj.Label:=sprint("huojiaceng:",i);" a' f, I% ]& x+ L5 L
Obj.inheritFormat:=false;
& }! \" J6 e8 q# z0 W" X/ B& ] Obj.maxxDim:=WH_x;
. X. a1 r% G0 R5 r3 E, ~8 b4 i Obj.maxyDim:=WH_y;& ?8 _$ ?( P4 L# @# o
Obj.ColumnWidth:=3;( L: Z3 E8 N9 A) g8 F
next;
% ] G) V) @1 C/ m. T 2 H" k9 o+ h! L% \
.Delivery.MUs.Forklift.speed:=2;, x* P O6 h) @, K
WH_var.delete({1,Part_Nums+1}..{*,*});
$ [2 [2 R) B- K for i:=1 to Part_Nums loop
( q d5 B. ]: m! z1 }2 W, q WH_var[1,i]:=chr(64+i);8 r2 Y5 t3 Q0 s
next;& f! _$ D1 l5 n! X9 c
end;2 O7 q4 ?0 S& ]7 G4 D5 _
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 . V. c$ N' Z4 C7 r0 l z
- L( |/ j4 k4 |. z& d" H |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|