设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3838|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。* B0 J6 [6 E9 h8 D8 }* U
语句是这样的+ W3 y4 o" B! D: [& w5 ?3 i
is
+ d8 u( S, h. q! F2 c2 u        i:integer;6 L. h# h+ E& h9 d1 G
        Res:string;
. o. W, `( n' h1 ~3 Q        obj:object;
+ R1 ]5 K7 w: O& E1 g; O) e0 j- Vdo
2 M% K) u4 y4 Q1 ?$ S. V1 M        if existsObject("Status") then
% U) n- }; S& ]) q: d% ?                Status.deleteObject;, v1 t! l( G: ^+ m$ S$ F
        end;
2 d- _- a& T; A2 e8 N, ^        for i:=1 to 10 loop
. B! F" i' j2 S1 e/ n  k                Res:=sprint("Store_",i);
- E# J4 j8 J, B4 g( k! |                if existsObject(Res) then) X7 g( q+ v/ x' i' d
                        Obj:=str_to_obj(Res);
1 K8 d) I/ @3 U4 J0 B                        Obj.deleteObject;
, u6 U% S% r* n# ~; M8 ~: a) R                end;& P" ]7 f7 ?3 b3 K- ~& ^
        next;
, N  ]. N6 e" [- F* i4 F2 T        --shengcheng Status:zimoxingceng& t& I" r1 M9 P, l7 R, m% ?
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");* r3 g2 B3 m: `7 G% r* p% i/ L
        Obj.Label:="warehouse status";
/ U8 j! {. J) p: R5 m+ Z. H) G6 W/ _        8 _9 @. }% t/ }: S9 Z
        for i:=1 to WH_nums loop
/ `& u& p& f1 h& @8 t' X8 @$ S: Q" n& m                Res:=sprint("Store_",i);3 ~, j2 B8 F7 _0 {/ I
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);5 S: Z' X/ Z$ x
                Obj.Label:=sprint("huojiaceng:",i);
6 x& _8 N4 O, ?1 Q2 G2 M* G                Obj.xDim:=WH_x;2 D; L( X* {7 i7 |+ J3 b
                Obj.yDim:=WH_y;8 e; h' W0 d* ?1 `9 t1 c+ G, D; ~
                Res:=sprint("StoreData_",i);
& _( U0 r- }$ X& t# ~: }                : _3 L" |1 V" S0 d! \
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
2 p, S8 r. G& p( G+ z9 w9 Z                Obj.Label:=sprint("huojiaceng:",i);/ d: h! R- V. q# _$ ~4 {
                Obj.inheritFormat:=false;  e% m9 E; F/ X2 y4 h% a
                Obj.maxxDim:=WH_x;  r0 B; L# S/ y/ o. p+ b/ w
                Obj.maxyDim:=WH_y;
9 D6 d% i# {* `3 L; D# O* q                Obj.ColumnWidth:=3;
: M0 J. N1 B9 ]        next;
# W" n$ p( J; ]8 {, w       
3 a0 K8 N( e% H3 p  q$ V8 [# }        .Delivery.MUs.Forklift.speed:=2;- {; w0 k5 P4 T" ?9 ]1 n) {
        WH_var.delete({1,Part_Nums+1}..{*,*});
1 L# [4 c5 B1 t        for i:=1 to Part_Nums loop
5 j/ j8 J0 {1 I# j: ^9 L, g1 o                WH_var[1,i]:=chr(64+i);
: I- V/ U% ]* V) ~6 @9 D2 X        next;
# r/ _5 W. Y/ j0 G6 ?end;
- X4 x5 ]' {0 A' s8 D4 Z( T出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
8 N1 e) ]4 X) `4 _; a4 \5 d
& R  ~9 }, T" B6 [( ?" ], k5 s$ Z* L

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-5-3 11:12 , Processed in 0.015051 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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