设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4488|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。; a9 K# }1 z2 P0 D
语句是这样的
1 I5 I1 d; j4 U! U  zis% e. _' `: ^5 n
        i:integer;
, ?. e6 d' [# n/ h( l        Res:string;- j4 D2 X8 n' y0 l! _) }9 b1 h+ @
        obj:object;
9 g+ Z5 e2 u+ D2 hdo! O+ T& P! m0 `5 C* Z4 X
        if existsObject("Status") then
) i7 p) z5 s6 |% U                Status.deleteObject;
3 q* n( T. i# t# B/ s1 p- o        end;
1 O* a0 K6 o" v) E; w. T        for i:=1 to 10 loop; Q1 Y) s5 A" |6 d
                Res:=sprint("Store_",i);( g' _! ?, `$ F; E' h
                if existsObject(Res) then
) V, @* V  A+ S. P. n                        Obj:=str_to_obj(Res);
! N9 F; w! o- A/ R- |                        Obj.deleteObject;. z! o: R- }* R" ~' n4 ?  I6 J" a
                end;
" Y( t' h+ K( w- t% C$ ]/ p- ?4 Z        next;2 W" o5 ?) F, R" k1 H" j7 f
        --shengcheng Status:zimoxingceng
1 w% ~. d! m9 s/ J, D1 d        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
! `9 |; S$ C5 a8 }        Obj.Label:="warehouse status";
3 F+ Z1 S% I3 h8 v* _       
$ `+ p4 [8 [# g/ q; H        for i:=1 to WH_nums loop/ F3 m. Z2 p2 b9 @
                Res:=sprint("Store_",i);
; `% w3 a6 Q, f$ ~                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
4 Q8 ~) E8 ~( M/ L4 s& \                Obj.Label:=sprint("huojiaceng:",i);8 |3 b# b' j8 p$ A
                Obj.xDim:=WH_x;& K. P1 M! ?0 l4 d& l0 N- l
                Obj.yDim:=WH_y;7 x/ L% `" ]- x6 y8 S
                Res:=sprint("StoreData_",i);8 x( `. R7 p# ?% ~% A6 W
                1 @1 q% O/ s; }/ O' P
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
# ^8 b' C- w: u8 ~# `9 d4 G- X& A                Obj.Label:=sprint("huojiaceng:",i);9 \: t- o2 u6 {
                Obj.inheritFormat:=false;* {' B9 `, W3 n( N: }
                Obj.maxxDim:=WH_x;) O/ W0 T& X+ }# t. M: x3 \% e6 n
                Obj.maxyDim:=WH_y;- f% d5 V- E1 {2 B# b' d9 g0 J
                Obj.ColumnWidth:=3;1 d8 d! ~9 E3 i; z& E
        next;7 i  R" ~; W+ K$ b. [- @
       
+ [4 j& F1 ~/ s* _! H+ s1 q        .Delivery.MUs.Forklift.speed:=2;
1 V) [- ~# t  G# J4 [/ z: _        WH_var.delete({1,Part_Nums+1}..{*,*});
7 U1 B9 K7 \- K' Y        for i:=1 to Part_Nums loop0 l2 I, h# a: u1 r( {. p
                WH_var[1,i]:=chr(64+i);9 ?2 L. C6 ~' U( D+ a
        next;5 P3 {# m( _* Z
end;
0 J. s' `( D* Y' T! \9 p' O3 A出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了5 o% c" t  R- ?6 O
6 N* Z, I4 Q6 ?4 [! r* W3 G* h* i3 u

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-8-21 02:55 , Processed in 0.019892 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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