设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3533|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。7 V8 E. T5 y* _5 R
语句是这样的9 @% V% k: G9 a+ v2 B6 I
is
1 s( |" H; {" H6 b; s9 i        i:integer;
! l* A: H* ]9 w6 X3 V        Res:string;3 j2 b# P' q6 _: N
        obj:object;
7 \+ o* _' V4 J5 M- \  v; `) Fdo$ k" u+ r: b) l% @1 u- y
        if existsObject("Status") then* p, j3 `# h2 Q1 |8 m. g9 Q( m
                Status.deleteObject;
5 D+ L7 L& y* c4 v% t7 Q+ Z        end;, a2 }7 l+ O; _; F
        for i:=1 to 10 loop. T' G9 Z3 V4 h4 v) I4 x( r: `0 J" P
                Res:=sprint("Store_",i);
; G( F! v7 Z% a$ ?8 l. Y                if existsObject(Res) then
1 x0 B: t) X6 ?+ I* Z# S6 s                        Obj:=str_to_obj(Res);" P( [; }7 j. @% r- m
                        Obj.deleteObject;
+ V6 `; p1 [( w9 j" V                end;, R# d! R% p2 F  B# c5 `
        next;5 P1 Y# M9 @. W1 E# |6 h
        --shengcheng Status:zimoxingceng6 T! E+ z% O9 I
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
. M1 o0 E( U5 y$ H- x  P        Obj.Label:="warehouse status";/ S$ j% b, B3 [% H
        / O0 B2 `+ o, L1 d1 |% j( p) l
        for i:=1 to WH_nums loop
5 u8 E+ N) Z0 \! w0 _* i0 S8 R                Res:=sprint("Store_",i);
2 D* Z7 v& K/ m7 M8 _4 s                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
  n; q6 ~0 q! ?' `7 K                Obj.Label:=sprint("huojiaceng:",i);( M/ M9 G) \! i0 S2 l  X
                Obj.xDim:=WH_x;1 N: N/ K3 N9 V( D' q& e
                Obj.yDim:=WH_y;; s6 {4 x4 e( m: P
                Res:=sprint("StoreData_",i);
" n1 B& Q6 Y$ E$ `7 x, I. [                8 \0 F  R5 K. N, d" J9 j' [3 P# G& P
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);1 G( ?# ]/ T3 _( u
                Obj.Label:=sprint("huojiaceng:",i);1 e- h: M1 C5 \. P
                Obj.inheritFormat:=false;; p( q! x0 \% K
                Obj.maxxDim:=WH_x;
! a3 e7 c% W% a$ ?, n1 U                Obj.maxyDim:=WH_y;
, n: |$ |0 m( L: \# M& e8 w( I. y+ h5 q                Obj.ColumnWidth:=3;
4 V' O4 Q1 X, c$ E$ Z        next;
+ g9 z+ l* n% p       
& z9 T% p8 [8 ^) w        .Delivery.MUs.Forklift.speed:=2;
7 d- Q, i9 k$ d: g, ^# z! O! o2 f2 h        WH_var.delete({1,Part_Nums+1}..{*,*});, Q4 D" t* i* n4 b2 _' S
        for i:=1 to Part_Nums loop1 v* `2 t2 b8 O) \% j
                WH_var[1,i]:=chr(64+i);
  e1 G& {: i& S! r  j( M( n* K' ]        next;
  K) u0 W. D4 R, f0 Eend;  K* ?' J8 L5 g
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了' I; \/ p1 X+ l$ e% w$ ]

  K1 ?! }) f" w

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-3-17 07:27 , Processed in 0.021447 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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