设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4198|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
% @+ |0 J* ?) c4 m+ {, {语句是这样的6 }2 X6 K" y& d" i# d
is1 f) O8 w5 v; [5 @% C
        i:integer;
! F$ B6 ]) h+ Y6 \  d7 j        Res:string;0 U8 h6 Y5 }9 ^  _
        obj:object;
2 O! w6 H! q" [, s: Xdo; E+ f% N5 ^4 k7 h. v4 Q5 T
        if existsObject("Status") then
5 p2 k8 S6 \% F                Status.deleteObject;
* e) a8 Y" h# b. ^' Q$ G        end;
. \- j$ q& w1 ]( ^% H        for i:=1 to 10 loop2 K7 ]+ u9 P* K) x, t
                Res:=sprint("Store_",i);
/ L; z, x( L: B8 M7 e                if existsObject(Res) then# G+ L! Z$ x$ A1 J1 Y3 q0 a
                        Obj:=str_to_obj(Res);
7 o( T/ Y8 _& i) c# Q, \1 k' n                        Obj.deleteObject;1 p" _$ W5 C. B* r3 U/ I
                end;7 i- i0 x, G- K0 A2 m, Q
        next;
+ L8 k3 c+ ~0 F/ o) q* e, \# K        --shengcheng Status:zimoxingceng
7 Y9 w: ^/ E; e5 G/ O3 r        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
6 Y+ G; J+ H2 |5 \! ?        Obj.Label:="warehouse status";
3 x; l0 g+ R* m, q; G       
: G; B2 y/ P! K3 r* x/ j        for i:=1 to WH_nums loop, N; p( `( s' L5 Y7 Z1 I
                Res:=sprint("Store_",i);
! z: B* C/ w$ [: ]7 @                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
* b" l  h, L2 Q                Obj.Label:=sprint("huojiaceng:",i);$ v2 B' }1 ]2 O; y& @6 H0 w
                Obj.xDim:=WH_x;2 q: @. C( s* W" U" ]' N
                Obj.yDim:=WH_y;
6 R8 _2 n" f2 ^3 h. m8 [! B+ Y                Res:=sprint("StoreData_",i);% d/ o3 U0 S% B1 Q6 E  C. l
               
" F) x# T2 i, I8 Y                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);6 O( x+ ]' j. C
                Obj.Label:=sprint("huojiaceng:",i);) M3 J/ }0 K6 N) `  C0 l; R
                Obj.inheritFormat:=false;- R3 c! g6 _' \: Y
                Obj.maxxDim:=WH_x;& Q1 \, E6 D; U" r
                Obj.maxyDim:=WH_y;) _2 s5 ]  e$ A- a. _" }5 }
                Obj.ColumnWidth:=3;
% ?; V& {. }, Q0 ?6 u' s# M        next;
- w9 h# u# }5 j4 E5 a        2 w6 F" W8 ?# U3 a2 W
        .Delivery.MUs.Forklift.speed:=2;
) ?) p- _5 \) a7 a3 @6 A% B  k        WH_var.delete({1,Part_Nums+1}..{*,*});
9 G5 y) q9 k# A8 ~& H& J* }        for i:=1 to Part_Nums loop
" r3 s: F; X/ b- E" c. E                WH_var[1,i]:=chr(64+i);( @) [& @( K6 @% ]8 I5 M: j/ z( B) o
        next;* s: P" \' p* P3 [
end;9 P1 P# ^3 P! n- @* B
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
4 n( {% _* A8 Z# F1 a! W$ @  \/ D/ ^9 @" a$ R3 i

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-7-6 10:24 , Processed in 0.016983 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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