设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4084|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。& q0 v! E/ O! H7 [9 G& f6 Z- l
语句是这样的
, h) }5 `8 I% c! e9 X- _" B  tis
: n) O0 Q  `" q6 Z& P        i:integer;
  x8 E# X9 p( b/ R3 M        Res:string;
7 b& X1 i! y7 r1 R, X) ]  z        obj:object;
( n  A% p4 Z! E1 q5 j3 Fdo& p3 D2 e5 T/ e" k! J
        if existsObject("Status") then) l0 b5 C8 \) B  _" y
                Status.deleteObject;" w! R' I: D" }# ?
        end;( @% A1 g- U2 C
        for i:=1 to 10 loop
: Q# C" E$ U( Y0 ?* ?9 Q1 R% f                Res:=sprint("Store_",i);
# j- m! V- m! Z0 D1 `% w9 N. a/ ?( @                if existsObject(Res) then5 H! r$ z+ G! I5 V3 Q6 S7 b
                        Obj:=str_to_obj(Res);7 l( n+ _" a" Y, o3 x7 |6 Q
                        Obj.deleteObject;% Z# h6 g$ o3 S5 H% G" ~$ `6 V
                end;/ M2 @$ H3 S  T! U
        next;
/ A+ Z5 A5 N0 Z8 r' C2 F! |        --shengcheng Status:zimoxingceng
: c. y3 W, T6 b- V        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");; H) _; \) E* D/ \+ M/ a0 \1 ~
        Obj.Label:="warehouse status";
. }' z8 ~1 T. @0 @6 A# N4 h+ J4 w        ! g" J+ Y$ o  K# J, \+ f; x& |1 f
        for i:=1 to WH_nums loop
3 _% r- Z5 Y- @; \' _                Res:=sprint("Store_",i);' Y" }8 s# u4 F4 M' o
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);% i, {4 n& p+ G! v
                Obj.Label:=sprint("huojiaceng:",i);
* L: n  i4 P8 \$ g( c                Obj.xDim:=WH_x;
  |6 |- [1 Y6 f                Obj.yDim:=WH_y;
: S+ ~* Y, a& P9 c$ G; w5 L  J2 S                Res:=sprint("StoreData_",i);# f7 V5 q' m" i) m0 S
                $ N6 j! j2 ~' T7 ?: |9 M( z3 a" q+ u
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);, G/ E$ [3 u2 P
                Obj.Label:=sprint("huojiaceng:",i);
4 v$ ?9 c' c7 Q! I! S* Z                Obj.inheritFormat:=false;* `" [: R% G6 ]- P) E8 w! N* a
                Obj.maxxDim:=WH_x;
( d' ^7 x4 {3 y4 q+ c6 N# c! r                Obj.maxyDim:=WH_y;
- f9 j! F, i5 P! \: l8 n                Obj.ColumnWidth:=3;
1 F/ `" y% Q. p# X$ H5 V        next;+ R/ i8 W* n) a; J, a
        % b* N1 O" R! j* ]" @* r& Z
        .Delivery.MUs.Forklift.speed:=2;8 b* D, D; N3 I8 R1 j
        WH_var.delete({1,Part_Nums+1}..{*,*});
6 d+ D: x* D  `1 J2 d        for i:=1 to Part_Nums loop
& V, W4 }9 e# }2 i, p0 v- ^                WH_var[1,i]:=chr(64+i);
2 O7 H( f8 s8 O+ V: g0 N, y/ K$ t1 O        next;
- T1 @/ d7 U: Y) S9 Y1 [' Rend;
4 f: S0 C! a; s4 {出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了& f3 \3 N" m5 _" M4 c; V
4 B6 f* p0 S3 q2 {8 I3 J5 P' H6 d

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-6-17 11:16 , Processed in 0.018279 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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