设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3821|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。/ k0 n( U8 ^6 V7 E
语句是这样的
) }( G* q% J2 N" d6 Pis' ^9 _$ @9 M. |/ X+ |& A2 k
        i:integer;7 j' s' j6 d9 ~4 X! S  N* W9 x
        Res:string;
8 P, B- f8 S- V; e$ n        obj:object;
: \* H9 J" d7 F- Tdo  Y; _  m2 Z, \& |5 g% d5 d
        if existsObject("Status") then
4 Q2 P+ a+ O* f: e                Status.deleteObject;
. B1 N8 Y& {+ t+ w" s" v: Y, r        end;) g9 v+ I/ F4 M( c
        for i:=1 to 10 loop! E! R+ w1 s, B8 p. v* O
                Res:=sprint("Store_",i);
, s7 W3 j- Z8 C: b. S1 }1 ?; J- P                if existsObject(Res) then
! k1 r3 u8 ~! \) i! M7 i5 g; Q/ k) U                        Obj:=str_to_obj(Res);
: U$ j" y; A  S0 L5 z, W                        Obj.deleteObject;; A: q* u" ^  D/ ?  m! d/ l, u
                end;
; j0 X7 U3 I8 u+ B        next;
3 s% p8 j* Q; M2 u; n/ @) ?, y        --shengcheng Status:zimoxingceng
9 N' q4 q" x9 u/ [        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");# a  G4 n$ _# g' h* U
        Obj.Label:="warehouse status";4 `5 K/ X5 \9 ^' s) @
        / J! x. l4 Q3 W1 U4 c# |
        for i:=1 to WH_nums loop
4 k2 s# ^/ z5 c: D1 g/ f                Res:=sprint("Store_",i);4 ?) V, ], J: \
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);" ?  C2 [3 p' y6 \
                Obj.Label:=sprint("huojiaceng:",i);6 v; f  w3 ^, O8 [
                Obj.xDim:=WH_x;
3 u0 E8 S; S: z. [( L" X' I6 u8 O                Obj.yDim:=WH_y;; @8 S* U% P1 n+ ]* C
                Res:=sprint("StoreData_",i);
" b) n8 V. n0 w# E: P+ K               
6 ]% }1 E3 U) C! O, P- m# r& R, t                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);- \( @+ \7 N) M6 ?- P, f$ y
                Obj.Label:=sprint("huojiaceng:",i);
9 I; T$ i2 v/ n+ w+ T                Obj.inheritFormat:=false;, K; E# n- ?7 g) B/ P' {$ \
                Obj.maxxDim:=WH_x;2 r* q& g, I1 Z
                Obj.maxyDim:=WH_y;
& P3 T1 J' `* M, G/ v                Obj.ColumnWidth:=3;
! ^4 }; Z  h/ Z6 _        next;7 `' `: r  ~) \- z9 }- S5 x8 Z2 ?
       
8 E& O/ ?3 F! ^4 `        .Delivery.MUs.Forklift.speed:=2;
3 t6 i" g. q$ k7 q2 h6 ^+ j& j        WH_var.delete({1,Part_Nums+1}..{*,*});
1 F7 l; u/ K& n7 x& ?. K        for i:=1 to Part_Nums loop* T2 e0 B8 ?" T* }
                WH_var[1,i]:=chr(64+i);. t8 A4 S$ y* m- O6 B- A+ F7 X
        next;
2 i, n' ^! {! {. n% s4 P8 Aend;
6 ^: w  t( [" w+ Q% K2 f. C3 K出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
8 _+ Y. G$ R! j- e% Q, B1 B$ T3 o0 l. }) ^

本帖子中包含更多资源

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

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

本版积分规则

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

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

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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