设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4054|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
0 M% l1 O7 ^( x# p1 O语句是这样的6 q% K. D; T  E+ D  e# w4 I4 n) R
is
6 \4 e% Q( a+ j% J; u        i:integer;- E( h1 s8 E; O
        Res:string;
; J( Y/ }+ ]- h$ l, V        obj:object;
+ D# b- I' H0 g; F# s+ c3 pdo" n6 L* r$ E% q7 K' K+ U" {3 p
        if existsObject("Status") then) P' w) N9 o8 S4 }6 X
                Status.deleteObject;8 O5 n% t1 u7 c) V+ a5 D
        end;
  i7 w: E: e' l( X; P" S        for i:=1 to 10 loop6 v, q5 ?6 c7 y! Q$ {& C
                Res:=sprint("Store_",i);
' n! }! @) L" c" V                if existsObject(Res) then4 u" w3 Y1 r' B
                        Obj:=str_to_obj(Res);
2 V$ N6 l- `' g6 w                        Obj.deleteObject;& ~. I: V/ M# I7 j5 x5 J9 _
                end;
: z. Y! w9 l7 t) {8 A4 B        next;
  d- N# e2 `4 d) t0 v" e        --shengcheng Status:zimoxingceng
  u8 \# G" Q$ X3 x* e8 q        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
9 G7 D# b$ x+ ^% z# u$ @( G9 E        Obj.Label:="warehouse status";
- @% W/ P& W( Y. X1 i3 J8 C        ) b% |' f0 u0 W7 ~8 V% e/ i
        for i:=1 to WH_nums loop
2 k2 o6 a# R. u# Z/ y6 \& i. {                Res:=sprint("Store_",i);
. F9 p1 K( i# ~# o6 S; h* o- _                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);' t4 Q* |5 p- l$ s* J, m
                Obj.Label:=sprint("huojiaceng:",i);! y9 v: G& d/ T8 n. V" M
                Obj.xDim:=WH_x;
: l# N' K& ^, M0 y                Obj.yDim:=WH_y;
4 ^/ A& x0 |7 l7 D9 k1 j1 t                Res:=sprint("StoreData_",i);& e+ |7 ^. o: |! l' F
               
& i2 O: E; ^9 f# J+ z                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);- h7 y* A0 E- ]
                Obj.Label:=sprint("huojiaceng:",i);
( X4 `6 p1 e$ [) Z9 k( F$ E                Obj.inheritFormat:=false;
9 n' l( L4 `" s* d( ]6 M8 K9 |                Obj.maxxDim:=WH_x;7 ?$ u1 }& F" f) Y) Z
                Obj.maxyDim:=WH_y;
" O, f1 f6 g# Y9 u6 Q2 ]                Obj.ColumnWidth:=3;5 i5 u+ D' n) I+ n2 @0 u+ _& t' x
        next;
0 z1 z0 F8 a" n       
* e5 A9 {) A9 M% l2 _1 F% P, D        .Delivery.MUs.Forklift.speed:=2;
6 m5 }8 U2 R( a* n        WH_var.delete({1,Part_Nums+1}..{*,*});
8 i1 |% f7 M+ \3 T8 R/ V7 U        for i:=1 to Part_Nums loop! D) u8 g3 m5 d" c0 i3 L5 G
                WH_var[1,i]:=chr(64+i);: c/ t- f  @9 m! L3 L! X  t  v2 y
        next;( \* W# c5 j- a
end;
' v1 U; m. w3 U1 w" Z1 ^% t1 i! @出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了! K, }3 R3 n4 w0 u3 q- F7 |3 x

/ l4 `* `. S6 C6 J

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-6-10 18:52 , Processed in 0.020721 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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