设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4021|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。2 s! J7 b+ m% w: G7 f
语句是这样的9 g9 }- r# }3 d: m" Z
is
( _! V% s- j7 [5 u  k" s0 |        i:integer;7 N5 ?: ~; `) C  ?- ?' }) z& l
        Res:string;
) k1 f7 j& C# Y1 {0 }! K        obj:object;# b7 ~  g  \& l7 y& \) D
do$ y' f9 K0 P) b7 A' ?
        if existsObject("Status") then$ ^% I; m! }% B2 ]- q* B
                Status.deleteObject;
$ F$ R- _- B2 K7 T        end;" M8 m" K( |% C
        for i:=1 to 10 loop
9 p7 w$ _5 i; w  G                Res:=sprint("Store_",i);
2 h* R4 \5 ], J7 J1 a9 N& }& D                if existsObject(Res) then1 X) y6 h& N% e. K# t7 d7 V
                        Obj:=str_to_obj(Res);
# v" L- a# H  f+ y+ H                        Obj.deleteObject;% I! j& [: ?" `; Y! G9 O0 g; g
                end;- D9 o( Q: h+ H% ^) r3 I! C  ~7 I6 X
        next;/ G' N& c  s9 k* v
        --shengcheng Status:zimoxingceng
1 I( ?' i; ]! e1 H9 [        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");8 u% z# E/ K) O% G% ^" }
        Obj.Label:="warehouse status";7 d7 o, ~$ E, ^% S9 Q* H1 \
        / x7 R: ~) D" ?! w* t3 k
        for i:=1 to WH_nums loop
' M6 c  c/ Z& C" a! v7 X                Res:=sprint("Store_",i);
* U6 N( p! L( d) [5 G% h                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
* z. R! {" X6 i7 m                Obj.Label:=sprint("huojiaceng:",i);3 k. z& x' S, s, c
                Obj.xDim:=WH_x;
" Z, W4 G0 n8 q4 G                Obj.yDim:=WH_y;4 t& t) j' b6 i- X
                Res:=sprint("StoreData_",i);
5 D8 S1 o6 V; D8 @0 Y9 W               
7 A, x0 [$ o1 W, u, H* ?                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
( X6 V* J% D& N! b" p                Obj.Label:=sprint("huojiaceng:",i);
' v1 F* p4 E/ {; p" S4 Q5 {& q% n                Obj.inheritFormat:=false;
- \5 C7 O. {9 ~/ D+ g, ~4 F+ W! x' _                Obj.maxxDim:=WH_x;' _% i, v! ?! U
                Obj.maxyDim:=WH_y;% A; [) V+ i! a) _* U
                Obj.ColumnWidth:=3;
0 d8 B- ?4 V9 k* W$ I3 B% V! h        next;+ z1 P. f' s+ h: j+ l, t. h
        2 J, a2 I9 J+ R2 I3 J
        .Delivery.MUs.Forklift.speed:=2;6 Y! y& [! _" {8 ~4 b6 l
        WH_var.delete({1,Part_Nums+1}..{*,*});
+ `0 k7 z$ y* H( {        for i:=1 to Part_Nums loop* D$ T0 G9 f$ w' |
                WH_var[1,i]:=chr(64+i);
* B7 x: h4 ?: \/ D4 @        next;
& X  A: D# X/ l1 Rend;5 V$ C. a0 d5 ]- M: X" q- r
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了8 _6 A' J5 H" y. c
  X/ V% X( v$ G5 ~

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-6-2 21:24 , Processed in 0.018454 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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