设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4141|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
9 e$ p1 S3 l8 f3 E语句是这样的
$ v( R) D3 f/ Lis
4 N( o* Q! N' c3 ?) x  q+ T        i:integer;+ [- S% V# `' h6 A
        Res:string;
  d5 b; w! K: Z6 k9 p; Z        obj:object;
- i, l9 z  F& f) L" T9 tdo( R; Q4 R( o! _* K# R
        if existsObject("Status") then
2 D2 K3 Z4 Z' P. U2 Z                Status.deleteObject;
7 X+ T4 B- i- g/ E+ T) A" b* e" A        end;; n# B: e- Z7 a8 W. g
        for i:=1 to 10 loop
# b  M! \0 e) h" Q4 W                Res:=sprint("Store_",i);
$ G2 u$ U8 y# B, J4 \2 ~                if existsObject(Res) then) v! p2 L* G& O0 U1 ?4 S
                        Obj:=str_to_obj(Res);+ C4 O% K! R) ^3 M+ z
                        Obj.deleteObject;
9 s$ I" [. A  v9 O  r: e                end;" y0 X; G9 T% i* W0 ?
        next;2 z/ V! F3 C+ t: [5 V
        --shengcheng Status:zimoxingceng! T2 ^* P6 ~8 v
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
6 ^4 W1 f5 `4 S+ y+ j7 t9 x/ P" ?        Obj.Label:="warehouse status";
! o# d2 d2 Y7 K0 `        4 ~+ U7 }& V  {8 X. O
        for i:=1 to WH_nums loop4 m6 u( |& Q( r5 Z* K
                Res:=sprint("Store_",i);# ?# V; h4 k8 u# C" s6 Z" h6 H; B: V% J
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);8 M- w/ \' H# U/ A5 S" c
                Obj.Label:=sprint("huojiaceng:",i);1 `& X% t0 B5 R, b: G4 f  L/ N
                Obj.xDim:=WH_x;3 i' J; D7 j" C0 _4 E: x
                Obj.yDim:=WH_y;
. }$ G$ h  O% X                Res:=sprint("StoreData_",i);* K( Z, G( T' a9 ^, O2 H
               
$ I5 y/ p4 _8 c, P1 }/ K! l2 d3 G                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);2 z! a, |6 r' O
                Obj.Label:=sprint("huojiaceng:",i);
1 x% L5 M) \* {  n; o                Obj.inheritFormat:=false;
' J: o$ W& ~! {; y1 I- t/ @/ s+ T                Obj.maxxDim:=WH_x;* l' n. u* y" ?4 w8 y7 z3 e$ y
                Obj.maxyDim:=WH_y;
3 h+ O  r. |8 J( [                Obj.ColumnWidth:=3;2 U4 a6 H9 f* F6 h/ d7 |6 ]. }" w
        next;
: K- U! a! ^1 E6 b4 ~" n. z        0 X* t$ R8 `5 A7 B, v
        .Delivery.MUs.Forklift.speed:=2;
+ v! j2 y# D$ X        WH_var.delete({1,Part_Nums+1}..{*,*});" a' F  P0 D* L
        for i:=1 to Part_Nums loop
8 D% Y! s8 W8 s" i                WH_var[1,i]:=chr(64+i);0 p/ A% A  X5 b9 ?  W3 s" D$ E% E- x
        next;0 l- J- B! }9 r4 D) j  v* `
end;" u, w/ }3 K, a& d( ^7 W6 K
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了5 w3 Q4 L% P3 b& s( ?
# D; M8 A6 W- D0 s

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-6-26 16:45 , Processed in 0.020044 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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