设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4233|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
, e2 ^" i% R  A# ]( l7 ^) S) k4 W语句是这样的
" T! u$ j0 M* O" y; {/ f  n& kis1 M3 d0 [8 |& y
        i:integer;
" v$ ^- O8 C8 Z        Res:string;- O. w6 C& o4 R2 m3 \! m" g+ i" Q
        obj:object;+ j9 R. f! @7 f6 z' @1 @- Y; Z
do
( N5 l) ], r9 Q# Z3 C        if existsObject("Status") then
3 K5 c! v$ q0 P. R& ]; v                Status.deleteObject;
) Q% U2 l& D( Z) \: N' b2 w, h! H        end;
$ B* B- t! A: J: [5 m& G        for i:=1 to 10 loop* i7 k$ a6 L% i8 K  R2 G
                Res:=sprint("Store_",i);( |# t( S7 _, v. v
                if existsObject(Res) then
4 B5 G& ]: l: N                        Obj:=str_to_obj(Res);
) Q7 t+ l* @+ k+ I( X8 ?: g( V  b5 ~                        Obj.deleteObject;, P0 o- ^6 W- W* ]
                end;* I/ p" K( {: F2 N- |. k
        next;- ?( a8 d' e- b. _8 X
        --shengcheng Status:zimoxingceng4 V9 x& O& l; T8 ?: n, e
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");# d# M) e2 `! p& E7 ?5 Z
        Obj.Label:="warehouse status";
( h3 {; u; z# }+ s) ]        . }  p+ `% f' e9 l
        for i:=1 to WH_nums loop
. @# w1 h6 y/ h3 s) F                Res:=sprint("Store_",i);
! m3 D9 K3 `  t. `5 k7 c& N                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
' r' M2 q* |1 R/ v6 ~- a                Obj.Label:=sprint("huojiaceng:",i);
/ t% ?& T. g  A) {" b                Obj.xDim:=WH_x;3 c2 P9 d3 d- |$ k  `" ]$ n
                Obj.yDim:=WH_y;
8 ]  h; c8 N3 n7 G" t/ i( a                Res:=sprint("StoreData_",i);' ?/ x+ u7 K, N
                ! [: @9 @0 f4 N0 o- c6 W1 d
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);; |4 i7 ^  K+ g: [* \9 v
                Obj.Label:=sprint("huojiaceng:",i);
' g/ q5 H. Q* \. V* T& D* K                Obj.inheritFormat:=false;& o# e& [! A2 b, h4 \5 i1 A- k; d
                Obj.maxxDim:=WH_x;
8 l! I' `. v" x7 q; e                Obj.maxyDim:=WH_y;
5 R! R* V* k; b4 H" v                Obj.ColumnWidth:=3;/ q( V$ S# F0 d  ?' R
        next;
- n( }! c& \. k# g        ! w# N9 S1 l7 Z
        .Delivery.MUs.Forklift.speed:=2;
+ ~& h( W- d' h0 }$ i5 B9 N) i, D        WH_var.delete({1,Part_Nums+1}..{*,*});
* I+ V0 `5 R7 ^9 D7 E- I1 }9 q        for i:=1 to Part_Nums loop  V  l) K4 s  x
                WH_var[1,i]:=chr(64+i);
9 _' E, L  c, ]$ f5 V        next;
& ~1 U1 I( W0 yend;7 _2 A. R& W9 }5 A
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了$ g+ b& H2 ^1 c+ D; c

8 e2 _2 x7 J' T; d% D1 |+ l

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-7-11 05:26 , Processed in 0.013161 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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