设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3261|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
6 a" L, n' E# h' i3 \% r语句是这样的
1 B  m! f; a& Y* z9 cis, E& L( d% f, a' s
        i:integer;" |# d. j- o6 }% t) c- b
        Res:string;
: R$ `. Z% b! h- N        obj:object;
- C5 p" E( B  ?" W$ ^do+ T7 c- K9 _. U% _, D) X
        if existsObject("Status") then
, K- ~9 n( q, i5 }                Status.deleteObject;" P! P6 D5 Q% {
        end;: i8 `  ?/ u# q2 }* w1 W
        for i:=1 to 10 loop
( R9 W1 S  n3 W" N) g                Res:=sprint("Store_",i);8 J0 R. K8 f( V# t" t) n
                if existsObject(Res) then6 Z1 u, F% U1 F4 Q4 o
                        Obj:=str_to_obj(Res);
- E& p5 B: \" Z7 j/ X                        Obj.deleteObject;
$ L/ ]; b/ q! m7 n! Y2 |$ E                end;) K( _+ n/ J4 l6 u
        next;: ?, F. D' C4 |2 ]7 c
        --shengcheng Status:zimoxingceng
5 h+ h4 ^0 l9 S9 J' I+ S        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");: K  v# t! c  i' m, A( M2 ^' i
        Obj.Label:="warehouse status";+ z9 k. c/ A8 a, G" j
        & y% L' y( a6 d- [" u0 R
        for i:=1 to WH_nums loop
% Y  `# r& P' [4 O- P; m# r3 j# O                Res:=sprint("Store_",i);
! w9 `$ e+ I% x3 N                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);  \8 k9 M) g2 y1 j5 J6 K
                Obj.Label:=sprint("huojiaceng:",i);! n. k4 ]/ X, R" E& M+ k2 O
                Obj.xDim:=WH_x;
! p/ h- J0 c& l                Obj.yDim:=WH_y;
# C) }4 |3 L7 \                Res:=sprint("StoreData_",i);0 {, t, ?( A% O7 ^2 W& C
               
1 @# J" ]' W; W( L                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);( l0 T% j/ g% }' d- Y
                Obj.Label:=sprint("huojiaceng:",i);
7 C9 s* m9 G/ T* L                Obj.inheritFormat:=false;' D$ R/ y/ D' q0 {; [
                Obj.maxxDim:=WH_x;4 j7 G  |/ G4 l' ^9 L' S
                Obj.maxyDim:=WH_y;2 c/ ~5 t4 ~6 U
                Obj.ColumnWidth:=3;
! f3 _0 A7 {4 ~$ }  P1 ?  L% M( N+ i        next;
/ w/ C8 K& a# S* s* w* J6 o# N        6 ]" \3 A0 b. C# {% o( B
        .Delivery.MUs.Forklift.speed:=2;" y( ^, j0 A, C* B+ p, e4 X4 c7 Z
        WH_var.delete({1,Part_Nums+1}..{*,*});
! {5 J% K9 Q4 w3 n        for i:=1 to Part_Nums loop8 ~* u4 d# m& j, ~& C
                WH_var[1,i]:=chr(64+i);: Z% u! ]2 Y5 q
        next;! J- s! J  a: u# f$ J
end;
" Z4 f) _+ a1 O/ y4 Z0 a8 n% h! s出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了& G; i/ D8 x3 i. i9 y+ i. X4 J
) u- h# d* ^$ X. D. M" M& i

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-1-28 10:54 , Processed in 0.029929 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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