|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
! N4 D$ L) e- _( D2 b+ d8 Z语句是这样的, O8 `+ C/ n* a
is
* B+ A& O# @1 M i:integer;$ O/ j3 W! Q( ]" p% ]7 L, e
Res:string;8 S6 h5 G# T. i/ E$ V4 o2 ^4 T( `' L$ ?
obj:object;( j& g* V! R' y/ Q5 W2 w
do$ r1 E2 w: v& }- @4 I$ a9 O
if existsObject("Status") then
" q/ Q$ N. u. f Status.deleteObject;
2 {5 `: |3 ^: p4 x7 Q5 D" } end;
* J# T, o, X; V! e for i:=1 to 10 loop: G* r* L& A ^ V7 T# B9 S
Res:=sprint("Store_",i);
4 l, n, B4 t4 Q" A& h if existsObject(Res) then& Q0 P0 h" |' G* t' Y" K5 l8 d
Obj:=str_to_obj(Res);& v: x8 q( ^; O! k7 C
Obj.deleteObject; b) g; D6 Z# P, O
end;7 L/ n& J! ^& u# K
next;$ y- U! w7 F( h* i3 L; |; V$ ?- x
--shengcheng Status:zimoxingceng
% v# W1 H: `! I Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
n: p' l- {/ m7 h8 { Obj.Label:="warehouse status";8 x7 ^& U: L6 L- n8 C8 U3 W7 I
3 \4 P+ g, c1 ]# j: F
for i:=1 to WH_nums loop
0 U0 W# {* a O7 B. v Res:=sprint("Store_",i);
. s& R" [0 G$ z' @% k2 b6 S Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
D# V- D4 ~& p! K+ G3 p( J Obj.Label:=sprint("huojiaceng:",i);
$ s! a0 s5 R& N1 C' s. E% ^ Obj.xDim:=WH_x;
: ]7 |, ~2 T) B$ @ Obj.yDim:=WH_y;' o0 O& P3 B9 _
Res:=sprint("StoreData_",i);
; P) t7 g, k2 z3 X7 v( l 0 a: g1 r3 T. C3 ~ W J
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
1 W( M& y+ z% O+ H( a9 k! K# Y/ \ Obj.Label:=sprint("huojiaceng:",i);
% K1 z& X1 j6 N4 g0 [) e5 f; r' o Obj.inheritFormat:=false;0 O# @$ k- {2 B# m
Obj.maxxDim:=WH_x;
0 ~8 D R' h- D& s. g1 `1 f. J Obj.maxyDim:=WH_y;' {2 l3 i o% u, X1 N8 F: a. r
Obj.ColumnWidth:=3;
1 o5 p P2 u0 f3 A d$ Z! s2 P next;
3 B: K9 Q V' U% X
) C! M: O. a5 l8 g .Delivery.MUs.Forklift.speed:=2;
+ U* A" d" ?) H4 {) F WH_var.delete({1,Part_Nums+1}..{*,*}); R, y1 ?6 x, { S, x0 g
for i:=1 to Part_Nums loop, a3 H$ q/ k* D8 z
WH_var[1,i]:=chr(64+i);* K& H5 p3 n) N0 v$ ?+ n0 G) Z
next;. R: @+ R3 @' R9 ?" i% Y/ g
end;" o y7 @* o/ U6 U( T9 x) K8 }+ R
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 & q7 l& l; c* i& f
6 z3 u# q z+ x2 A- z9 ~
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|