设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4393|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
5 ^" Z! P" X- J语句是这样的
" d- _" R; `4 A" h1 R+ g7 _+ Eis
# U' v( ^# U3 Y. n6 v0 Y: T; `& I' I        i:integer;+ ]- T# b# H! f4 o. ~
        Res:string;$ [* {) u; v! J9 a
        obj:object;
7 M" E5 Q* y- y# V1 u5 K- t2 B6 Wdo( x8 t& b: m! d
        if existsObject("Status") then
1 K. @/ J8 O3 e' C8 l& D                Status.deleteObject;# Y3 L2 i: l) K5 U( B' Q: I+ a
        end;
% n& ]" Z' H9 e1 D/ K1 A% c0 E        for i:=1 to 10 loop  |& T7 K1 u( X. F+ W
                Res:=sprint("Store_",i);* Q3 {7 R% d' O" X" `* o% e3 W
                if existsObject(Res) then3 I9 _6 l9 j1 y0 ]
                        Obj:=str_to_obj(Res);' o: S7 B4 K0 m0 j" t& w' U
                        Obj.deleteObject;  |) ^' L; U. v
                end;  p" m2 M3 L% i4 y9 Z8 C
        next;: g: x* w# \( |7 `( c. q
        --shengcheng Status:zimoxingceng  U5 i& w9 t+ I3 h) g  Q
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
9 \; y1 `" y% V) T) ^        Obj.Label:="warehouse status";/ m/ M/ j; w; r" P5 C
       
! l6 g' {! M! w' r0 M6 ]6 C  n        for i:=1 to WH_nums loop% h, W3 I3 Y6 E! Q, h* V9 B- [! `
                Res:=sprint("Store_",i);" t  u7 v' Q* |5 r
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);: O  o* ~' d/ r  e5 Y
                Obj.Label:=sprint("huojiaceng:",i);
. s5 \& @- K& w3 Y1 Y# g                Obj.xDim:=WH_x;
3 h# i# E# K4 b                Obj.yDim:=WH_y;
0 s/ c" g! [/ T% A                Res:=sprint("StoreData_",i);) d" r+ c  j* l, p2 c3 J
                ( u- y. e% u& f" P$ _3 I' G
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
8 D& Q8 I& p! I5 M3 E- ~0 p                Obj.Label:=sprint("huojiaceng:",i);
0 \# N- H( k6 M: n# T; N! q                Obj.inheritFormat:=false;
) b/ F, K; {  _# m4 r+ D! R                Obj.maxxDim:=WH_x;
9 S$ n2 t% l2 _) L' W9 a( P. {                Obj.maxyDim:=WH_y;
3 O" ^: O; I& ~) P8 W- a( m, B                Obj.ColumnWidth:=3;
" u, f" @' k% J4 K        next;
' e, B( F. l9 ~       
: \, F; W0 }7 G4 Y        .Delivery.MUs.Forklift.speed:=2;, H' V- G7 o# O+ x) l
        WH_var.delete({1,Part_Nums+1}..{*,*});! e) ^9 }' X5 U% W3 T
        for i:=1 to Part_Nums loop
2 O" V& {, t6 p; E                WH_var[1,i]:=chr(64+i);: J: ~* k  t) R7 _. C$ ?  U" {
        next;' O1 ~3 d0 v! o. H: K2 Q
end;
* U" ]  H6 O8 N8 t. }, m8 U) w3 B出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
2 l1 H  c) R5 v9 E$ q! C. s$ D5 }4 G3 o4 E, e; ~

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-8-4 19:42 , Processed in 0.022115 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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