设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3949|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
) ^" B) V5 [1 Y( P1 ^6 s* v, r语句是这样的$ t( [0 e) n- w( F' T+ L9 S& _
is0 t8 g6 B4 f3 {0 o) I1 D/ a
        i:integer;
  p+ t8 K1 F9 n) R        Res:string;, }9 J) y5 R' F9 `
        obj:object;
. ~+ g6 _8 T+ Kdo9 s# v' a5 d3 g) v% I
        if existsObject("Status") then
* D: b$ F! H6 J; L7 I$ ]                Status.deleteObject;1 M6 a% R9 s4 n% X" D
        end;
# j( U* f  I( j7 `        for i:=1 to 10 loop6 S! @. a# G  z$ u: m' |
                Res:=sprint("Store_",i);
. X# |4 y! n1 V9 W/ s+ ?                if existsObject(Res) then
+ L/ X: n% i6 G6 s/ g" w                        Obj:=str_to_obj(Res);
8 F4 S5 t' P, I& l+ o                        Obj.deleteObject;! x: I" [4 b! b( q
                end;
7 v2 D  C6 u- K! f4 O  X5 K        next;/ R7 o4 M7 N, ~) f
        --shengcheng Status:zimoxingceng+ V7 @+ _5 G. U: r
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");2 M; `1 d5 t) {$ P8 P! Z
        Obj.Label:="warehouse status";% l( |( q% a# R! O
        9 w+ d8 S$ s! _- g
        for i:=1 to WH_nums loop
" O1 `4 x( x" [1 h- f                Res:=sprint("Store_",i);
* J* ^: ~2 f. i/ Z3 G5 ]1 {& k                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
9 w4 m3 d* G6 ~3 D5 G9 H! w- ^                Obj.Label:=sprint("huojiaceng:",i);( T, l) d7 e' s5 n+ G, T
                Obj.xDim:=WH_x;
" R: a" b8 ^6 c9 B* t9 n8 d1 n                Obj.yDim:=WH_y;
; k/ R' n/ w3 U0 v1 R* `- y- D                Res:=sprint("StoreData_",i);( W6 s, y1 ~9 ?. m
                + e& Y8 x7 M2 p1 A% r& I; A' n* W4 M
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
) Q  E; F* n+ G  k$ @                Obj.Label:=sprint("huojiaceng:",i);
, @# B( y2 e3 f8 z                Obj.inheritFormat:=false;
# W, o7 n! H0 G: Y6 v                Obj.maxxDim:=WH_x;
; a; O, [6 k  g% Z8 c9 n, W, H                Obj.maxyDim:=WH_y;! l: I) E% e! ^* k# k
                Obj.ColumnWidth:=3;: X8 z# t0 k: h
        next;) q; ]% p/ p5 a
        8 y% U7 d- h! e2 W8 V1 Q
        .Delivery.MUs.Forklift.speed:=2;
7 ~1 s+ F" u; W/ V% ]$ i0 q! O9 T        WH_var.delete({1,Part_Nums+1}..{*,*});2 T& M7 y# E; L4 c2 d- z! b4 c  A
        for i:=1 to Part_Nums loop( e+ p' f) N& b- ]+ o) _2 t
                WH_var[1,i]:=chr(64+i);: E. n8 g0 k$ f2 w& |/ c( i
        next;2 L+ B3 b; {" e5 q! T' l
end;
3 J8 d$ l6 ]. \出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了  }5 @7 g$ L. a. r+ T! l' F

9 @) {! W5 c1 y2 C. r

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-5-19 13:05 , Processed in 0.024203 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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