设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4269|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。* W- E2 X1 X/ ]
语句是这样的
9 _/ {& F+ Y/ h* x* T+ r% L: bis
, V, O) U! F, n" [- {1 I  j7 M        i:integer;
) d# `/ B! [3 l0 i4 \, F% U        Res:string;% Z$ i2 F2 X; ^2 m# u* e
        obj:object;
& i0 {. f& [+ M. ndo
1 |# M& d. u% c9 y. G- n        if existsObject("Status") then
$ Y, m' u/ t& @: O  [/ r9 x                Status.deleteObject;: h& t  ]' ?7 B4 q0 c1 o
        end;
# `4 w9 n0 C7 s        for i:=1 to 10 loop+ i6 |" ], r. g" Y! U! q9 Z! A' \# M
                Res:=sprint("Store_",i);
0 U8 W5 P  o- X                if existsObject(Res) then
8 _& M, U" S" @& G+ a                        Obj:=str_to_obj(Res);$ X' \3 y! n% A" R/ }
                        Obj.deleteObject;! O" O/ M' C+ [' r
                end;( ^. |7 T1 o, L6 G7 v
        next;  w$ h  {$ T. `( t/ _
        --shengcheng Status:zimoxingceng4 G: s& |) w+ i
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");' E' C3 B$ h. L2 T" G8 V
        Obj.Label:="warehouse status";
) Y; M: K3 I; ~        + A3 g' i! A: X! Q
        for i:=1 to WH_nums loop
( ~; |5 E' r$ t, W7 U) B5 V( q                Res:=sprint("Store_",i);. M/ i# d0 I  V; _' D: S
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);+ K* C" K' P2 @
                Obj.Label:=sprint("huojiaceng:",i);
0 J* d  ^7 @& U% d                Obj.xDim:=WH_x;
# s" h( b& C4 j                Obj.yDim:=WH_y;# {4 G; d; ~% g2 C6 L" l! o
                Res:=sprint("StoreData_",i);
/ a6 Z+ Y7 i# |- O                  X: n# g, Q( t4 P( Y! p  t8 T. P
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
6 ?* w# n5 a" z                Obj.Label:=sprint("huojiaceng:",i);! E& d0 r2 F0 C! e: O
                Obj.inheritFormat:=false;
; k4 u1 i6 U7 B                Obj.maxxDim:=WH_x;# q3 m' H# B% I( N4 X
                Obj.maxyDim:=WH_y;
9 b- r1 Y; {5 a3 J$ w. J                Obj.ColumnWidth:=3;% z6 O+ k* v: J9 [8 o, ?' B
        next;) _) e4 {0 m  X9 t
        ; b9 @1 y# L* R+ w
        .Delivery.MUs.Forklift.speed:=2;& r6 e9 g( I& T: Z) n
        WH_var.delete({1,Part_Nums+1}..{*,*});( e7 @: f9 K8 m4 e- s0 d* F+ B% o
        for i:=1 to Part_Nums loop4 B& O& O5 [* l' x
                WH_var[1,i]:=chr(64+i);
0 X8 T( Q3 `" q        next;- L+ r8 @! _- b7 L: p
end;
* @! P6 [7 A' H9 M8 Z" {出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
6 E8 a' Q2 D* }/ l3 j0 e( d
; A7 L' l* X) Q6 E7 y3 r7 H; l# Q2 n# N

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-7-16 19:49 , Processed in 0.015477 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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