设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3147|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。6 |- z. h* A- G1 v7 o2 i9 k/ x) _' w
语句是这样的$ H4 X, O) t3 @0 u: x
is
7 e) B9 s: J' W3 }        i:integer;
$ Z$ t0 f3 s9 p- ?( A" t( ^7 q        Res:string;% _+ X- @! |: B3 [* X
        obj:object;8 K* q0 J: {& t  _3 X
do
: M9 b$ y1 v- d2 N8 ?- S2 g        if existsObject("Status") then1 R2 \* o4 ?3 A: {- O
                Status.deleteObject;0 ~& H+ b7 ~0 T  A0 ~5 c$ N
        end;$ k* W! X5 L7 y  }  ?2 G! `
        for i:=1 to 10 loop
3 q+ `( b( m3 l# y7 x                Res:=sprint("Store_",i);( q+ e  v# F# J9 x2 v7 C
                if existsObject(Res) then( A% {: h( l4 G
                        Obj:=str_to_obj(Res);
. i& x$ p# d8 `  m. f. V' G                        Obj.deleteObject;( {2 T8 y2 \: G
                end;! l9 |, @1 M- c# a0 q, U  J6 F' S" D
        next;1 H# e' K7 i/ Y" T7 t
        --shengcheng Status:zimoxingceng
9 d" z) O' y. [- u" H! c9 \        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
3 O, j1 [  z5 j: N& B        Obj.Label:="warehouse status";
7 b; M, g, b( l       
, Y2 Z8 L8 n' Z; D# x        for i:=1 to WH_nums loop
6 Z& ?1 P* u* P( _7 h& g1 _                Res:=sprint("Store_",i);
! h9 y8 ]* O- }! d% d1 y( D                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
/ ]  {; g  t2 s* g5 T                Obj.Label:=sprint("huojiaceng:",i);
. U# `+ \7 m8 _6 v) s0 r9 }                Obj.xDim:=WH_x;
% P! \1 p7 `4 t( V; c5 N3 t& ?                Obj.yDim:=WH_y;+ T9 A/ m8 ^$ t( V2 T
                Res:=sprint("StoreData_",i);
6 C& ^6 Y. `$ ]- i8 g: J                ) K( h0 j* F* d8 B3 W
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
9 B8 H, s0 @7 m; N& i                Obj.Label:=sprint("huojiaceng:",i);
  ]" q% B& i1 R* {                Obj.inheritFormat:=false;. \3 Z/ l/ \5 o, W; K
                Obj.maxxDim:=WH_x;# ^0 q0 r& P7 b4 b( s. X5 c
                Obj.maxyDim:=WH_y;
2 E0 ]3 F5 f! y( \2 C                Obj.ColumnWidth:=3;4 n2 {' C% u, V) Z( E
        next;& u( ^$ [6 b4 B& g9 k) K5 P/ N
       
, j6 j) |( b! {0 {: p% |        .Delivery.MUs.Forklift.speed:=2;
: Z7 |( F7 I+ r  I8 i0 S3 a        WH_var.delete({1,Part_Nums+1}..{*,*});8 l- U5 b4 @* i8 Q- `: v
        for i:=1 to Part_Nums loop
$ t' ~2 k3 j) u; I, J% W1 t                WH_var[1,i]:=chr(64+i);+ H! ~$ p0 M+ h
        next;& m, W" I& K$ c9 C$ S$ i& ?
end;
! D  r& y) R" f' C7 t出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
& \0 F0 Q$ Z9 c7 a
  b7 _( Q: j7 k

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2025-12-29 03:26 , Processed in 0.017173 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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