设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3731|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。8 G; m% A. a8 Z7 Y  n6 F$ h
语句是这样的$ Z, E6 S' s; M8 g- O
is
; V3 c) I3 Z6 q" Y/ P. J2 u% M        i:integer;
0 @$ @7 B+ t0 [  n4 i. f3 e  f        Res:string;
6 C; j, U/ @" H7 Q  Q        obj:object;
4 A9 V" Y  k5 b1 v+ @5 Kdo( r+ K9 ~$ L1 f9 f; @
        if existsObject("Status") then
4 [3 P7 ]7 h8 b$ x$ \3 g% s! j                Status.deleteObject;
$ f& u4 M3 R" q        end;+ i& u. P7 U5 k+ f1 L. L
        for i:=1 to 10 loop
7 L: G' N1 V$ @6 q# n                Res:=sprint("Store_",i);
$ R3 H: ~6 O4 B5 q+ P                if existsObject(Res) then: h2 j$ a$ a" V2 c% E$ \
                        Obj:=str_to_obj(Res);# o0 C9 B4 Z0 Y
                        Obj.deleteObject;2 [9 z5 k% P! M" f. L5 b% ~2 f9 k
                end;
' H, s  P& v' M8 V        next;5 P( _# n5 i; \) ~% e5 y
        --shengcheng Status:zimoxingceng2 t. r4 F; y% g* Q" n* S
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");% A0 W4 Q; c6 E/ n: b
        Obj.Label:="warehouse status";) X' _# W1 B" D8 F
       
: x& s* y* g1 `0 s' c        for i:=1 to WH_nums loop% O, [9 V0 \# g  n* N/ s
                Res:=sprint("Store_",i);9 f9 H: T/ h8 @  A
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);7 U# Z) v& _! I- p
                Obj.Label:=sprint("huojiaceng:",i);2 ?8 F4 U) g5 H/ _, O2 y9 L  n  ~8 ]
                Obj.xDim:=WH_x;, u- H& R! H% ~' W, W
                Obj.yDim:=WH_y;
" o4 [4 W0 g3 r                Res:=sprint("StoreData_",i);
7 d( w1 y- c" a7 _, `                * v0 k; `2 x2 x- u
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);' G2 A# V+ q) d5 e1 l- @0 i8 Z
                Obj.Label:=sprint("huojiaceng:",i);( x: ]6 X1 X8 Y" T  M% z
                Obj.inheritFormat:=false;
2 Z* Q/ g+ l, I% n. o) S, S3 Z- e                Obj.maxxDim:=WH_x;" R- U9 ]6 n! ~3 C' `1 w
                Obj.maxyDim:=WH_y;; H! {$ L! Q. O; P, V- G" o& H5 B! H/ V
                Obj.ColumnWidth:=3;/ f- z& z- |+ R" a6 V
        next;5 D& A: Y# n2 N! f' Y8 I
        ! P# O( G. c# V9 d; d$ S- n
        .Delivery.MUs.Forklift.speed:=2;0 `/ v$ B# ?' p# e% V3 B! g& N( j# ^
        WH_var.delete({1,Part_Nums+1}..{*,*});
: L" _, @$ U. K, R        for i:=1 to Part_Nums loop
, b2 n: q5 o" ~/ j                WH_var[1,i]:=chr(64+i);+ t1 f) A  c& q" w
        next;$ O- p  B+ j. R  J7 b. v4 H( G
end;1 ~8 C# M! {9 H" Q. g& m2 b" ?3 w
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
( b- c2 e- q: |  s6 u6 i! X
' a/ t# Q. e3 q3 J" n* j% I

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-4-18 19:08 , Processed in 0.032907 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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