设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3968|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
  F$ @4 L9 Z, y& j7 G8 e) ]语句是这样的
0 `6 y+ r- H2 V1 \) {: Zis! a, x7 @, p. j
        i:integer;; N5 D2 z3 V/ w0 ]
        Res:string;+ X7 O2 U3 j, c) m) k
        obj:object;
1 Q7 l3 u4 V* \- o; Z3 M/ bdo# }1 z; `' r* ]6 q  }% g
        if existsObject("Status") then; g; @  m0 e% ^. K. x# |8 e5 c# M
                Status.deleteObject;
; V5 o7 l/ P7 V$ A7 [  W3 x* A' e4 h        end;/ Z; W% R# V6 g
        for i:=1 to 10 loop3 J& r% K% e2 b# W) a  C
                Res:=sprint("Store_",i);
+ u! t' e8 w5 c% b' H4 E                if existsObject(Res) then1 o* a' L. m2 d$ L- `* f
                        Obj:=str_to_obj(Res);8 D2 p- D  w, m* X5 E, ^
                        Obj.deleteObject;
# x$ ]( d% e6 E( C                end;
+ V9 g. ]. v6 t; Q' e8 N$ C+ `        next;
1 u/ j' d! W) F9 s. p- Z        --shengcheng Status:zimoxingceng
+ ]( d. H3 k$ q: l        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");" e; w- B- ]6 \" B; Z
        Obj.Label:="warehouse status";
) A* O  @9 p" {# z        # `9 E; r5 s8 f2 n5 w- Z8 `4 `
        for i:=1 to WH_nums loop
9 ?" F( P( V2 y' A6 J4 r& ]9 v                Res:=sprint("Store_",i);$ Q9 }- d/ N, @* O6 H  ?
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
  A( c) {* g8 f0 c; p" f' N                Obj.Label:=sprint("huojiaceng:",i);
% x4 j& \8 h; N' c$ o5 }                Obj.xDim:=WH_x;
7 K  Q8 n9 k0 }                Obj.yDim:=WH_y;0 H7 K; W( R1 E* V/ g! c/ r
                Res:=sprint("StoreData_",i);
) |4 K2 K/ _8 Q' {- Z; I. s               
% n% K; g# o/ V5 H. t5 r                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
' A. x# }& {! r0 y                Obj.Label:=sprint("huojiaceng:",i);
' k# ?7 t3 l3 d* |                Obj.inheritFormat:=false;4 g3 U) L, x8 [3 ~+ E. u( w3 j+ h6 V
                Obj.maxxDim:=WH_x;
' P6 l7 M3 r) h4 e$ E* W                Obj.maxyDim:=WH_y;
4 u/ T3 x1 l+ E9 O+ F& k* a                Obj.ColumnWidth:=3;( U4 D# f* A8 \# j
        next;
: v/ j' E6 P$ K' `9 ]2 |3 z       
8 i9 t& s/ f+ p7 `- t        .Delivery.MUs.Forklift.speed:=2;) k* ^# j! D5 ]* P. @
        WH_var.delete({1,Part_Nums+1}..{*,*});
' @8 s' q$ z1 G. ?+ t        for i:=1 to Part_Nums loop5 H7 s/ [. b0 @, X0 n
                WH_var[1,i]:=chr(64+i);
* o$ @0 L9 u. A. p$ x3 b        next;
5 A: Z. V- E1 _4 s) Uend;  f, T- m0 H; x0 o5 t
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了/ g9 |% G# P% g+ M% w6 ?$ i

4 l& r) A+ n# H! g  C/ r

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-5-23 05:45 , Processed in 0.015836 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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