设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3270|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。4 W" S/ n1 c5 ~4 B5 E% s, F
语句是这样的
, c% `: F# L% K  lis4 _# s5 B4 X* c' L# l, k) x  b9 T5 u
        i:integer;( K' M4 y6 t0 o
        Res:string;( D( I9 X7 \$ J9 w1 j) h4 v& ^+ G
        obj:object;
4 d" r' \1 W7 {! ado
4 L# x* j7 i( c# t" E        if existsObject("Status") then
1 U7 v# Z% v' Z* {1 Z                Status.deleteObject;
5 z5 B0 p; O2 ^        end;
. D/ L& {7 o& r9 I$ i5 W        for i:=1 to 10 loop" {' c( _1 o# H8 y- T5 a: G
                Res:=sprint("Store_",i);+ Z: q# l2 U% ]9 a
                if existsObject(Res) then4 n0 ]" v: U8 t4 R! _
                        Obj:=str_to_obj(Res);$ X9 y; L5 T% r' |; J' M
                        Obj.deleteObject;( U# Z2 S  s& d3 x! a4 |
                end;
  G; Y; r- e% s' }2 L        next;3 G- ^  j! F8 X* J1 {
        --shengcheng Status:zimoxingceng
( q) `+ l; @8 Y2 |' a8 _        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");$ E8 F7 @: n, m
        Obj.Label:="warehouse status";- g; J: Q5 p6 J% c
        4 n5 ~3 P: x  X: ]1 A+ y
        for i:=1 to WH_nums loop5 x7 P6 E' H6 o" m! q4 u# \0 r& u
                Res:=sprint("Store_",i);
! X. w9 u. O; ]' y# J1 F( v/ F                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
& w5 y/ N6 R/ q& g0 C                Obj.Label:=sprint("huojiaceng:",i);' I. @6 `5 o5 H' o5 b' D
                Obj.xDim:=WH_x;
5 m3 ?7 a) i' S                Obj.yDim:=WH_y;9 t$ H7 m2 I% i+ n7 j% }' K
                Res:=sprint("StoreData_",i);
  Y5 z+ T* x+ l4 N' P+ L6 x               
; M. o" o+ j( B$ l) V                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
9 \7 {0 {8 a3 M0 M4 z                Obj.Label:=sprint("huojiaceng:",i);4 t2 c/ ^! q$ ]6 h' U+ K# y
                Obj.inheritFormat:=false;
0 H9 s; R' @% {. I6 b                Obj.maxxDim:=WH_x;
% }. ~. ^/ H/ o: A8 p                Obj.maxyDim:=WH_y;
6 V. m& j+ u% k1 x0 \$ Y                Obj.ColumnWidth:=3;+ B" {, [! n0 h+ r0 t, M; n8 `
        next;
* N" |" B6 `6 E% C9 d        * G5 w) k( s3 f* Z: D
        .Delivery.MUs.Forklift.speed:=2;
  M+ U. Z- n5 Z1 N        WH_var.delete({1,Part_Nums+1}..{*,*});
, p. Y0 P! W  |) N: o: {1 j        for i:=1 to Part_Nums loop/ J0 ~# F" S: l* E; l7 f& ]
                WH_var[1,i]:=chr(64+i);
9 C7 Z) }& T, k' h        next;
5 y9 \  r, \$ A$ ~end;
: G1 g  m# ]& h6 e, `出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
2 B  f/ T6 |2 a* X6 n; c+ d
/ f, n" |- h5 r8 Q  _% ^

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-1-28 19:11 , Processed in 0.017463 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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