设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3868|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。' M# U4 i; @5 w4 Y5 ?8 j; b
语句是这样的
/ \  h6 v. ~9 w5 w, pis
3 |. m5 g/ f3 N1 x) w7 K0 S/ Y        i:integer;1 N' R& O. h3 `( B- t3 P
        Res:string;- M, O# [( z; `( n" K! `2 w! |4 A7 z
        obj:object;
6 `& O7 Z  U8 n2 z6 ~do9 o. E% `& `" E+ w
        if existsObject("Status") then! m5 K% `( I& n3 W
                Status.deleteObject;0 L& `$ V8 u8 D& W; M% y6 Z& L
        end;
, |+ C9 y+ T( E4 H" ?$ N# B% N        for i:=1 to 10 loop5 H. L( M0 I3 Q3 |/ w+ ], h2 m7 A
                Res:=sprint("Store_",i);+ _9 r0 S, Y( B9 `
                if existsObject(Res) then. G" u0 N, ]- |
                        Obj:=str_to_obj(Res);
  R+ ^* D- `; N                        Obj.deleteObject;+ `3 Y( X& e' k6 M2 p! a
                end;
$ j( F' }6 C; q6 C5 c        next;
  ^: `6 `! a! J* G! @        --shengcheng Status:zimoxingceng  @' O7 d$ R& n% x- w
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");" [8 r$ A# o3 O5 @7 T6 n
        Obj.Label:="warehouse status";
1 `5 C9 v  G9 @" ~& d+ P$ f2 J3 r        ) j( I" d- a- k9 R1 N" k
        for i:=1 to WH_nums loop" v7 N+ @' @8 _6 e2 S( S* Q
                Res:=sprint("Store_",i);- ]& f  s- I8 j
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);: c/ q- g% `; r" P( @
                Obj.Label:=sprint("huojiaceng:",i);5 \, ]" w9 a2 w' ?7 Z
                Obj.xDim:=WH_x;
- [9 W* ]& {/ ?9 L& W                Obj.yDim:=WH_y;
. {9 V* a4 A9 [* U9 [                Res:=sprint("StoreData_",i);; u( S, _% Y4 \# F# |+ D' V& L) i
                6 o, I! k* A  e( l1 a! V) P! v
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);1 Q  f% u+ v: M; j( x
                Obj.Label:=sprint("huojiaceng:",i);
$ H, Y/ y& x+ T! T# J+ p7 D                Obj.inheritFormat:=false;
, \- y! p6 j8 a+ u2 l: R                Obj.maxxDim:=WH_x;
. x( r  E! {& w                Obj.maxyDim:=WH_y;
. @/ D- `2 o0 ^- [                Obj.ColumnWidth:=3;, ]$ }- v! t$ ^& s% q5 C8 W+ b
        next;
. v& q/ ^% P$ A" g$ }6 r. ^        # M- z! k2 e/ V) B% D
        .Delivery.MUs.Forklift.speed:=2;
7 }! D3 L) G/ M& p+ \        WH_var.delete({1,Part_Nums+1}..{*,*});2 a7 j0 ~- r/ [6 W/ t
        for i:=1 to Part_Nums loop
$ N. h* m* o  ]7 f0 S                WH_var[1,i]:=chr(64+i);1 g5 j0 S7 J; ^# m
        next;
( F) _+ {+ r3 ?# P  m) {end;
' Q' X  K6 [$ o0 K9 w( x3 t出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
3 h+ c& _0 w6 h8 k! ?% Y& ?: w+ o0 B* Y' f" y1 h2 N+ S; p9 @

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-5-8 00:17 , Processed in 0.016563 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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