设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4573|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。4 u3 H/ l7 J: |" D9 z% M- U
语句是这样的$ F, k' O  P$ z& }, O
is7 Z# ~9 Z2 q. [( v8 m. t
        i:integer;
: a6 U  X' K, ^- ?) n# {        Res:string;; b; J* I* Z2 Y" B+ V7 z, W
        obj:object;  |8 h$ a& s: e8 P6 v/ \3 R9 R
do
( ~: O: T: z% q6 F3 q& V& L: H$ l        if existsObject("Status") then" I# `4 ]& M" V; x
                Status.deleteObject;
; x$ n# u+ t3 c3 i3 S; A6 I        end;$ G. h, K/ e0 @: R) ?
        for i:=1 to 10 loop
1 _) h9 K$ v7 ?3 ^                Res:=sprint("Store_",i);
# [- c. A" n* g' H* Z                if existsObject(Res) then6 A* ~+ O& w+ E% Z6 r
                        Obj:=str_to_obj(Res);' K% f: H# o+ H5 Y4 E
                        Obj.deleteObject;( b" R8 y# U( s; `( L
                end;$ N1 n& `- B  I0 w5 R+ w  }
        next;& B- L0 d* a1 @9 o3 N; U
        --shengcheng Status:zimoxingceng  D$ r1 f3 L8 _2 D2 F
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");  O, Q" ?" M1 n0 P+ c& @* j) `6 |
        Obj.Label:="warehouse status";- a4 h9 K+ R+ I
        & D' H; N. d  N/ f- r$ X/ L
        for i:=1 to WH_nums loop3 |" c/ O9 [1 [4 ?* I0 s- o
                Res:=sprint("Store_",i);' _  p- M! u2 m! H& Y
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);2 \3 \8 g; T3 p( \8 r1 O9 X
                Obj.Label:=sprint("huojiaceng:",i);7 B  k7 ^7 w! d9 J8 t
                Obj.xDim:=WH_x;8 }( c. Z' G, ^. M
                Obj.yDim:=WH_y;
9 p6 t0 I; E7 i' m. D- S8 s( F8 q9 M                Res:=sprint("StoreData_",i);
' e: c+ u9 I0 X                ' M$ P2 M" m1 R& _: |$ Q& {2 u3 `
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
" p  p0 a1 E4 ~                Obj.Label:=sprint("huojiaceng:",i);! g% X8 e  d2 x8 @* x
                Obj.inheritFormat:=false;
- A* S/ V% J5 Q4 T5 b. i! F) u( M                Obj.maxxDim:=WH_x;, r) W4 j, D& F$ {. |  l0 \/ |# p7 ~: a
                Obj.maxyDim:=WH_y;
7 X- e* L% o# j% f/ y# o                Obj.ColumnWidth:=3;
* D1 [. s# V  `: M        next;
! S; J  m0 C# p3 Q        ! G5 J5 j* E' M; e8 ?4 d
        .Delivery.MUs.Forklift.speed:=2;
- d4 W4 X, P3 x$ {5 ?2 ^, R, @        WH_var.delete({1,Part_Nums+1}..{*,*});
1 L9 d0 b% J' {- p" ]1 R+ D; @        for i:=1 to Part_Nums loop) w  u/ J- V5 Z) T- |+ V8 V
                WH_var[1,i]:=chr(64+i);
1 B  {; w3 x; r7 }; @* h7 @5 ]        next;
. s/ o* m$ t+ U$ }- X3 [end;2 g# n6 ]5 H( j$ |3 f
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了- h' n7 s  k$ m2 E2 ~

/ ^6 y8 C, T& x4 F8 a1 S) G

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-9-4 05:44 , Processed in 0.016687 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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