设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4286|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
" u8 `7 K% V7 f# c  h- b8 G* o0 Z语句是这样的
# F$ O) w5 L: Q) W, S% P; O. E; fis
8 y# B+ D; r/ b( p$ B; X" M        i:integer;& z! ]& P1 Z: r1 m5 w/ q1 J
        Res:string;- e: y1 L8 o; o, k! y6 W
        obj:object;
; `, ?1 M3 ^" y4 w' A7 {, }do, ^; Q0 h" D5 M4 z6 Q* e
        if existsObject("Status") then
5 P4 y( {# |2 X4 b! y! |                Status.deleteObject;% }' b$ ~& Q* ~, ~3 u
        end;5 Q1 v3 h' h6 n' x& G& G. U+ U
        for i:=1 to 10 loop1 e, E) Q! U& u! n; f
                Res:=sprint("Store_",i);
) Z  Y  C# \2 G8 K                if existsObject(Res) then5 V$ ^; ?& M( K: [3 S
                        Obj:=str_to_obj(Res);$ Q2 V! ?4 U: r7 ?! R+ G/ g% b7 Q
                        Obj.deleteObject;! w( ]& E0 l( j
                end;& `7 J8 s! e2 H9 A; s0 h5 R
        next;
( [" v1 x1 J4 A- t  G' k        --shengcheng Status:zimoxingceng& q7 T2 |9 J$ J+ K. A5 i9 X0 x' o
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
# j1 k* l3 @: l  E( b# Z        Obj.Label:="warehouse status";
( z- I& @% g/ Z- r        ) F$ ]3 W: A  l+ `0 H5 G4 f! n+ b4 m( M
        for i:=1 to WH_nums loop$ u& f0 |7 B. [- m0 g
                Res:=sprint("Store_",i);
4 P" W) m4 L6 w9 O( W                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
: |' I5 j: m/ h# T                Obj.Label:=sprint("huojiaceng:",i);& B7 i$ c7 \! K0 z! r7 l7 w
                Obj.xDim:=WH_x;* Q4 C& {/ m( T2 d! T
                Obj.yDim:=WH_y;
- n9 X. g1 P( Y' H6 _3 [                Res:=sprint("StoreData_",i);7 D1 g& U1 D& w! j# a1 R* v
                , g# Q+ r* j/ {9 j
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);" A5 i( D/ r* G2 q/ O# f
                Obj.Label:=sprint("huojiaceng:",i);: ^( j5 o7 h! k) \
                Obj.inheritFormat:=false;# Q* N$ y0 X1 Z. C! S& I$ n
                Obj.maxxDim:=WH_x;7 l( j2 H& e$ t& j9 T+ M' Q1 h
                Obj.maxyDim:=WH_y;1 U! @# k! P" ]
                Obj.ColumnWidth:=3;2 L# L: ?1 L/ @4 r; }0 ^2 Y& w
        next;
" K4 X4 f$ e+ A) ]2 P        : v5 |2 C% ?- g
        .Delivery.MUs.Forklift.speed:=2;6 ]+ W7 h' a, T0 J7 H, w
        WH_var.delete({1,Part_Nums+1}..{*,*});
1 q' K+ o( L4 x$ d, c5 f  N        for i:=1 to Part_Nums loop. g" c  E( N/ V( U! N! H
                WH_var[1,i]:=chr(64+i);
' i2 _( E" f- x) B; C. m3 m        next;
' q* C9 `- R$ X) Jend;* K; k& v* n& U/ R' q, D8 {
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了( \* [5 T8 E6 Q% p
* m/ e) F/ ^/ K9 J0 C. P, Z2 A5 o

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-7-20 08:11 , Processed in 0.015938 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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