设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4200|回复: 0

[求助] 仿真出错,求大神帮我看看哪里错了

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。4 A- B$ V7 p5 W
语句是这样的
; ^6 y1 D% x* I& Q( T# K- Bis
& F4 f2 M6 c7 m" c        i:integer;
- p. n6 f7 x/ i. U; }        Res:string;: d! c0 m2 A6 P) d* W+ g. t
        obj:object;2 m9 s) x0 M5 x0 X7 B
do
+ p; y6 ~8 o2 M3 S$ k7 v        if existsObject("Status") then: d9 R$ e; k% v% }/ z0 [
                Status.deleteObject;, ^" Y$ y, g" [; j  K9 V2 V" C
        end;
: y7 C9 j1 L1 B! @: e. t3 ]        for i:=1 to 10 loop& Y9 m+ O" ]  z
                Res:=sprint("Store_",i);0 I8 ?6 B" t8 |0 |0 p
                if existsObject(Res) then
. J, _- h" j7 R                        Obj:=str_to_obj(Res);8 m0 b* j  f) o5 w: k
                        Obj.deleteObject;7 {+ p0 X  c% N1 a
                end;
  O# u* o. O& X9 L        next;
7 c# P5 i9 y2 K6 u3 ~" J* C$ d        --shengcheng Status:zimoxingceng) h: \8 e1 [  ^/ I* v$ p! v
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");: E3 v9 g; T; B  b8 I
        Obj.Label:="warehouse status";+ s4 s( ^& X/ Y
        3 ?2 {% E! D9 g/ ]$ H, j% n
        for i:=1 to WH_nums loop
( Z+ }5 a( W$ [# N! W; P                Res:=sprint("Store_",i);: K! Q3 E0 @2 Y* R9 K
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);6 H, F& W- i8 d0 J0 ?- L
                Obj.Label:=sprint("huojiaceng:",i);
) ?. F# r  N+ n9 s" w                Obj.xDim:=WH_x;8 S5 s5 E. H% R( O4 |3 c1 _
                Obj.yDim:=WH_y;; A8 w7 Y0 d8 P8 {5 D7 ?% @6 \
                Res:=sprint("StoreData_",i);5 z8 H2 Y! h! S2 w0 p3 B* I
               
8 r: L8 ^: F+ @% c5 X                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);2 _* O# |# X% J& H2 ?& z( u
                Obj.Label:=sprint("huojiaceng:",i);
$ L/ s: e! ~: D! P: E: D4 `; q                Obj.inheritFormat:=false;" t3 _& ^# g9 p1 G; |% H" g# ~
                Obj.maxxDim:=WH_x;
; {" ^! @3 U3 \# z' y4 j                Obj.maxyDim:=WH_y;; j: x9 F0 d+ u2 \4 V( r
                Obj.ColumnWidth:=3;- D# V3 r) @0 |) R. @7 x; \$ T* R
        next;
" D7 h0 \; c+ r3 A        " X. T* v. B. F3 E/ P
        .Delivery.MUs.Forklift.speed:=2;
% M5 T) ^; Y: P% @6 i( l5 V; _# l        WH_var.delete({1,Part_Nums+1}..{*,*});- f" b! f7 R7 `' ]
        for i:=1 to Part_Nums loop
7 Y6 X5 t9 }; Q& p" Y                WH_var[1,i]:=chr(64+i);! a9 I, s4 G  g/ u: E9 N
        next;/ X4 W  r' X0 w- m
end;
6 w' w& _& I% n: i) s出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
; I% c9 N. }# _) Y9 ^3 _* I, s  c; R4 ^' M; L4 l

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2026-7-6 10:47 , Processed in 0.021653 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表