设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3817|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。# v9 J  ~+ b6 R) i* Y
语句是这样的+ U# r: t" O) K' L  @$ w
is
- |" Q2 ?8 _% s5 ~        i:integer;
/ g( @, [* @( j! M        Res:string;. f) y% t! u* q2 Y, c/ ]- b
        obj:object;4 w; g2 D7 @0 P! @3 j6 S- x/ U- V
do
  y8 B. ?9 U1 O6 O9 r        if existsObject("Status") then% O% y) G$ a! F. h( t( f9 Z% [
                Status.deleteObject;
5 w2 {2 P# K; R8 Y5 b; E$ l        end;
# S) B% g* u$ X+ l# W* a/ y1 }; M        for i:=1 to 10 loop
0 H( ?& T3 |% u8 e                Res:=sprint("Store_",i);  ]+ v3 O7 ~0 T. R4 P
                if existsObject(Res) then
% J0 H" R& L6 f, ^# T0 a% S                        Obj:=str_to_obj(Res);- S3 F* P3 E- w- C" t
                        Obj.deleteObject;
4 G! U- L; o4 P" f& g# K. [                end;8 K2 ?9 j' s! ]8 U( C
        next;/ G9 m4 E0 O0 D7 j% M
        --shengcheng Status:zimoxingceng( H; q9 X1 e* e5 \: o: P0 |
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
. t* u7 B8 m/ Y# Z  C6 {        Obj.Label:="warehouse status";
& S# w$ N! Z" r0 N( J4 V. o       
5 f; k9 B6 ^- L/ k! Z1 E6 l4 z7 L: \        for i:=1 to WH_nums loop2 R' I( t. ~+ T* k* |7 a
                Res:=sprint("Store_",i);! ]0 J/ q# H' N2 V6 ~
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);" n  D+ K2 E3 {4 K, P0 p
                Obj.Label:=sprint("huojiaceng:",i);
/ t( j4 n1 v5 ]% a8 _, w0 H  P                Obj.xDim:=WH_x;: \. Q# R7 L- {' K% F% H( X& o
                Obj.yDim:=WH_y;
1 d2 M9 t. ]' K2 f8 s                Res:=sprint("StoreData_",i);
4 o$ B8 p1 c* W) C6 n$ c               
7 D, T0 \" q; @. M3 {% X0 Y                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
" N1 o2 `6 J2 h. H) w( x. F7 q                Obj.Label:=sprint("huojiaceng:",i);1 ~2 Z  r3 Q$ ?6 c
                Obj.inheritFormat:=false;
! b9 B- D2 l5 a                Obj.maxxDim:=WH_x;0 a5 v4 ~- p! n
                Obj.maxyDim:=WH_y;
1 q1 [0 N& Z& k* z  G: C# P( v                Obj.ColumnWidth:=3;# g6 r) r% h: H( v- a* _3 @$ c
        next;  a2 v' _1 t: }0 i  s' T
       
! P0 w. R  M" E' b* }! w        .Delivery.MUs.Forklift.speed:=2;1 P. O. g8 S, ~3 O' {! s
        WH_var.delete({1,Part_Nums+1}..{*,*});
6 A9 {$ K# N+ x        for i:=1 to Part_Nums loop! \2 @* c- @  S
                WH_var[1,i]:=chr(64+i);
! f- i$ x0 ]( q0 s5 H' \        next;
! D7 H! n, t+ d8 b7 @5 dend;" H% |! R. G- O$ G8 T( ]3 W8 I  @. ?
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
$ }' l6 i: I3 f
  _" q6 u; q. x/ S4 q, i! j. |( v' F

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-4-29 19:22 , Processed in 0.014308 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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