设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2842|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
: ?9 _+ u( z, f, V. f4 u- s' C语句是这样的
; c8 N! ^/ Y+ P; mis( [+ V2 o' m; f; ]
        i:integer;
  d6 o# P  x* _        Res:string;
- j- _' f1 ^8 H# C        obj:object;5 {7 E) _% I# l$ l
do
4 I  @2 v; `. n( v& I9 a        if existsObject("Status") then7 W' T/ j" q9 `3 T& e
                Status.deleteObject;  c% E$ i$ I7 A
        end;
. n( Y8 Y" D/ [, u: o, c6 q  t8 ^/ n        for i:=1 to 10 loop
: V4 u- ~4 S" v                Res:=sprint("Store_",i);! \% a$ D4 k' y
                if existsObject(Res) then
: i! ?2 E7 q, w0 B) j: w# [# V                        Obj:=str_to_obj(Res);9 n- `5 \% K+ B) P/ X
                        Obj.deleteObject;
5 ?/ ?- ]  [3 z5 o) \2 F) F& }                end;
/ A- g, a; J1 V: V5 M% h        next;
+ C8 T: u2 i, v8 l( l  c, ]% ~        --shengcheng Status:zimoxingceng
1 L; H3 _. Y2 J2 ^( z" c0 e        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");% E  B' _+ A* e& X
        Obj.Label:="warehouse status";; C" O; s7 l* _7 F) _! f) `
        - S' N5 Y, j+ L, C
        for i:=1 to WH_nums loop
! B5 C! K: O1 J# `                Res:=sprint("Store_",i);
2 _# Y* Y, V* e5 H! \; N                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);0 F& w  I. N. t! m0 l
                Obj.Label:=sprint("huojiaceng:",i);
& \- M  s3 o/ [$ v' }                Obj.xDim:=WH_x;
" ]* L8 o7 X. b8 B/ w7 h                Obj.yDim:=WH_y;
, o& c( K; [8 O: E, L# B- T; s                Res:=sprint("StoreData_",i);* `" V3 |# o2 m1 `
                / }: [; I2 o. W: D: Y" p" j. `
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);2 w' Q' _% P' E) ]
                Obj.Label:=sprint("huojiaceng:",i);
3 D5 l1 S, b% S( o1 f                Obj.inheritFormat:=false;: D4 b  t# c& y( {
                Obj.maxxDim:=WH_x;/ T/ e% @% v9 a: Z# d, T
                Obj.maxyDim:=WH_y;
. W* @6 _' Z6 O6 U, ]                Obj.ColumnWidth:=3;
5 Q. J1 U  E5 B6 b( v# r- V        next;/ G! A  z2 C# Y3 V& W
        # \- {- r% H" K% j& x. I5 _
        .Delivery.MUs.Forklift.speed:=2;6 |- b) ^2 f# N
        WH_var.delete({1,Part_Nums+1}..{*,*});3 \! j" H& s$ p! P9 ~1 T* b
        for i:=1 to Part_Nums loop
$ U* A0 L9 w0 g3 f( h; l6 m" m9 M7 c+ m                WH_var[1,i]:=chr(64+i);7 e) W/ {7 K4 L1 ~9 `( r2 a
        next;* E0 z. @9 b" g' u7 R" O- X
end;5 A# p  B" s$ B* B, s  e* }
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
" f# j# m2 Q% W$ [  l" F  [
1 \  n* L. S9 w6 G( W

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2025-10-31 01:45 , Processed in 0.020492 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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