设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4584|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。7 ^, M$ t  _! h
语句是这样的
: i5 C; c! g$ _! gis% c  l# R  P! z# S2 J3 o
        i:integer;
! K5 X- P0 }: a8 [9 P* Z        Res:string;
) `+ P, L8 d& P* H        obj:object;  G7 c* g- M9 S- ~) E5 o
do
, U7 J* q5 S$ h        if existsObject("Status") then
, ?, r# s6 f8 A1 n; i3 Q* Y                Status.deleteObject;; ], U6 v1 |5 W6 ~
        end;' M) z  X7 l9 J6 M; g, S
        for i:=1 to 10 loop
) H4 A1 x3 N1 m                Res:=sprint("Store_",i);
" B% s9 }" T' ~0 f, f& Q                if existsObject(Res) then. f" y7 o  I$ ]0 f: z
                        Obj:=str_to_obj(Res);
  {; U" L" g1 ^% p) g( o' F                        Obj.deleteObject;
' k; t( R2 t2 h+ J                end;
" M4 ?$ ~" r  n  r        next;: Q: ~6 j2 y, U; ]
        --shengcheng Status:zimoxingceng( ?3 N. G3 M) R: e4 S. h' e: t
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");8 \- N& c9 _, w2 J; A; e
        Obj.Label:="warehouse status";2 e! V# ]  U0 x; }' ?) ?9 `& V
       
$ k  u, f+ m+ y  H. e        for i:=1 to WH_nums loop
* S& l1 r4 G- f( y                Res:=sprint("Store_",i);3 m8 f  C9 [) u# h( l5 e0 n
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);( o" y; Q* Y7 ~
                Obj.Label:=sprint("huojiaceng:",i);. F9 @  @$ w) |
                Obj.xDim:=WH_x;
0 Y% M4 L- o0 Z" ?# w& {* I                Obj.yDim:=WH_y;8 C% d' O2 @2 m4 c7 r. Q  ]" Y- f: Y
                Res:=sprint("StoreData_",i);% I+ u% m5 W$ i7 f
               
( |4 B& M" n: E& G7 I4 s- r                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);( K1 [7 A- ]0 F  I
                Obj.Label:=sprint("huojiaceng:",i);
/ E% i  r. m9 d7 G. _                Obj.inheritFormat:=false;
* N) e' ], ?4 A' ?6 o  H) o                Obj.maxxDim:=WH_x;5 _1 |' h  q& e/ Y) a. p, W
                Obj.maxyDim:=WH_y;
4 t" d+ _, v: }1 q                Obj.ColumnWidth:=3;/ I2 _. M, N5 w6 R
        next;6 i& E& l4 l4 t3 V9 O: E9 c$ Z$ S5 I
        4 y, r( b) i4 }4 i; I
        .Delivery.MUs.Forklift.speed:=2;
3 |, v& f2 g" y( G, ]0 ]8 r        WH_var.delete({1,Part_Nums+1}..{*,*});/ ]) z8 D5 Y/ C3 M' d, H
        for i:=1 to Part_Nums loop/ r  @4 }$ y0 d. ?) y" a$ b
                WH_var[1,i]:=chr(64+i);' p( O, \& o1 O6 y8 i( l- K5 i; b
        next;
+ \+ Y8 {" g; wend;+ Q2 ~# \7 ?1 b9 ?0 U
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
% h" N+ Y6 P# |, b( n
' H( Q/ ^- p  ~9 w6 h, Q

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-9-6 05:28 , Processed in 0.021935 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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