|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
F$ @4 L9 Z, y& j7 G8 e) ]语句是这样的
0 `6 y+ r- H2 V1 \) {: Zis! a, x7 @, p. j
i:integer;; N5 D2 z3 V/ w0 ]
Res:string;+ X7 O2 U3 j, c) m) k
obj:object;
1 Q7 l3 u4 V* \- o; Z3 M/ bdo# }1 z; `' r* ]6 q }% g
if existsObject("Status") then; g; @ m0 e% ^. K. x# |8 e5 c# M
Status.deleteObject;
; V5 o7 l/ P7 V$ A7 [ W3 x* A' e4 h end;/ Z; W% R# V6 g
for i:=1 to 10 loop3 J& r% K% e2 b# W) a C
Res:=sprint("Store_",i);
+ u! t' e8 w5 c% b' H4 E if existsObject(Res) then1 o* a' L. m2 d$ L- `* f
Obj:=str_to_obj(Res);8 D2 p- D w, m* X5 E, ^
Obj.deleteObject;
# x$ ]( d% e6 E( C end;
+ V9 g. ]. v6 t; Q' e8 N$ C+ ` next;
1 u/ j' d! W) F9 s. p- Z --shengcheng Status:zimoxingceng
+ ]( d. H3 k$ q: l Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");" e; w- B- ]6 \" B; Z
Obj.Label:="warehouse status";
) A* O @9 p" {# z # `9 E; r5 s8 f2 n5 w- Z8 `4 `
for i:=1 to WH_nums loop
9 ?" F( P( V2 y' A6 J4 r& ]9 v Res:=sprint("Store_",i);$ Q9 }- d/ N, @* O6 H ?
Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
A( c) {* g8 f0 c; p" f' N Obj.Label:=sprint("huojiaceng:",i);
% x4 j& \8 h; N' c$ o5 } Obj.xDim:=WH_x;
7 K Q8 n9 k0 } Obj.yDim:=WH_y;0 H7 K; W( R1 E* V/ g! c/ r
Res:=sprint("StoreData_",i);
) |4 K2 K/ _8 Q' {- Z; I. s
% n% K; g# o/ V5 H. t5 r Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
' A. x# }& {! r0 y Obj.Label:=sprint("huojiaceng:",i);
' k# ?7 t3 l3 d* | Obj.inheritFormat:=false;4 g3 U) L, x8 [3 ~+ E. u( w3 j+ h6 V
Obj.maxxDim:=WH_x;
' P6 l7 M3 r) h4 e$ E* W Obj.maxyDim:=WH_y;
4 u/ T3 x1 l+ E9 O+ F& k* a Obj.ColumnWidth:=3;( U4 D# f* A8 \# j
next;
: v/ j' E6 P$ K' `9 ]2 |3 z
8 i9 t& s/ f+ p7 `- t .Delivery.MUs.Forklift.speed:=2;) k* ^# j! D5 ]* P. @
WH_var.delete({1,Part_Nums+1}..{*,*});
' @8 s' q$ z1 G. ?+ t for i:=1 to Part_Nums loop5 H7 s/ [. b0 @, X0 n
WH_var[1,i]:=chr(64+i);
* o$ @0 L9 u. A. p$ x3 b next;
5 A: Z. V- E1 _4 s) Uend; f, T- m0 H; x0 o5 t
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 / g9 |% G# P% g+ M% w6 ?$ i
4 l& r) A+ n# H! g C/ r |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|