设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3910|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
& T3 T7 [6 d6 [4 X% b  N语句是这样的  H% X/ Z% K$ N
is
/ Q/ r0 d0 g: p1 J; C, `        i:integer;  j& v( P4 h0 v' x& C
        Res:string;6 F4 f6 w! a0 n  b7 N
        obj:object;" q# I/ F/ C; @: |" g1 E0 J+ V( ~
do9 N1 o/ _; ?/ l$ k! ~% ~5 e
        if existsObject("Status") then( K4 {1 s! Z8 v5 ^; p& q
                Status.deleteObject;
% Q  h$ M  x+ S- Y. m* Y1 T        end;  g# X1 p& H9 X# Z$ L
        for i:=1 to 10 loop; j  P6 d" c9 V$ H. @! S8 l
                Res:=sprint("Store_",i);
7 Y* g$ W% h7 o                if existsObject(Res) then9 \! L7 d* S# C' w4 S8 z* Q
                        Obj:=str_to_obj(Res);+ l" J5 w* t. }3 b8 K5 ?2 s1 X3 p
                        Obj.deleteObject;
" C" i; J0 {0 q                end;/ I! ]& j, j9 U6 Q& e( G( P
        next;
1 y5 R6 l; M5 }" J, F        --shengcheng Status:zimoxingceng
6 s/ V$ R) w" f: _" }$ A/ ^        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");1 H) ]7 w9 ^& W
        Obj.Label:="warehouse status";, L2 v) b% ]  a
       
8 M9 I0 N3 n6 \1 [' C        for i:=1 to WH_nums loop
/ A! M4 Z2 D$ V                Res:=sprint("Store_",i);% t6 P: }2 g% z
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);; Z" ?; R! p! j- g
                Obj.Label:=sprint("huojiaceng:",i);8 A- d/ [7 s8 }# ^
                Obj.xDim:=WH_x;
5 s1 x3 V: X5 U" a                Obj.yDim:=WH_y;; U9 ^7 ?9 `. v% s( c. C$ W
                Res:=sprint("StoreData_",i);
; ]. O" F$ i/ w/ ?6 J8 z+ w8 C7 u               
1 p6 z  S9 |+ \: A+ E                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
5 G6 A' X2 `! V                Obj.Label:=sprint("huojiaceng:",i);2 e; ~* N. V! S+ O. }: h
                Obj.inheritFormat:=false;( h* P" j3 c/ }/ ~9 l, A6 u
                Obj.maxxDim:=WH_x;3 ]" V5 ^3 `9 X9 i& i0 D1 ^
                Obj.maxyDim:=WH_y;
( V5 r$ r3 G& S5 Z$ a6 `                Obj.ColumnWidth:=3;
; F+ F$ D7 v/ o; X# X9 m5 B! o5 u        next;- y7 F+ }/ [1 q9 r. W$ a% ?
        9 U/ [, z2 D8 P: q4 o
        .Delivery.MUs.Forklift.speed:=2;5 s. x  p6 T! B" r5 r4 s: z. S
        WH_var.delete({1,Part_Nums+1}..{*,*});, z3 v* X# e" F) d8 `* M9 o
        for i:=1 to Part_Nums loop. Z* U* j' ]( @) }. P: J) _$ i4 v
                WH_var[1,i]:=chr(64+i);
5 h! D6 C1 r! L* _( `3 [        next;
! \2 X; y" K' @8 M+ {end;
7 C8 n$ O* r. D/ I出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了! z* Q3 g* S: V0 s- ~' W8 n
5 X5 [% V! X. |$ u

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-5-13 13:52 , Processed in 0.019610 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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