设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3413|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
: ]+ y( e, @( \& o8 Y6 }8 [语句是这样的
9 K+ f5 B$ D( {1 W0 U1 F  Ais( c* `, z+ Q; h( _) \
        i:integer;
) T% D' s1 V" H/ [2 ?( C0 f        Res:string;' o; g0 V6 c! W+ R! f; d
        obj:object;
7 L8 x* [# B5 O& ^do
' @9 Z$ r+ |% X* h, `        if existsObject("Status") then
+ |8 C2 J: Q1 l                Status.deleteObject;
3 m6 ~3 v- l- x$ T+ \        end;1 t) P  o8 [: S/ f% j4 h+ a* |! t
        for i:=1 to 10 loop8 a! i- y+ {% H7 ?/ y# ~
                Res:=sprint("Store_",i);* f% p7 B3 p( w* G7 k, l
                if existsObject(Res) then
" G7 r- J, l* z- e  s                        Obj:=str_to_obj(Res);/ w8 y8 ^6 \% S% L+ }: |
                        Obj.deleteObject;
( X# f* m$ c0 X                end;+ t9 q1 Z& G- k1 \
        next;1 @7 M$ f) |2 k
        --shengcheng Status:zimoxingceng
6 p- N) m) B3 k) H% C9 v        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
7 r" m- L+ C3 h" D  T. J* Q        Obj.Label:="warehouse status";" A/ W: E% ^" E
       
) b8 X5 ?3 y: v7 |$ a$ h( N4 d        for i:=1 to WH_nums loop
! X! u9 v# [4 g% g; A8 N4 }$ J8 @                Res:=sprint("Store_",i);
0 u; M4 i6 j- Q- z                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);, c9 h3 K* @: w/ V1 d" S% G
                Obj.Label:=sprint("huojiaceng:",i);
1 \2 C6 F- N2 _5 z3 X                Obj.xDim:=WH_x;
+ T+ p6 }% H; n3 }                Obj.yDim:=WH_y;
$ }# A9 ^  r2 m                Res:=sprint("StoreData_",i);
5 X$ ~; O! E) f% ~/ Z! K/ j' l               
3 o/ h0 l* _# f9 a( b- |$ O                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
0 q9 C' R! e8 s; P3 ]" I. `                Obj.Label:=sprint("huojiaceng:",i);
! k  ~+ g- f/ {2 f/ O& ]( V! W                Obj.inheritFormat:=false;
! M7 s) c* X  P. \* q; E1 H* K                Obj.maxxDim:=WH_x;
& V: z' K3 L6 |* v% I; I* ]                Obj.maxyDim:=WH_y;
% t0 v% K+ k4 X+ W$ t                Obj.ColumnWidth:=3;& F! X2 K: j4 G7 L
        next;/ S2 m5 A# u. H6 n, o7 n. v' @+ O
       
* r. ?0 p) H) {4 [4 |& i% N        .Delivery.MUs.Forklift.speed:=2;2 m3 r& U6 k; |* M9 O# B
        WH_var.delete({1,Part_Nums+1}..{*,*});5 }. [" R# ]0 w- F
        for i:=1 to Part_Nums loop
6 e0 L3 M8 o5 [8 ^$ m6 o                WH_var[1,i]:=chr(64+i);0 m# n. o, u) _
        next;
2 @' q% k5 M9 \/ {0 U! Pend;' m3 I% `" ^' Y$ i0 l/ Z! s
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了7 w! s6 S3 O& ~' S

: `( |2 }4 {7 E$ ^/ v

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-2-22 08:55 , Processed in 0.017220 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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