设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4404|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
7 e' E0 Q9 G& [) m语句是这样的) Q/ F0 c7 f- u$ W$ r
is) u- B( Z/ \9 L0 ~3 e% `4 Z
        i:integer;9 Q1 g9 C% L. b* C: {
        Res:string;
% ^4 [, ~+ N0 ~8 {        obj:object;
+ ~* D. A! l9 W) H3 m: X* f' w& V7 qdo' ^; Z" m+ Y8 }7 T* S
        if existsObject("Status") then
- W& L* I. Z; Z: B5 g                Status.deleteObject;
4 \* _" |5 I: l& y9 X- H# m        end;& R" o% G7 D1 x) z% P
        for i:=1 to 10 loop
6 s. p, C8 \& D- Y$ S                Res:=sprint("Store_",i);
+ f7 M9 x5 T# \* d                if existsObject(Res) then
0 |' A1 W- ?7 d; f( Q6 E7 m$ e                        Obj:=str_to_obj(Res);
: `4 ~( }  ^' n                        Obj.deleteObject;$ @4 V- N' y& L: G. {' z
                end;
* ~1 |" J4 ^7 i        next;
- J5 U9 g; Y/ M9 O; K        --shengcheng Status:zimoxingceng
! n5 b2 Z! _& Y+ _4 C$ B; ~        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");; z8 a, Z2 _5 `+ |) H8 F+ _5 ^
        Obj.Label:="warehouse status";; K. j- o1 L7 \; O) G
       
0 R% s6 m" h1 v$ J/ M5 L. K0 m# V* t        for i:=1 to WH_nums loop
! v7 m  T. m- m8 f                Res:=sprint("Store_",i);
/ D0 W, i/ q3 p2 z) m                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
0 v8 q2 v, H+ C                Obj.Label:=sprint("huojiaceng:",i);
6 l, B0 X" c, F  W5 C                Obj.xDim:=WH_x;- ~( y. [$ j: |* n
                Obj.yDim:=WH_y;* I$ ?) v; |- A6 u& W; ~
                Res:=sprint("StoreData_",i);
+ z( b9 a& y7 _                0 ~3 c# U" l2 W3 [; Q1 X" T
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
( I& l" d' K( `7 X                Obj.Label:=sprint("huojiaceng:",i);
5 U8 l2 o0 ?7 ^9 ?                Obj.inheritFormat:=false;5 o5 x  a% A9 q4 h) p% c
                Obj.maxxDim:=WH_x;
, P0 N. v$ }2 J) N- ^; i                Obj.maxyDim:=WH_y;5 @6 q( ?7 i4 l/ P! K7 r! n" P
                Obj.ColumnWidth:=3;1 b. D7 s5 c; U! R9 Z  F  ?
        next;/ @/ Q% `: }0 i8 _7 N& P+ i) g
        $ i' a) _+ o" Y
        .Delivery.MUs.Forklift.speed:=2;6 F# l- Y$ n( t
        WH_var.delete({1,Part_Nums+1}..{*,*});, k+ S7 V1 M' `! s( R
        for i:=1 to Part_Nums loop
, N) @: i- f7 |- s* l/ \  d# y6 o                WH_var[1,i]:=chr(64+i);$ H* X, X4 \, b8 @+ L! b, G
        next;: s. c( Q) n' M% E! ^1 ?8 R4 l9 K
end;& {) `" f6 W3 [# v% z
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了+ u: l% |( i9 _- r% o

! }6 u: r! z$ }3 Z( T; g- }* H

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-8-6 04:35 , Processed in 0.019491 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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