设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4179|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
2 a  ^9 W0 B* i7 {0 T* a语句是这样的+ z  o2 }2 c9 ]4 Z+ X
is  b$ n3 w3 q4 U6 I  D- M
        i:integer;
  C# Z& q2 k( [$ @( k. j' [1 ]        Res:string;% _+ f3 o& x, v% x
        obj:object;- Y: r- Z! S" n2 B, i, P+ D8 `' C
do+ g6 I; B4 s2 [5 Q$ S
        if existsObject("Status") then
3 V( W& D$ i/ _) r* v4 v8 t7 Q                Status.deleteObject;
: F" a7 Y8 p" B% P' f        end;9 D' ]+ i# C- U% {! G
        for i:=1 to 10 loop1 K- E" o% s4 p- \1 ?
                Res:=sprint("Store_",i);5 l9 e3 b# x5 ]2 z) f
                if existsObject(Res) then
( U& q' I7 \) k  K$ v                        Obj:=str_to_obj(Res);
+ E2 s8 W6 D9 `1 h8 G! |/ }                        Obj.deleteObject;9 D: o1 e8 l. [$ `
                end;
* L6 ^$ g+ M2 l& B5 w        next;
( u  f. I5 H9 C& r& k        --shengcheng Status:zimoxingceng$ j# x/ D9 c1 F% o0 H
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");, v7 m" }& c. f7 z; e- D
        Obj.Label:="warehouse status";3 E8 N! E. A8 s
       
, h" @' D& m$ O3 s+ B$ y0 |0 M        for i:=1 to WH_nums loop
- H/ V+ I  \2 H( y5 T" @                Res:=sprint("Store_",i);3 p, J3 `0 f8 [6 O( z7 G
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
; T( c/ R& D2 Y2 W2 d# V# p                Obj.Label:=sprint("huojiaceng:",i);
1 O0 d/ s4 r( i7 S                Obj.xDim:=WH_x;/ v$ g. r: r# ]* t: M
                Obj.yDim:=WH_y;
0 I5 ?- A& l7 h  r. v                Res:=sprint("StoreData_",i);
1 V& I: m' m- ~* c! ~' M                8 ^% V# }+ U1 \1 ]' t
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);8 [$ \& O( e- I  M  {
                Obj.Label:=sprint("huojiaceng:",i);
8 F! w/ y/ B9 i* N$ K                Obj.inheritFormat:=false;
; t5 {3 W4 H, A6 \( Q3 w$ Y                Obj.maxxDim:=WH_x;
3 `0 j  k' U$ ~; @1 F- ^                Obj.maxyDim:=WH_y;% O- u' s; a& d
                Obj.ColumnWidth:=3;
+ e5 P; y1 ~. \' \7 B        next;
5 A# B# e/ |& ~& B       
4 y& T# \1 V" H3 X        .Delivery.MUs.Forklift.speed:=2;: S/ ]& d9 g4 r3 ^$ q. m2 e
        WH_var.delete({1,Part_Nums+1}..{*,*});' i% f8 @: H  x
        for i:=1 to Part_Nums loop! R% n  C( A% F4 i
                WH_var[1,i]:=chr(64+i);
) W+ `, K# O/ n0 c. F/ y7 i' B        next;
% p. V# @* Y' \end;
) w# r6 D' K: Z6 o出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了, r6 x) o' J8 i8 @% H" k
5 o0 M" E# `0 t* f0 k' f9 `

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-7-3 18:06 , Processed in 0.015376 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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