设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4432|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。8 e3 c2 J3 A2 B8 M9 D# C2 d, I
语句是这样的
+ c% X2 _0 O( q' A/ K0 dis
6 D/ m# W: a. B8 r& |        i:integer;( E* n- ^' t, Y' ?) v8 r/ o7 v, a
        Res:string;. i! D; U$ w1 t1 r0 }7 C
        obj:object;
' u3 t, C$ R+ hdo
% n. M; z" X) [8 _7 }& Z! H. v4 {# M        if existsObject("Status") then
  A1 b1 U' a* A* C+ B  z9 }2 G                Status.deleteObject;# a3 e; Q2 e  q, M$ j7 j* J
        end;
% J0 y: b1 S8 {* j. _1 D4 B% D# e        for i:=1 to 10 loop  O8 `5 F7 L4 O" O" v
                Res:=sprint("Store_",i);
4 I4 o( e! K4 s4 n                if existsObject(Res) then
  ^4 J/ d( k; j8 L                        Obj:=str_to_obj(Res);
. _: v- ]+ n9 A                        Obj.deleteObject;5 [( D$ ^% P) I2 O; o" B" P
                end;# O5 B5 {7 X2 `$ g  D: P# Y- N
        next;( H! @. b* z9 f
        --shengcheng Status:zimoxingceng
+ g1 i2 ^: i$ Z  g  t( J! y        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
" ~! x, y/ U! `' E& l! q$ K        Obj.Label:="warehouse status";
4 w2 S7 c9 R. ?1 ?; D& f        ( j! V  b% i& p) q3 Q7 R
        for i:=1 to WH_nums loop  Y( J1 R1 N$ s8 b
                Res:=sprint("Store_",i);+ \- h  ~$ E& w7 b: p+ _, y
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
( I1 s/ w% B9 ~* ]8 ?% s                Obj.Label:=sprint("huojiaceng:",i);7 F( G! d0 ]5 S
                Obj.xDim:=WH_x;! M" n) Q& y) S. k! m8 }
                Obj.yDim:=WH_y;, T" A/ L$ ^% v' O0 P
                Res:=sprint("StoreData_",i);8 F3 I4 e. m4 w/ Q- I# }
               
$ R: {7 ~/ H0 V$ P9 v# Q                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);2 `8 S" c, t4 T7 C
                Obj.Label:=sprint("huojiaceng:",i);
# F! G' ?% a+ F: g( y$ @                Obj.inheritFormat:=false;
$ f8 D( ^& U0 S/ [$ [; L2 d# R                Obj.maxxDim:=WH_x;0 w2 g2 S* z. b: j* q" k
                Obj.maxyDim:=WH_y;( `$ F( U& ?8 m* i: B" X
                Obj.ColumnWidth:=3;% S. i8 \; m' C: j& z4 n/ W; \6 H
        next;8 g, t/ s9 m$ S# m/ W% A! Z
       
+ q" n2 N7 `; y' c2 L        .Delivery.MUs.Forklift.speed:=2;
) c. v% U+ j$ E        WH_var.delete({1,Part_Nums+1}..{*,*});
& O( m" Z' k' ?6 l2 @4 P; E7 g" _  o        for i:=1 to Part_Nums loop
3 Y3 o4 W* z: g  W6 v- z' h                WH_var[1,i]:=chr(64+i);
+ c* `- A6 E( W8 z# p$ \$ [        next;# ^+ K* l% w# P' ?3 Z2 p
end;
6 y" k4 @* V; A出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
& u2 u2 S4 p- [6 `' m& K
- e6 W# D- A: C! o4 c

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-8-9 08:04 , Processed in 0.019284 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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