|
|
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。0 p+ ~6 c$ T; O0 X- {/ a1 l3 i
语句是这样的. B6 p9 t9 g% K" J, f6 t
is# t6 c8 k; D e$ y$ J
i:integer;* x5 G" V# L8 Y, T. P. u# R
Res:string;
" C8 J+ Z9 l3 d) X# z6 g obj:object;
! z* x) c; X1 l. cdo# G. }' J: V5 `' L+ `3 e
if existsObject("Status") then
4 m( l% k! w" q/ j0 d Status.deleteObject;: V& {$ H m2 B% [( V& z
end;( Z9 L3 [, ^% u, Y8 r8 F
for i:=1 to 10 loop3 b8 G' W2 s$ l' _* T( V
Res:=sprint("Store_",i);$ _& _$ M- V V# ?$ c
if existsObject(Res) then
8 p" }0 U. f; Z) j* I ]& _ Obj:=str_to_obj(Res);$ J C1 U5 j2 G$ z A/ r
Obj.deleteObject;
, }7 p+ w, c5 H1 a end;/ G& C9 O; v: e8 K9 v9 Y
next;
$ J" d3 M3 ~2 u$ p, W --shengcheng Status:zimoxingceng0 g. W9 Z: s t
Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
' j p% u& {! v* t: ?) o$ u, \, u* {! B: W Obj.Label:="warehouse status";9 C! a) h( |% _6 _
- j5 @: q' U$ }
for i:=1 to WH_nums loop
' K# v; x: M+ |: | Res:=sprint("Store_",i);
4 O2 n2 o. d% M" M; r Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
1 b+ ?7 W( O, m! H: Q3 @0 r Obj.Label:=sprint("huojiaceng:",i);
! W; E* j8 H- }& G; g Obj.xDim:=WH_x;
+ T) |9 w, r* T/ ^' n Obj.yDim:=WH_y;
8 x4 o4 |( R& l1 w$ |# N4 C Res:=sprint("StoreData_",i);
4 n% n4 z* f' J" i; D: N- ^" s - y: j G( }0 p1 `- o: x7 x# O
Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
* W; y0 H" ]4 q# M: { E& P Obj.Label:=sprint("huojiaceng:",i);
# X; p5 c' H! J+ H! Q0 Q. L Obj.inheritFormat:=false;5 Z) c" ~0 b; P0 @- s8 n
Obj.maxxDim:=WH_x;
) M0 ?8 `, V( D( X Obj.maxyDim:=WH_y;* t8 L$ Y! k$ v0 h% _4 U3 j
Obj.ColumnWidth:=3;
8 R2 ?1 c0 y- {; Q0 t6 d next;
2 r. E# f8 }# l) c 1 A+ d1 a; x, q: \* z9 z, @
.Delivery.MUs.Forklift.speed:=2;9 Y9 D# m% d! x& f6 H
WH_var.delete({1,Part_Nums+1}..{*,*});2 p5 c0 m4 F( N% f
for i:=1 to Part_Nums loop
! G6 S! Q# b N7 O0 _, d WH_var[1,i]:=chr(64+i);" ]6 s# L- y4 N$ X D! h# g
next;
' E% G1 x& z: C+ Z Z- l% qend;$ Y! o9 I# u/ M6 j, c0 J
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了 " a6 h+ v& i( A5 g
: I6 a7 o7 F# q+ ^. K8 x |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|