设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2455|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。5 ^4 @% r: P9 j% J% O: n
语句是这样的1 E8 {; R7 A$ F4 ?5 p  d0 i
is
: g7 a& M& J9 l; |        i:integer;
( C5 Q. t3 y3 O6 g* i        Res:string;
- x5 O" D: w7 E$ Z" f9 x  q  a: c0 r        obj:object;. _% K% w( y8 i5 e7 W8 w* ^
do. b$ W- F  B9 k$ q! `: h0 I
        if existsObject("Status") then5 L& Z) T  @; \' A
                Status.deleteObject;; ]4 N4 N, r: Z" X* G  C3 R
        end;
) J: N8 @6 s; M( [9 T6 o: n! X        for i:=1 to 10 loop
% e* P7 Y% H) J                Res:=sprint("Store_",i);
( w5 ~* o) h4 Z1 a) J9 l                if existsObject(Res) then
7 I7 w" n+ d( O; C                        Obj:=str_to_obj(Res);; Q' n2 v9 A4 q$ [6 S2 I) s+ |/ u
                        Obj.deleteObject;! d' C# V0 R1 q5 |9 M
                end;7 R* ?2 s' q; _! k& }8 C4 ]5 X# d
        next;. W# s3 K* Y: J
        --shengcheng Status:zimoxingceng7 |6 \# i2 K- i; Q! O8 L3 w
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");! l+ Y9 ^6 ^: ~2 ?4 S
        Obj.Label:="warehouse status";
- b" u8 X) G( P' k' l, R: h5 ~        * [/ O* l2 @* ^$ h
        for i:=1 to WH_nums loop
4 U$ y: I: h( I0 E                Res:=sprint("Store_",i);0 _- I  a( \# F) [
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
  z7 v2 |' \0 W# x# v8 U0 ?  g                Obj.Label:=sprint("huojiaceng:",i);' A8 G* u# e# K) a0 B: I, _
                Obj.xDim:=WH_x;
& c$ I2 p# ~! o# @9 i3 ~; R4 t                Obj.yDim:=WH_y;% F8 K  h3 j7 w" L/ u+ m: A) K( e/ ?
                Res:=sprint("StoreData_",i);
' ~- g" ], A( ?$ [( y                * H& ~5 _$ r$ G' O
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);% |# B* W2 X* x  g& K' `
                Obj.Label:=sprint("huojiaceng:",i);" _: l( _  t5 {% W& z% \
                Obj.inheritFormat:=false;, t9 [$ e! U: I. N9 l# A  B
                Obj.maxxDim:=WH_x;5 [0 U2 G' ^& d& ]$ f$ T- a
                Obj.maxyDim:=WH_y;  l+ g0 b7 d& w. x, O' D' p
                Obj.ColumnWidth:=3;
: o8 [% f6 {6 X0 ^/ P/ O        next;
  X8 o5 H/ \1 c& B4 [) L( E        * E, S5 f/ n2 e' |9 G6 P
        .Delivery.MUs.Forklift.speed:=2;
# Z) g. O3 l3 |7 O0 a        WH_var.delete({1,Part_Nums+1}..{*,*});+ Z- n* y9 |2 V
        for i:=1 to Part_Nums loop7 ^% W0 G9 W$ N7 i/ [- R! M
                WH_var[1,i]:=chr(64+i);' x& C7 H: G( Y5 X" F
        next;' F1 d7 v4 |5 |6 `% S
end;& I' M# Y; ]7 O7 d# m  ~
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
# ~8 a7 @5 r8 l
6 r# u7 H( W1 Z2 j) u

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2025-7-1 05:50 , Processed in 0.014970 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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