设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3757|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。. E  U: T4 r0 U6 @: c! r/ Q
语句是这样的
4 V; l2 E, u! w! Lis2 k3 K0 `0 K8 f  s& L8 a2 K6 t
        i:integer;
/ L: S6 z7 o  a, M        Res:string;, ?7 N, O" T5 c  @; \
        obj:object;) [* Q/ X; `. A9 h, `
do
* b2 U' E& B# e! N; ^0 R% [% F        if existsObject("Status") then
7 s+ R& n) v: P( S- o: s                Status.deleteObject;8 e9 h5 G) k* V; V0 g# n5 a
        end;
  ?/ r0 O+ w/ D) K! o        for i:=1 to 10 loop4 P9 V  Z) h* Y5 I) c
                Res:=sprint("Store_",i);
) u6 U! D8 c* A/ z7 x                if existsObject(Res) then
" s" A# H0 |/ Y3 c2 S                        Obj:=str_to_obj(Res);5 u4 A* `$ d! D7 |, k
                        Obj.deleteObject;) l" U6 g+ N9 C3 P, T
                end;
9 U2 k* f4 a- G: [7 f        next;( H8 }8 y3 X8 t: ^% c% w' ?
        --shengcheng Status:zimoxingceng
9 \0 _9 h( ?- F5 Q! c        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
8 @. l# I( ]+ w; ~$ W4 y$ k. D        Obj.Label:="warehouse status";# U& e( }7 p) n3 d1 c" B" i5 ?
       
! D- M6 n" E! H* |        for i:=1 to WH_nums loop  i8 T. S- K% |5 v: }
                Res:=sprint("Store_",i);
$ A5 _$ d7 J3 A4 I7 l6 ^                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
$ g% J( {8 O* V6 M                Obj.Label:=sprint("huojiaceng:",i);
# p+ B+ x( g) ~) @. v; k: d                Obj.xDim:=WH_x;# b# U4 r& W7 K
                Obj.yDim:=WH_y;; n" u8 w8 s3 b) Y
                Res:=sprint("StoreData_",i);/ l9 l; z7 c5 @  J
               
: w8 L* y2 F$ |7 e; w8 @4 c4 q                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
& k: k4 z: Y. n                Obj.Label:=sprint("huojiaceng:",i);
9 |- |7 F  h4 y6 t1 o6 C                Obj.inheritFormat:=false;
* Y, C  y  [+ b                Obj.maxxDim:=WH_x;
3 F% k# |6 F' `1 T6 u4 P1 X3 X                Obj.maxyDim:=WH_y;% d4 m$ x4 y, k
                Obj.ColumnWidth:=3;
5 [9 i0 U" L! a0 N# l( E* @        next;
& i' Q, J: h$ E7 ^       
5 ~7 @4 a0 v  }! q        .Delivery.MUs.Forklift.speed:=2;$ W0 u# v! |) _7 k6 n! ^- V
        WH_var.delete({1,Part_Nums+1}..{*,*});  w: h$ F+ B/ v, \$ n9 ]
        for i:=1 to Part_Nums loop* g+ x6 ]6 _" L6 Q1 K
                WH_var[1,i]:=chr(64+i);5 j1 J/ W; x! P7 {- p; @$ I  s
        next;
! @1 F  F. h5 @  ?' J+ qend;
* N+ A* o! v. I1 R6 _出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了. J0 `7 J) s2 {7 }+ R) m# t
. M6 _& U: t" E2 J

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-4-21 16:55 , Processed in 0.027669 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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