设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4127|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
* w1 e, n* T* `" B+ a语句是这样的% z& x* \( M9 r5 w4 O" f& f
is
9 b! }8 `2 o) \  o        i:integer;
$ p) S; A% o8 u+ c3 r7 G& C: h        Res:string;
9 o1 z1 r( g1 A: m        obj:object;
& [* t( t+ V5 q* Ndo
# P+ K( D* D( g6 b0 m* H: S2 Y        if existsObject("Status") then4 A" ~& C& w  l8 I/ @* y* z5 D
                Status.deleteObject;
* Z  X! l& k6 S0 h  o* y; N        end;
% e9 e8 Z% h- f# c" k        for i:=1 to 10 loop
" Z& H7 h( {9 V6 Z" a1 e9 i; c$ i                Res:=sprint("Store_",i);
- R$ H5 x% S7 a2 g! h8 G                if existsObject(Res) then
0 H. L  |2 J, h1 ~. h                        Obj:=str_to_obj(Res);( C7 ^) g5 u/ F8 l  }; Y/ i2 o
                        Obj.deleteObject;
1 c5 F2 T$ b2 o& t                end;5 o) P" V' U6 H% o2 y) Z
        next;9 Y9 g/ w$ |# Q4 p, \2 y
        --shengcheng Status:zimoxingceng5 {! i0 E. f+ _% W1 K0 {/ [/ Y
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");( O7 m* ~( R# L! X2 ]* O) Q' I% e
        Obj.Label:="warehouse status";
2 C+ p1 G3 p) W7 k8 f, |7 t+ x        * R( t0 Z2 S: |7 t
        for i:=1 to WH_nums loop
. U* f  Z% B5 f3 m7 p                Res:=sprint("Store_",i);. H3 E4 D3 A6 w9 j# I" f! d$ u8 a
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
8 f7 s! b2 K0 @                Obj.Label:=sprint("huojiaceng:",i);2 [9 i3 s  o0 p) T
                Obj.xDim:=WH_x;) Q6 m* c7 h  v0 n& I  O' M
                Obj.yDim:=WH_y;2 [  r/ h& q* y3 g: y
                Res:=sprint("StoreData_",i);
3 L( K, _" k- G: X: R0 P4 J               
9 u! O) f4 O% `                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);" q: G* Z1 D6 D5 D/ m! X( S
                Obj.Label:=sprint("huojiaceng:",i);
* Z" \$ Z5 D; L, t                Obj.inheritFormat:=false;
) c  `" B2 F4 O9 R3 [; n' [                Obj.maxxDim:=WH_x;9 U4 `9 |2 s6 [. }4 C9 n" A% n
                Obj.maxyDim:=WH_y;7 |' L( I) Z8 `  u0 I  h: d7 w1 z
                Obj.ColumnWidth:=3;. ?; l6 M: g. d, N) [4 |
        next;
, r- u: C, s4 D! @9 I  b       
5 q; q' [- z4 g( C4 P" o* P# @        .Delivery.MUs.Forklift.speed:=2;1 @! `; F$ m! B# A# X# z
        WH_var.delete({1,Part_Nums+1}..{*,*});
- V- m( h/ F# S: w; ^; @1 C" W        for i:=1 to Part_Nums loop1 J& b$ u1 {! W! B, u
                WH_var[1,i]:=chr(64+i);$ d6 o( G% `# o
        next;3 p  h& n7 Y5 W3 O% S. O' }! A
end;9 g$ V, W) f& \6 x- Q
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
" i# w6 Q" H' `! q7 N9 a; u6 q. G, Y/ D# z

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-6-24 18:50 , Processed in 0.018012 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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