设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3681|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。: O% N1 J' s7 [! F
语句是这样的1 G$ d, p7 v3 g6 f
is
7 O, i# F7 l* Q, i8 d- F7 U4 t        i:integer;
% [1 K, l! g3 l0 N% K, c        Res:string;
7 J1 n% _: u% W) O7 B3 B" C        obj:object;3 w  W1 F3 F, n
do
+ g( a9 K2 n  |5 ~: w        if existsObject("Status") then
7 i& e: s# i: |7 j' G0 r                Status.deleteObject;) q% i$ K/ P8 E# F7 J3 |
        end;* s# }& T; v8 Z6 S7 i9 F" n2 h
        for i:=1 to 10 loop
/ y9 d0 M& Z% j                Res:=sprint("Store_",i);8 |6 n4 |  _% X2 @( Z4 r/ i
                if existsObject(Res) then4 w, D/ g% R1 h( ~& `" _; D
                        Obj:=str_to_obj(Res);! l6 c, b3 j( ?
                        Obj.deleteObject;, I# V+ R! q3 \3 z
                end;7 p4 u! @: a1 s  k% ~2 h/ z+ z+ V
        next;2 g) v) v: J. _2 a$ p0 ]
        --shengcheng Status:zimoxingceng( d) X  g/ v% [; d+ f" T$ M7 O' {
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
$ k- `$ v/ B8 B, s- M- i* `        Obj.Label:="warehouse status";
* g* G; Z7 [& e* F9 J8 ]        ) a4 \+ S6 `$ D" E! l$ `0 `
        for i:=1 to WH_nums loop* V; k& ^2 j3 Y
                Res:=sprint("Store_",i);
6 z6 l2 l0 \4 X, ]. z8 n# |0 N                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);+ Y6 J9 s  ^+ i+ f/ d
                Obj.Label:=sprint("huojiaceng:",i);, z: c4 |  b7 P9 o) x2 ^  H
                Obj.xDim:=WH_x;% n2 L, {# ^3 o2 O: f4 b- z
                Obj.yDim:=WH_y;
) \" T3 z  q1 y                Res:=sprint("StoreData_",i);
3 B& \4 K7 k- S8 A6 ~2 c               
$ n8 a" X) ]2 l" w9 Z                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);4 G! ?$ E" X  l, L
                Obj.Label:=sprint("huojiaceng:",i);7 i8 V! u# Z& l3 @% n- r
                Obj.inheritFormat:=false;( J/ \- v, @5 {& V+ c& O# `
                Obj.maxxDim:=WH_x;. r) [& n7 B7 N! T3 }/ u: }
                Obj.maxyDim:=WH_y;
2 A' h% \" k; l0 t  X9 g; \/ G% l                Obj.ColumnWidth:=3;
2 k% _+ v, ^/ r9 k        next;) F; e0 o, t  i- \2 o9 {6 q) M' N2 [
       
) i9 z  Z: ?7 E/ |        .Delivery.MUs.Forklift.speed:=2;
; t4 s3 h  L* y( [3 O$ I' v        WH_var.delete({1,Part_Nums+1}..{*,*});  P- F0 ?, H9 E( d+ K8 H  _7 l  C
        for i:=1 to Part_Nums loop
& g( s6 s6 e3 t                WH_var[1,i]:=chr(64+i);8 c  X* r$ d1 Z# b1 B
        next;* U% h8 J( u6 I7 ]
end;! H6 l+ Q4 B% c- k! C
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
0 c( ~1 O9 [4 j2 n3 [! D; e- S( Q1 i/ S- {, R$ S

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-4-13 17:10 , Processed in 0.018344 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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