设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4298|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。) I' r4 c! V0 K
语句是这样的! m$ X$ J  K# K
is
+ y: l( F$ V+ A6 V        i:integer;: X$ s! B  F2 |
        Res:string;/ I& H- @/ d5 L2 M
        obj:object;
7 V+ ^  J! J& x- H* p+ \do
  L2 P7 x& n( @' C% f3 O        if existsObject("Status") then
6 k" e% c( p" m# E  z- a5 ~                Status.deleteObject;
' w5 B) W; A5 n+ {) q# x        end;
0 ^/ z9 B6 L% ^: W8 c$ r- S        for i:=1 to 10 loop3 u! Y$ I$ Z8 K$ a# A% u
                Res:=sprint("Store_",i);1 A2 q6 |$ _0 t  o
                if existsObject(Res) then9 r# h. d* Y. |4 U
                        Obj:=str_to_obj(Res);4 s" b: v6 Q" |5 ~. S' m
                        Obj.deleteObject;
% ^: j+ t. }  m                end;
& K6 d- i( ]: |" p  k        next;/ ~( `  }: a- T$ A# ^! n" @; r
        --shengcheng Status:zimoxingceng/ F+ ~/ @/ V* o- m% B7 {
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
7 V. p- Z6 a9 M& R        Obj.Label:="warehouse status";! k0 Z! r& x" \$ q6 C3 v
       
3 @; Q* ]5 b) M" O, Q" _        for i:=1 to WH_nums loop/ Y# P' ]; t8 y, B- n& e
                Res:=sprint("Store_",i);
9 l# q6 e5 p! S: H3 F5 ?. |                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);) J! M5 q9 s7 K: d
                Obj.Label:=sprint("huojiaceng:",i);
5 B1 @) [3 C$ ?                Obj.xDim:=WH_x;
' i" M7 y0 }' l/ Z                Obj.yDim:=WH_y;
2 q- @& _4 V. d/ L; v5 N+ e# Z, T                Res:=sprint("StoreData_",i);
8 F7 p: p5 Q  A$ f! @4 b' {% n  X                4 M# N- ]. @% ~! ]; Z% p
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);% y- B. c( N# _; P" N1 G
                Obj.Label:=sprint("huojiaceng:",i);" Q& d, |7 H! Y5 t; B6 [, _3 K7 G% o
                Obj.inheritFormat:=false;
2 e/ q8 v0 [% `                Obj.maxxDim:=WH_x;2 i" }3 O$ ], N& Q4 E
                Obj.maxyDim:=WH_y;$ G6 l' f( E1 P! U! _, i- z
                Obj.ColumnWidth:=3;+ }# o4 S9 |- e; @4 K$ |9 C6 d
        next;
8 Q! l0 U, x& {' q) U4 W6 Y" P( |       
0 |% {( @  `! P: N        .Delivery.MUs.Forklift.speed:=2;7 ^& P7 t) I+ ~- Y( i( \6 A: `
        WH_var.delete({1,Part_Nums+1}..{*,*});# r0 ]* ]9 T* u. ^5 }1 ?* n
        for i:=1 to Part_Nums loop( ^0 l- A6 _# @0 D& Q; ~8 x% j* W
                WH_var[1,i]:=chr(64+i);  o1 ?" K7 t$ v3 J- j' x; F% m
        next;
4 A/ v6 i! _* U% l" Send;/ a# O) J; K6 @: e; }7 w
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
2 I* w+ b6 D6 P3 B; l+ V- H6 T  p6 r) p# ]

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-7-21 19:36 , Processed in 0.015920 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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