设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3796|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
; `4 t2 G% d: q4 x语句是这样的! }; g$ }0 `6 b; D6 l0 i9 T
is7 {5 x3 s4 C% Z
        i:integer;) {0 b2 |+ g- Z, c
        Res:string;
% O/ [6 j. J" B% |6 ^        obj:object;2 X% N. t# e/ C1 L2 b4 O: Q% i1 v
do& V) P$ M; ^# U- t, z  e' R
        if existsObject("Status") then# u( k. r" O  R9 l
                Status.deleteObject;
% w' U  E; h/ A7 X- {        end;* T. X7 B) _0 Z( N: G
        for i:=1 to 10 loop
  `$ V' ?7 t/ m$ k- \                Res:=sprint("Store_",i);
, B& S9 h+ V: {! ?. ]                if existsObject(Res) then
0 H0 ?. r7 Z" T/ G: E- B- _% F                        Obj:=str_to_obj(Res);% q1 ~* K' j4 P5 \
                        Obj.deleteObject;' [+ p. A! ?; E5 u' ^' P
                end;
7 H% W. ~" x3 b* U        next;
2 _! f* y! N5 y6 m7 E" x        --shengcheng Status:zimoxingceng# x# v# c4 I. \$ N# t  U1 E
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
8 E& S% e0 C, c        Obj.Label:="warehouse status";! Z, U1 T& l8 K1 _3 h0 }/ P
       
' i6 S' H' a0 W+ T; t        for i:=1 to WH_nums loop
; ^& b  T: x* c, r: |                Res:=sprint("Store_",i);+ m" R, F' r4 R' {7 w( b
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);. E5 V: i4 k& U
                Obj.Label:=sprint("huojiaceng:",i);
! T% H/ c5 z# a  L/ }/ a                Obj.xDim:=WH_x;/ g% T8 l% J. C! P6 H6 e
                Obj.yDim:=WH_y;- z0 B7 p$ ^4 D) s5 T% H. j
                Res:=sprint("StoreData_",i);
0 K" h$ h8 j  m7 p2 z0 W8 @               
8 |: V8 S9 J$ e$ x) j                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
& e0 V) S. F3 `                Obj.Label:=sprint("huojiaceng:",i);/ i9 Z' H3 Y, W! o3 W6 I
                Obj.inheritFormat:=false;# d& r% l0 I+ d% n0 ?* x8 j  t. ]
                Obj.maxxDim:=WH_x;
( w' |2 s! F7 x                Obj.maxyDim:=WH_y;
) z- `6 z' S) A                Obj.ColumnWidth:=3;. b# C2 W- U& ^
        next;
  \1 Z& V9 r3 `, }: s5 h( S' k       
8 F: a  a+ D" M        .Delivery.MUs.Forklift.speed:=2;
  Y- g/ s/ f$ f2 o8 w, I        WH_var.delete({1,Part_Nums+1}..{*,*});
+ |9 H; }- ^# Y; o( n  j' N        for i:=1 to Part_Nums loop
" `* J* @! r: y3 @8 d8 f2 V# S                WH_var[1,i]:=chr(64+i);
" u/ D3 c. Y6 J+ I/ G' Y/ R7 |3 Y        next;- d! d% {; g6 e8 r! V% \9 j
end;
8 ?, C+ T7 C( T0 F8 E出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
; L8 }! t6 I+ ]% o% M* q
. ?( _# Y& l4 Y

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-4-28 01:24 , Processed in 0.018295 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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