设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4060|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
" b/ w- m( z, y$ ?" K语句是这样的
" Q2 X+ l! V# i6 R5 eis
& t& s! v2 J, p% H) w* p" l, ^        i:integer;, H8 @$ W0 w! D2 I1 G
        Res:string;/ a' Y; W# g6 f7 Y( w  J
        obj:object;+ Q' M8 l* V- E' h- a
do
9 W- `) O# B; ]# j" B! b& W# ]) M        if existsObject("Status") then
+ ~3 ?; \6 g6 t1 G                Status.deleteObject;3 m- D6 Y# C4 T( o+ d
        end;' @4 A$ K3 o8 z) l+ X0 R
        for i:=1 to 10 loop
; a" {; a! M9 F! w                Res:=sprint("Store_",i);
! K& Z1 M* ]* t9 M0 n% V, n                if existsObject(Res) then3 W3 I% r7 B, N, w: [0 S
                        Obj:=str_to_obj(Res);1 i! a3 R( o. x, D$ K0 W) }& _
                        Obj.deleteObject;
+ B# d5 ]$ ?1 j. U                end;( p- w3 J& Q/ ~7 ?$ C: c6 ^
        next;! J% x. W" W2 z  p/ F' m& `4 T8 y
        --shengcheng Status:zimoxingceng
6 b: f: h/ _1 d. t7 V, h/ \        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
% }6 ~* W; L3 c* z1 ^8 ^        Obj.Label:="warehouse status";
% Y6 ]/ T9 M$ s        + i* D; w  O; [! s  d# i
        for i:=1 to WH_nums loop/ i) m- s3 b7 Z- e- U5 s
                Res:=sprint("Store_",i);
, P* E/ `$ O% O% U% G- ], a) R& e                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
7 E. a- O2 A2 p( P4 y4 F$ S                Obj.Label:=sprint("huojiaceng:",i);
% {$ e8 [% Y- f0 E9 R: `% Q3 u                Obj.xDim:=WH_x;
, F/ j, I3 y% e% P6 M) ?8 J                Obj.yDim:=WH_y;7 o3 |2 y# a( d0 C4 `9 N9 D' Q
                Res:=sprint("StoreData_",i);# l5 a3 q, X5 y) G" W; r0 W
               
: E( _/ w+ B6 C. B& [8 j! _                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
, p: M# `" Q3 ^* g1 m                Obj.Label:=sprint("huojiaceng:",i);
3 |/ K9 e, G2 Q% b5 ^  x" e                Obj.inheritFormat:=false;
7 D% k) ?6 _; w" }7 D0 `2 v# o+ o/ r                Obj.maxxDim:=WH_x;7 @  p; s2 g1 u+ G
                Obj.maxyDim:=WH_y;  c  `# a" t- T( t% D7 l
                Obj.ColumnWidth:=3;
7 w* L/ C3 {+ v4 U0 k: t5 h        next;6 m7 k' a! B1 P' A5 U" J% K
        , Q& `& v' C& c6 t
        .Delivery.MUs.Forklift.speed:=2;! r( s# z* _: f8 H. ]) e
        WH_var.delete({1,Part_Nums+1}..{*,*});- w$ }0 r1 [. Z% `& K& g+ C& Q+ z
        for i:=1 to Part_Nums loop
8 s# K! P* k8 |4 y; u                WH_var[1,i]:=chr(64+i);
. a" v6 |; H& |" A' O& w5 S/ E        next;2 f0 x6 i' q% G. k% E
end;
! }4 H8 L, K% ~$ D' I* l出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了, m8 @) N' h8 B# p- T. v8 ?

1 Y* u' m2 L# k! _3 `- @8 R

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-6-12 07:25 , Processed in 0.013938 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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