设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4024|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
* j: M5 ]  _# Z1 s4 l$ }语句是这样的
9 y* w% p* o; o8 b' W/ L$ Ois  \# d  a8 B6 T3 I  c
        i:integer;' t- r9 G' i+ Y- r! b( g8 V
        Res:string;
- }; u' N: P8 Z6 f, l1 r  ^        obj:object;
1 D4 D& b  _' K) k; w. x/ y; mdo
! v3 k) K8 `3 [, w" C8 `) L) ]        if existsObject("Status") then1 d* Z  H" @5 e4 l
                Status.deleteObject;
1 T0 _( J  y* T+ v# E8 M        end;
& a3 y$ Y8 p" j        for i:=1 to 10 loop& z7 V5 h6 m/ u2 v: j
                Res:=sprint("Store_",i);
% M8 x; j( f: m5 |: O                if existsObject(Res) then. D, V4 V" D( |. f$ X
                        Obj:=str_to_obj(Res);
; u1 H. V7 s8 Q7 Z. n                        Obj.deleteObject;7 o: [0 g0 A0 s, J
                end;, B- d/ l" G$ `1 z; D9 Z& _4 D
        next;! ?3 ], {1 e+ Y0 _
        --shengcheng Status:zimoxingceng
' x0 R2 i$ U! p9 A$ R3 }6 g        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");3 c, u+ r/ J3 l; `% R3 c
        Obj.Label:="warehouse status";' f$ ?5 G5 n* x( Y3 v, I
       
! B9 o: j! R; H( C" Q: I5 `        for i:=1 to WH_nums loop
2 l- \1 ]9 ^" g9 l: [                Res:=sprint("Store_",i);: I1 t8 H" ]- K0 `
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
& _  j, r$ c# [& v, ]- }8 i& C) y2 X                Obj.Label:=sprint("huojiaceng:",i);2 s, L% F7 @. d" I' g3 z
                Obj.xDim:=WH_x;/ b6 q3 _0 a. _' o$ r3 l' _
                Obj.yDim:=WH_y;+ ^5 F! y2 A7 B+ F, \
                Res:=sprint("StoreData_",i);
) j  f- V& F$ [- P3 n! x! ]                0 V# m  v; ?, B
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
4 Z4 _7 Y( e* Q. r( j" M                Obj.Label:=sprint("huojiaceng:",i);
% W" q  h+ C9 i                Obj.inheritFormat:=false;2 X  @% A6 [/ @
                Obj.maxxDim:=WH_x;
5 d2 _; ~" d  Q- d( r1 \                Obj.maxyDim:=WH_y;
2 D, @  Z, N/ a5 ^" q' L! I- |                Obj.ColumnWidth:=3;" j+ |+ Y$ H$ O4 e3 V
        next;
% k$ z( t3 l* H8 Q% {" J  d       
' C. [( b! M  o3 G" D        .Delivery.MUs.Forklift.speed:=2;
7 L/ d% ~2 ?/ h+ Y        WH_var.delete({1,Part_Nums+1}..{*,*});
% ^% z' ~& A4 ]6 \        for i:=1 to Part_Nums loop  B% I, Z$ A8 q7 j1 ^* x+ d- H
                WH_var[1,i]:=chr(64+i);
$ v. u# b( s, N        next;4 I+ p" R) U, V& c0 O/ U& F0 c
end;
; s+ X+ ~. ?8 \, F; O出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了0 @; h$ A7 t" s6 f' [( L0 B1 T
9 M/ Q4 m/ x" \/ D0 U5 y3 ?

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-6-3 12:22 , Processed in 0.018365 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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