设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4481|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
- _& Y4 X7 s6 v: h# c语句是这样的3 \0 Z6 Y  m4 l# ?: c9 v* y+ F
is
  x! L+ u( k* w, j1 @        i:integer;3 u( P2 I5 a% f; L
        Res:string;
% L6 e' {5 s/ a& `        obj:object;
  i( F5 K1 O8 |  vdo
3 P6 t; s8 L+ d3 g        if existsObject("Status") then
4 H$ g5 F) F* _/ A' L                Status.deleteObject;
3 I( f- N7 V4 p        end;
! n$ b! _4 o0 G: i+ R/ W3 ]2 \. y        for i:=1 to 10 loop' A* N/ P& ~, j# W
                Res:=sprint("Store_",i);5 X. Y: J2 R. J. W3 V
                if existsObject(Res) then
# h- T* q; q. C                        Obj:=str_to_obj(Res);
4 S4 B8 L' J# E, A3 @$ G                        Obj.deleteObject;
/ r! M1 W; z( B, i2 b                end;* X$ v: m2 t: T" C# f3 J, }4 }2 u9 P
        next;
( T+ r# ~  ^; y. s: m3 N$ c        --shengcheng Status:zimoxingceng; s2 J% l4 ]+ y( t( X$ `1 m/ J
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
- i! R8 g+ x8 D) {. L. o        Obj.Label:="warehouse status";) ?5 S: I  j* o/ [" d
       
- ~( B: @" ?* l+ r        for i:=1 to WH_nums loop' J4 @/ d/ Y; W2 l& A
                Res:=sprint("Store_",i);
3 N# W9 F& w7 b& n8 a                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
# _/ c; ?1 M  k5 O, I+ `* L" {+ v& C                Obj.Label:=sprint("huojiaceng:",i);
9 y+ w) @. i, _  o& X: c% Z                Obj.xDim:=WH_x;8 \8 l9 F5 Z/ f" z% m- W
                Obj.yDim:=WH_y;
* _/ L: ~( V. v                Res:=sprint("StoreData_",i);
' y. ^, v$ V0 r! d, u1 [* r. [                + H9 P' W, N# |, e% B* j
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);4 I( J1 |7 l/ H: B
                Obj.Label:=sprint("huojiaceng:",i);
7 U" a0 K" h( W                Obj.inheritFormat:=false;
1 L9 ^- n# }. G$ F$ H) `8 Q" J                Obj.maxxDim:=WH_x;
2 @, y3 R/ e* l5 x2 w                Obj.maxyDim:=WH_y;2 I; P5 s3 l6 O: j' @' o" r
                Obj.ColumnWidth:=3;
" X: ~; }7 o/ B        next;7 u+ `7 }# H6 b4 Y0 ^6 O
       
1 D; r. F. W, u; ?        .Delivery.MUs.Forklift.speed:=2;
( W0 U2 F' A- b2 {9 c3 s        WH_var.delete({1,Part_Nums+1}..{*,*});5 k0 {. E9 ]" ~; E
        for i:=1 to Part_Nums loop: F/ {, G, r% J6 ~* _9 [. _
                WH_var[1,i]:=chr(64+i);7 Z4 P( ?. a$ N' f! @5 @
        next;8 v6 t( s' k" b$ H/ T$ d
end;$ W& u' N. O' s8 A
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
7 q& K0 G9 b. q" Z5 d9 |7 |3 b

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-8-20 05:02 , Processed in 0.015653 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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