设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3281|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
- i2 M' B+ W# _1 a3 o5 K& ]语句是这样的
  C% C& B" t9 v3 t' qis
- B5 o  ?5 t2 C  E; q. P. L        i:integer;0 @! l5 [0 S4 \. ?8 _3 y
        Res:string;# m. I, j2 e. l: i" p$ R
        obj:object;
5 D6 A& M! K9 x1 h8 F) t9 w: Ado8 o9 ?$ w4 Q' Y
        if existsObject("Status") then
3 x$ G3 V9 ~! J3 M7 l1 W, g                Status.deleteObject;( o" R' |6 m/ K
        end;
; |# D$ L" q2 _9 X$ m        for i:=1 to 10 loop' K1 @/ U# d0 J
                Res:=sprint("Store_",i);3 \. u6 s% t, i" i. S9 J
                if existsObject(Res) then/ z1 d4 u# y9 B% R
                        Obj:=str_to_obj(Res);
1 G% g6 d; J1 a9 a# M                        Obj.deleteObject;
9 F3 [8 y( V: a. l                end;, A" i7 l5 k; h* x
        next;( J: s2 \. r" y6 X- z
        --shengcheng Status:zimoxingceng
( F, h3 D5 @6 _$ X" l        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");  A3 \$ [1 M4 D# K; x" L. n
        Obj.Label:="warehouse status";
) `7 G0 _. ^* p1 Q% r3 Q       
" C4 v  \& Y  K- n' }        for i:=1 to WH_nums loop) b. _' G# e: |$ L2 ~
                Res:=sprint("Store_",i);. m: t3 T6 Y: j4 W/ F$ s& A8 S5 [
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);. k- \4 A# V# X, O% c
                Obj.Label:=sprint("huojiaceng:",i);6 A# X* K) @" J6 X0 m5 A" \
                Obj.xDim:=WH_x;
9 }3 q6 n: }; ^3 x% Q                Obj.yDim:=WH_y;
( j+ M3 S2 Y5 D9 ?                Res:=sprint("StoreData_",i);
' _. y3 h6 T* Z" k% w& S7 z% |. b                & J+ e' Y, W5 d6 E
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
' l  |! O: x" {) z                Obj.Label:=sprint("huojiaceng:",i);- [$ Q* L# ]( H6 \
                Obj.inheritFormat:=false;
8 o  \1 g3 e6 `                Obj.maxxDim:=WH_x;
# [3 z8 `. h7 D8 J: h1 T7 ]) c2 c                Obj.maxyDim:=WH_y;- b# c& B0 D6 S* f! I+ [, F
                Obj.ColumnWidth:=3;
/ ]( B( k3 o9 }        next;
+ Q: w2 j7 ^+ _+ k+ n        6 H- o/ h# W8 _
        .Delivery.MUs.Forklift.speed:=2;
8 ]8 w$ @0 b; u" A        WH_var.delete({1,Part_Nums+1}..{*,*});
8 B8 u6 W& n% J1 d+ P        for i:=1 to Part_Nums loop) X# h2 U( t% H# v) s3 L
                WH_var[1,i]:=chr(64+i);
- Y! k! I" _3 Q7 Y" d$ J        next;6 j$ F/ ~& y* T! M; |  c
end;8 U6 s% `+ F  m" Z
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了4 t( ]) u3 Q" {2 F9 k7 o
* |0 {% Q! Y+ l, Y, w! K

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-1-30 16:40 , Processed in 0.014665 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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