设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4253|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。$ h/ d2 |" {" |& O& d
语句是这样的- x) o8 D! B; m. j) A
is$ V. I$ E1 o* h5 F, q# n8 n
        i:integer;
3 y" ~% y4 q4 d& U3 l+ Z2 ^        Res:string;9 L/ F2 z* P: }% y9 m( c6 m" K& Q
        obj:object;
/ P+ z0 @3 _- l: h7 @do
& A0 x- g% F# o* p: z5 A2 g, z        if existsObject("Status") then: P2 u* o% Z9 N7 ~8 N- u- z2 `
                Status.deleteObject;
* L8 ~/ i, A! I7 M0 ]        end;
/ W/ [" y% {6 Z0 M  {        for i:=1 to 10 loop1 U) A5 b2 v3 y
                Res:=sprint("Store_",i);
& W6 d2 y; B) y% R7 {. d. B+ ]                if existsObject(Res) then
: {, Q8 M0 ^; f% u% b& H                        Obj:=str_to_obj(Res);
) B1 A# T7 @8 q* z                        Obj.deleteObject;3 `0 c9 B$ n1 i" d
                end;
7 }/ A8 R: y2 r% ?7 I        next;$ @/ U% y" ^7 Y. @* C  {  w
        --shengcheng Status:zimoxingceng: j# ]! x2 x) h7 `
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");; Y+ _/ M- I. N7 A. T/ n! f: d+ F
        Obj.Label:="warehouse status";- M) t7 Y9 i8 U6 m" |' `
       
. [4 \: _3 F5 G! R5 p) b2 S        for i:=1 to WH_nums loop
- K& {7 x& Z; o. P( C- x4 H0 \6 M                Res:=sprint("Store_",i);
/ D/ ], G9 ~& o                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
% f5 u# ^, B) g                Obj.Label:=sprint("huojiaceng:",i);
) j5 `* r, v: w/ b3 q                Obj.xDim:=WH_x;
, A/ {" Y/ U' F4 n7 i7 n  Z                Obj.yDim:=WH_y;! i& `; _$ {( J. G- r5 }, Q7 M
                Res:=sprint("StoreData_",i);. {1 G2 J( ?# ~  d5 x
                * c: d# u# b% J8 l8 l
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);, l. h. G6 A$ l+ Z4 C. t
                Obj.Label:=sprint("huojiaceng:",i);6 l) t1 L# o. ~( S/ p. y
                Obj.inheritFormat:=false;
4 z$ M. f3 w4 E) L) S6 \                Obj.maxxDim:=WH_x;# _3 q# l4 U* I4 {/ @4 x% Z* t
                Obj.maxyDim:=WH_y;$ F4 p) {2 z& _% R: j2 C
                Obj.ColumnWidth:=3;
6 w  ^( W- n4 |, M        next;' z$ _0 y$ z9 u8 m0 K$ H: U; u
        - c) g% H1 ?& Q+ u% M! A6 s
        .Delivery.MUs.Forklift.speed:=2;
4 _0 I* N. F6 P! [; R$ J        WH_var.delete({1,Part_Nums+1}..{*,*});$ Q7 J" V! C, x
        for i:=1 to Part_Nums loop7 }0 c  y9 B* {* s1 z
                WH_var[1,i]:=chr(64+i);! I+ T9 k" O8 U- D
        next;
. U# M1 y( |/ V  @7 @9 Zend;. O( \: A7 b1 p7 c' ~. O. A, u; p
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
5 U: m0 _& ~  p* m5 k, x" n' k. x$ Y* v$ t0 ~8 t( ]! I. x  M

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-7-15 02:49 , Processed in 0.015681 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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