设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3959|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。! [# G; B6 J% g, z6 V
语句是这样的) G. n% F8 W5 @4 i: R: _9 T
is
$ t) _. {- k8 A6 l        i:integer;7 I8 K" V1 K* ?" E6 {3 Y
        Res:string;
2 j& q; Q0 g2 k( ]# S% G: A        obj:object;' }# V6 h9 i& Z, [2 t* c+ G: t6 f! f
do
  k6 s" \& V8 Y) ?8 j) q5 s        if existsObject("Status") then
6 j' g1 Q) t7 h, j                Status.deleteObject;
$ C+ P! e, W; z2 s' N        end;
, f# T6 {# h+ T; W: ^3 T( K        for i:=1 to 10 loop( S' j" D2 T# G+ U5 {
                Res:=sprint("Store_",i);
& c1 e* B. h! ^5 s8 \* R3 |" o                if existsObject(Res) then' b. n; U" B: ~
                        Obj:=str_to_obj(Res);5 i% U% ]! d( ^; Q9 C3 j/ Z
                        Obj.deleteObject;
4 w) K6 t2 j" C/ l                end;
' q/ p% g! k& K/ t! y$ U        next;; E; n$ ?9 T$ C0 I
        --shengcheng Status:zimoxingceng* S9 c( H8 Q; U9 \# N
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");2 x. v  n9 A, A
        Obj.Label:="warehouse status";* f6 f. x1 N+ S
       
5 P! G2 }: U8 a7 f        for i:=1 to WH_nums loop% s* y% g1 T; F. k' _) a
                Res:=sprint("Store_",i);% N' ~1 H  X+ I( R. J$ L
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
/ X& m2 {2 W5 w7 V: c                Obj.Label:=sprint("huojiaceng:",i);: U8 n$ c2 ?( p
                Obj.xDim:=WH_x;" i, A/ I- ~& x2 x
                Obj.yDim:=WH_y;
. m$ \6 ?& K: S2 r8 w                Res:=sprint("StoreData_",i);% b/ n* I. a) j5 K$ V
               
4 @4 ^: U  y3 d& q! u$ T$ P                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);+ A, e! C; @) ]7 p5 x7 V
                Obj.Label:=sprint("huojiaceng:",i);
! A0 a+ X! A- l6 V                Obj.inheritFormat:=false;
2 V6 ]& ?1 |! S5 X- s" r  |9 ^                Obj.maxxDim:=WH_x;
7 u2 q. q; ?. K/ s5 A' Y+ J                Obj.maxyDim:=WH_y;) z) g+ u, d- B* J9 f4 \
                Obj.ColumnWidth:=3;
. ?" \: O* `& ^4 \  [        next;
$ T0 o) ]* ^& G' o0 V! H6 j       
# x/ P2 H: I* p6 V/ E        .Delivery.MUs.Forklift.speed:=2;- n( Z9 ]) L, _, O& k
        WH_var.delete({1,Part_Nums+1}..{*,*});
! J2 x( b2 F( ]8 ]! c" A        for i:=1 to Part_Nums loop$ t# O  t* n* m% ~. \
                WH_var[1,i]:=chr(64+i);
+ X0 K4 s: D7 v( N' `        next;7 ]( d! Z* Z% y. o
end;
$ V; c6 s9 n( U2 i' v$ {8 I& C出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
% G9 o1 q' Z. ^# @. ]- B! ]+ O. P
5 {% x8 ?: l2 q, @" T

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-5-21 19:10 , Processed in 0.027504 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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