设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3803|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。+ k8 [+ S& `7 t0 i
语句是这样的- U0 q( a1 o. V" g8 [
is' m: o' l2 h8 e" m
        i:integer;
9 @( |. H; }. p+ O4 U8 A6 K  N        Res:string;, |  i2 v( f) c8 j
        obj:object;0 f) `  A5 A% U2 Z" w
do
. ~9 D8 B- z3 h1 ~4 L2 r        if existsObject("Status") then
, q7 x* w  b; A                Status.deleteObject;4 [5 c7 ?- V  q/ t- r
        end;) {- L! X3 f  t  f! I5 p: x, B" V% m
        for i:=1 to 10 loop7 Z+ |& S+ S% L: p& [, t4 P
                Res:=sprint("Store_",i);
/ }8 z& W: |4 v6 G* |                if existsObject(Res) then# A" i! k2 T0 ?' r8 _5 f
                        Obj:=str_to_obj(Res);6 o( v1 J" T% t( ^, }3 m5 b+ ~1 U
                        Obj.deleteObject;
* ^0 h' N; K0 e  g& h5 j                end;
1 v: N% ~: G: A        next;4 k; r) c  V0 h
        --shengcheng Status:zimoxingceng
$ u8 m+ O1 X- H* G" `        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
& d8 L' \6 v& z        Obj.Label:="warehouse status";. m" c' `5 _1 B" l5 U
       
3 B" `# H1 f2 J        for i:=1 to WH_nums loop
1 i5 L, f. j2 v2 j& Q                Res:=sprint("Store_",i);
. ?7 Y5 o! Q) G. p) j                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);7 r) e# Y) W3 D- h
                Obj.Label:=sprint("huojiaceng:",i);
! ~: E  a0 w$ L+ B& F7 a                Obj.xDim:=WH_x;
0 Y, B4 e) \' j                Obj.yDim:=WH_y;
& ~- f' J* {3 P2 L+ y                Res:=sprint("StoreData_",i);
" S9 h, V7 y1 S5 E/ u/ K               
1 s* V' I) Z( z6 N2 X6 H                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);: p8 R1 _& e! Y
                Obj.Label:=sprint("huojiaceng:",i);
2 `! n' L1 w8 j7 A; X& K. w                Obj.inheritFormat:=false;5 q2 Y! g, q1 h4 ^4 x5 q
                Obj.maxxDim:=WH_x;
7 T7 A% B2 l; t  |                Obj.maxyDim:=WH_y;
& v& {/ J- \/ [- d) {4 P! d8 A: F                Obj.ColumnWidth:=3;
2 c0 }6 P+ M1 g        next;* U8 V3 O! j- v/ H4 V0 v
       
; D  K) O+ h6 Z) h" l! P% b        .Delivery.MUs.Forklift.speed:=2;
  q5 ^" z0 @  c6 H        WH_var.delete({1,Part_Nums+1}..{*,*});2 l6 `+ n! D& O8 F& V
        for i:=1 to Part_Nums loop" `) M2 f5 f" x
                WH_var[1,i]:=chr(64+i);# A6 A& l. l% V& C) q' _
        next;( J4 {4 k/ y4 p: X
end;" O# I) T. ?' n$ p( K; v8 N
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
. ^; X7 U' G# M* g6 D- Y3 ?$ g- t# c% U* H$ ]4 a

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-4-28 14:29 , Processed in 0.016960 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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