设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3776|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。# ?! y( V1 A4 _$ }5 u$ R" B
语句是这样的5 A' k, H4 l3 ?" o6 |& n- Y9 b/ f7 x" _
is! a6 @0 [/ V7 M: F1 }: z; s, s1 A& T
        i:integer;
5 W( ~, Q/ B1 U& }9 ~        Res:string;% {* A, T, P- r+ v
        obj:object;
6 {& w- y% g5 m6 \do! v' n5 T2 P' }8 |
        if existsObject("Status") then4 I1 D) ]# T1 U: ^0 b
                Status.deleteObject;6 B) a/ E- M: L/ W
        end;" C& g2 C7 `2 g) V' T  _7 t3 Q6 H" y
        for i:=1 to 10 loop
! ]4 j  e/ T+ {# \4 X$ \' ?                Res:=sprint("Store_",i);
! o' m( C8 c5 q$ R6 m. p                if existsObject(Res) then0 @0 p& l3 Y6 w  K# C
                        Obj:=str_to_obj(Res);1 |6 i, u) o# o2 v
                        Obj.deleteObject;* r) f. ~! H' o- y" {" @
                end;4 m/ T9 C. y, U
        next;5 e% o) W8 c  H- V
        --shengcheng Status:zimoxingceng6 ~4 N' ?( t4 }" k
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");# c4 ^2 ?" K& C5 d3 G# I7 w
        Obj.Label:="warehouse status";; t. Z* L- q' q6 O5 S
        6 \0 w% Q% I# w, }6 a/ L
        for i:=1 to WH_nums loop
; E) U; F  _$ X* h  o- F& d                Res:=sprint("Store_",i);
( U6 g) ~% P9 S2 ~+ ]4 @                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);2 ?) Y: o$ ?8 l2 C2 Z& s' k  `
                Obj.Label:=sprint("huojiaceng:",i);
; t/ ^. `" ~9 u3 u- U7 ?                Obj.xDim:=WH_x;
+ q- O  o: r& S6 i/ h9 b' C1 R                Obj.yDim:=WH_y;
" X: b  v2 [# V3 i. }; @                Res:=sprint("StoreData_",i);/ e3 o) R5 E) o
                / H' \& I( D- b
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
& I) z! W/ v. l4 a1 r                Obj.Label:=sprint("huojiaceng:",i);
2 W6 D  }1 i" k+ @8 D                Obj.inheritFormat:=false;, s  u, H1 D- Y6 ?* B
                Obj.maxxDim:=WH_x;# z/ d$ O9 ]1 X7 y
                Obj.maxyDim:=WH_y;' i' L# K4 `, z
                Obj.ColumnWidth:=3;: W4 |$ c5 \/ Y) J2 w0 R
        next;+ `7 g6 H0 P7 |- n
        # c7 H1 a1 t3 l
        .Delivery.MUs.Forklift.speed:=2;
8 e. L- P) A! S  I$ _5 Q3 c        WH_var.delete({1,Part_Nums+1}..{*,*});
$ i, |' `& l' s        for i:=1 to Part_Nums loop8 H; c8 V% C2 c2 ?, B# t2 Z7 n
                WH_var[1,i]:=chr(64+i);+ W& w# {. C/ K% e: V3 {: j$ t
        next;
/ ?9 j5 x( S$ u; dend;- Y6 h# z0 t+ [! E
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
3 H$ L5 [& s8 [* M) s$ ^" E# L2 v# \  ~" F# B1 B8 q

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-4-24 09:10 , Processed in 0.018709 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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