设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3502|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
" a* n; Q' M6 H- V( e' G' U语句是这样的/ M6 y/ k  I& s3 Z+ W/ ~  M; {
is0 S0 D( p' v' z- E4 B7 L; d
        i:integer;! f& V2 K- |7 J6 E8 s- ?& T
        Res:string;# E/ Z; {+ J1 j( t
        obj:object;
$ y- V  P8 b+ I: Ydo
* P, q3 x# E& }( N        if existsObject("Status") then
5 d% W6 U& O) T: i; Z                Status.deleteObject;
% I5 u8 r' p6 ~: R& D& H# ?0 n        end;4 K" ^5 R2 E% B& T4 s) J
        for i:=1 to 10 loop
( J, M1 t& }* ^! [% v/ }- a- D                Res:=sprint("Store_",i);
) R( F5 w+ U# e( ~9 _' ~# V3 S: y                if existsObject(Res) then7 v9 `& M: M# l  I! z
                        Obj:=str_to_obj(Res);, i( n7 B4 ]: }% J  w
                        Obj.deleteObject;
& Z! e7 M$ c! _9 Y8 R0 i                end;! i5 w" c9 l4 ?
        next;% J0 @5 v# g  q% v! v
        --shengcheng Status:zimoxingceng
! u- Z6 m9 h: y/ {  |4 }  F        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
3 O, v" s" O1 y: l; D        Obj.Label:="warehouse status";) j! A- X8 a# L
       
! {5 o) ?5 z, ]        for i:=1 to WH_nums loop9 s' n' A5 S, s+ {
                Res:=sprint("Store_",i);& ^/ v; e0 x! R! c. C% U
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);0 C' K+ w, b$ h. n& Z, M
                Obj.Label:=sprint("huojiaceng:",i);
' C( x0 }% Y4 O# M' L- L2 P( `! p                Obj.xDim:=WH_x;
% G6 s, ]- Y5 K* k( b* l3 x+ b* @# Z                Obj.yDim:=WH_y;4 \8 p" u$ p5 j" s" H6 a
                Res:=sprint("StoreData_",i);
6 @2 w0 q7 K1 p! V& y" J               
) ^$ W' t6 ~' |# m                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
, @; A: a4 k" l  _4 C9 t* s+ t' v3 f* H) k                Obj.Label:=sprint("huojiaceng:",i);: Q2 n( E5 h# R
                Obj.inheritFormat:=false;( z$ F. h6 l" n; q/ F% B
                Obj.maxxDim:=WH_x;5 E5 G4 g# z, N8 ]
                Obj.maxyDim:=WH_y;
+ f% l# j+ s; e/ ?                Obj.ColumnWidth:=3;
/ f' x/ `, U6 B# G! P        next;
4 K8 ]. _2 l# `5 z9 S! z/ P* ^        * q. B& o  X5 H' P/ Y! ~6 W
        .Delivery.MUs.Forklift.speed:=2;
$ J, P- m. {+ n; C& ?8 I* |6 }& A        WH_var.delete({1,Part_Nums+1}..{*,*});7 g% E6 C. Z& V+ `  }
        for i:=1 to Part_Nums loop0 M7 w$ E; n' L7 O  A, l
                WH_var[1,i]:=chr(64+i);
0 Q6 x5 E, B8 m        next;3 n: U; ^& l0 V# a6 r8 {) O; u) I
end;
+ N3 T' I% F0 r6 H) t出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了$ P6 P5 N& T" g) f  ]' A

" @4 k0 s0 ~/ Z/ N

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-3-11 10:19 , Processed in 0.016824 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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