设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4116|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
8 E# b1 R' h, A语句是这样的
- D9 U+ x* S( ]6 O! K5 N1 c3 nis1 A4 T# L$ s4 L* ?+ u3 p
        i:integer;( N: K: h* u; `
        Res:string;7 n% X- ]! d" ~9 N! u
        obj:object;
7 f9 B9 P  Q4 fdo' X- N' h- j) Z& z& K
        if existsObject("Status") then' w" O0 a  M* I- x, Y
                Status.deleteObject;
& D; H/ d' H3 W  M        end;9 h% M! a; X& Y2 Y; V
        for i:=1 to 10 loop
/ K  f2 T! m8 Z2 j5 N; u8 R, \                Res:=sprint("Store_",i);: j- {, S+ f9 b" Y
                if existsObject(Res) then+ J: U# o" f& R' Y/ V- I
                        Obj:=str_to_obj(Res);" M7 C- i9 p  g; ^3 o
                        Obj.deleteObject;
( C0 j% H& ?: r, T( I                end;
8 B2 w' R5 ^# Z/ R        next;
4 Y9 T7 w0 y  ]        --shengcheng Status:zimoxingceng: r( Q- ^! ?$ R$ S+ t0 X
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
! a- {! A  k" I/ d( w        Obj.Label:="warehouse status";
( V5 \  F9 ~  F       
/ \% L3 l4 [& T  X( ~        for i:=1 to WH_nums loop
& [' P6 E; D$ W5 i1 Q                Res:=sprint("Store_",i);
- Y& ^" s: n- C6 H                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
$ i  m3 H- ~% e                Obj.Label:=sprint("huojiaceng:",i);
+ G9 }8 G5 T$ u0 E( e2 K. f4 p                Obj.xDim:=WH_x;
% a) F4 h5 O, N+ D6 Q5 W                Obj.yDim:=WH_y;
+ R' f$ I5 R- ]7 D6 O  q                Res:=sprint("StoreData_",i);
/ K+ e: r. w! E% P# J               
; B5 R4 T9 M# M& f* K* e                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);) ~+ S) x/ c1 j. n, M) C
                Obj.Label:=sprint("huojiaceng:",i);1 b3 n* |) O. f1 a$ F2 B- w
                Obj.inheritFormat:=false;% w- r9 |! S5 B& C8 k, X
                Obj.maxxDim:=WH_x;
5 j0 w" ~1 J" F                Obj.maxyDim:=WH_y;* |+ _9 U" i5 O
                Obj.ColumnWidth:=3;
  A3 _4 ^0 J; j: T7 [- ]" n% g: x& N' I        next;0 ~+ d. v2 c7 w5 P% `0 e% O4 b0 |
       
8 T7 \1 T4 J6 L6 N        .Delivery.MUs.Forklift.speed:=2;2 w" h  J8 g+ n* T- I
        WH_var.delete({1,Part_Nums+1}..{*,*});0 d4 t  [$ o7 A$ }
        for i:=1 to Part_Nums loop
5 A0 Q% {6 _0 y6 l% g8 Y                WH_var[1,i]:=chr(64+i);* D' d1 E& J- N1 ?* X5 H
        next;9 O: }- A/ u% O4 u( s9 K
end;$ b% ?8 O2 a2 z
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了* J) L; v, |7 Z, b5 ~0 E/ C& J
  R8 S* ^' _* V7 _2 c4 [' l

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-6-23 01:07 , Processed in 0.016287 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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