设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3629|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
7 A$ X1 D5 j- }  l语句是这样的
8 ~/ h+ j, R8 D. {is( L1 }% ~+ C+ l; ?. B* L
        i:integer;# S7 I( q& e+ u1 ?( [- v7 P
        Res:string;2 h+ N8 ^. i; @6 @; m
        obj:object;' I- V+ U  L  N7 v! G. t) x7 C
do
; H& Y3 t: P& V7 X! z9 S0 C        if existsObject("Status") then, \" t; T) G+ H( _  @( p
                Status.deleteObject;
" i$ A; {- D% [% \        end;. `  C! R4 U5 Q5 Q3 M
        for i:=1 to 10 loop
, {- \) s" c4 V) f$ ]4 M1 F2 @4 o                Res:=sprint("Store_",i);8 j6 g- B& J9 M9 q4 f
                if existsObject(Res) then
- u' b, _4 U1 {3 m' @  I                        Obj:=str_to_obj(Res);
) B0 z1 T$ d. e7 {" f4 `# {                        Obj.deleteObject;
. B( [$ W% A1 a8 z1 _                end;" T* k+ E$ \7 y% j7 ~+ W* O
        next;% E: G1 x3 d; K: G
        --shengcheng Status:zimoxingceng+ ^( m. q4 K& U. b+ K
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");7 f2 t% }; Z; _8 i# a
        Obj.Label:="warehouse status";( J+ c1 r5 n' u# e  N) F( c
        9 o" j: U+ J, u7 d: W
        for i:=1 to WH_nums loop& l* ^' d: Z3 S8 q" M
                Res:=sprint("Store_",i);
- |0 s7 x* \1 i3 I                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);8 h" H6 }2 H8 S! y
                Obj.Label:=sprint("huojiaceng:",i);# W& ~4 |+ X$ s$ D* A7 D4 x. V; {
                Obj.xDim:=WH_x;; a: c' D# W+ f$ l
                Obj.yDim:=WH_y;5 v2 W! L- I+ T7 M) D9 |
                Res:=sprint("StoreData_",i);
" B3 B. n4 c7 |7 I+ B& }7 T               
* i/ B4 `  U8 d1 o, @                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);* O6 R! j+ p! j; H) N' b
                Obj.Label:=sprint("huojiaceng:",i);
+ P6 R- M0 x2 A; \  I- r3 N                Obj.inheritFormat:=false;* A* f3 `- K3 |1 M
                Obj.maxxDim:=WH_x;1 L  V* B& x( X
                Obj.maxyDim:=WH_y;0 J# I# C: p' E" Q# Q
                Obj.ColumnWidth:=3;
  L: Z/ B/ _4 D. ~. L        next;  ]# q% b( _  A1 P! }! x7 q
        ( a- v; {/ _3 b
        .Delivery.MUs.Forklift.speed:=2;+ r, ^) v% d! H# `  O
        WH_var.delete({1,Part_Nums+1}..{*,*});. S* t4 w4 y$ N) {0 E" ?
        for i:=1 to Part_Nums loop
: L+ I" t7 x8 a9 C& A: s+ E                WH_var[1,i]:=chr(64+i);  H  x2 c' F# e' J. _
        next;
) `0 d/ ^% H* y+ H1 R% L+ iend;, n1 D  m! @, |# ^
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了  l% f: l7 Z* |% Y5 |6 a+ f

# G- m' A: g. t6 k2 _2 Z8 X

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-4-4 16:55 , Processed in 0.019582 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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