设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3762|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。: l1 \- v7 b2 ?( B
语句是这样的
7 f9 N. O6 z* d" T, X; H1 x# Z( Wis
7 Q! _) [& r' b  m8 Q9 y3 W1 j  C        i:integer;
% G, ^  O4 y  e! h        Res:string;
+ z- H3 ^3 k# c        obj:object;
& ~% Y- t$ t$ ~  g. ndo
  |2 G' P  M) ^1 a* N        if existsObject("Status") then9 ]' W( M6 M# j8 g8 `/ p
                Status.deleteObject;1 X( O( g5 E- M( \# J( P7 t
        end;( u( ?- u/ g7 \6 J7 E. V3 F
        for i:=1 to 10 loop
/ k5 O0 d7 w5 S) }: p                Res:=sprint("Store_",i);: Y/ N* K8 x; ?( L0 s" ~
                if existsObject(Res) then1 K8 s8 @5 M2 x! j( ^/ ~' j
                        Obj:=str_to_obj(Res);
( Q% k6 N; c2 y8 x- b2 r                        Obj.deleteObject;
: U, u: @9 P( n" b  t+ D                end;1 ]6 v+ X$ G( r3 d& h
        next;
% }6 c% K6 c& h; f        --shengcheng Status:zimoxingceng% w" }# h& @2 v1 N' u# B. X9 V* W
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");; b5 l$ k4 `+ c1 \: Z
        Obj.Label:="warehouse status";; P4 p0 z+ `1 U+ z. z, u
       
. V7 M6 p5 X* N        for i:=1 to WH_nums loop
5 ~7 L3 r+ t6 X# l1 _( V                Res:=sprint("Store_",i);, o  n1 a$ h& b% \" P0 x. D) R
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);3 D8 b5 J0 i$ C& F! H+ g: e- I$ }
                Obj.Label:=sprint("huojiaceng:",i);  J4 b# O% g& C: ~) B
                Obj.xDim:=WH_x;0 k: g! n$ v% W( F4 e0 t7 d
                Obj.yDim:=WH_y;, r6 s& M" u! i" C7 g
                Res:=sprint("StoreData_",i);% E& h' G9 \" ^: c- L* C) ]
               
$ @1 f4 y6 m# Z  Y                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);5 y! i; f& Q4 I4 e) N$ @3 x- r
                Obj.Label:=sprint("huojiaceng:",i);$ Q6 Q% L% U4 k
                Obj.inheritFormat:=false;; j, g" p+ E' {4 ]( `- C
                Obj.maxxDim:=WH_x;) J- m! g( k6 t1 w0 [' |
                Obj.maxyDim:=WH_y;
* e  ~7 \- k1 I6 J1 O3 @/ d                Obj.ColumnWidth:=3;8 b0 u0 j" @1 J4 \4 D! C- ^% s9 v7 b
        next;
% `/ m/ C' F9 Z) B3 \* ]       
7 W& E! [0 H0 d; v        .Delivery.MUs.Forklift.speed:=2;
: z2 Z  h- ^" C# D! A) N/ l/ _        WH_var.delete({1,Part_Nums+1}..{*,*});$ N, ?& r% p2 E+ E6 H: C$ @. M: e! X
        for i:=1 to Part_Nums loop$ M8 c* K1 L+ A6 C) U5 X; C4 ?
                WH_var[1,i]:=chr(64+i);
7 g) O% q" Z' w, q        next;( b( t0 R/ [7 x+ f8 r- P
end;
+ ~7 ?: @  }" E7 K3 _出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了( O, t5 D# b8 p2 T9 d

$ n7 K& a& l2 j4 j

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-4-22 18:09 , Processed in 0.029383 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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