设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4073|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
$ W% [* o* H, T8 C语句是这样的
* Z& F/ I4 o8 _" g- Tis
  W5 ]- [( G) Z, k9 P2 o  A& z        i:integer;
: \. ?$ q* s/ c( p) v5 L& D        Res:string;
5 {3 R' ~) \. p) h' w# |        obj:object;
8 ~* x9 r/ H( V" B+ Z. _1 ^do
, ^6 b1 T# x. s1 w7 @        if existsObject("Status") then3 W% X  X' H0 f6 u, \% W5 [9 y3 m4 y2 x
                Status.deleteObject;5 q1 x/ t# d2 D# ?$ N- k7 h4 ~
        end;8 v- b/ a1 M7 q; w, A
        for i:=1 to 10 loop
7 r+ L8 y7 Z! |* V1 S: p. I3 x6 E                Res:=sprint("Store_",i);& B, o( Y( X/ v
                if existsObject(Res) then4 t+ f( l( Y! N& B( |8 H% g
                        Obj:=str_to_obj(Res);% x+ b% U* \  Z# D6 h
                        Obj.deleteObject;6 ^8 X# X4 @& s5 }% N$ ^+ t  t
                end;
3 S' z1 U8 x+ V* T        next;* }' t" E7 T8 _7 _! f
        --shengcheng Status:zimoxingceng; R9 X* y$ D; ?" e
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
8 h# k9 n7 p6 n; v( g# z        Obj.Label:="warehouse status";
2 t$ F+ C6 n2 u5 I       
3 {+ v% Q; S' {/ F  |5 ]$ F) e        for i:=1 to WH_nums loop3 r. L, s, ^/ H
                Res:=sprint("Store_",i);
# e/ p4 E) M2 A- ^9 z/ ?" u                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
. ^! W% T) m7 |6 E( |                Obj.Label:=sprint("huojiaceng:",i);/ l/ ^2 n4 {& ^- q
                Obj.xDim:=WH_x;% g+ R3 m' y* M4 s
                Obj.yDim:=WH_y;5 z2 n; ^; j3 G+ A. q
                Res:=sprint("StoreData_",i);  A8 q$ `; G2 b
                1 [) b2 @7 r+ k3 _
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);- J& U5 ?% F/ n
                Obj.Label:=sprint("huojiaceng:",i);1 Y) Q" Q$ b) B7 _, {
                Obj.inheritFormat:=false;
( I8 L' J9 W; }5 p( n# [5 t4 m( O0 _                Obj.maxxDim:=WH_x;
2 U8 a$ D7 t) I/ `' w  @% G! h                Obj.maxyDim:=WH_y;
3 V# @2 P. `) P- ^; u+ t1 k  ~                Obj.ColumnWidth:=3;
/ Z* I6 t9 b  i# v) W+ w8 l4 }        next;( ]4 ]* p2 b& s7 ^5 [
       
  [, x# g' z. a4 C! y. T9 z* f        .Delivery.MUs.Forklift.speed:=2;& t- V/ ~8 P, t" L0 U5 `( h
        WH_var.delete({1,Part_Nums+1}..{*,*});& y! v* U2 s# K, Q0 T: T. h) l
        for i:=1 to Part_Nums loop, ?% j! \" {2 u1 n- ~; S& o) c
                WH_var[1,i]:=chr(64+i);; ]+ z1 _1 u# K. e7 s& i  v
        next;3 ]& D: y- }0 z( T
end;: K) ]* S$ s: c9 o' ]4 @
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了* ^2 ?; ?! Q0 q5 ?* B' c2 w4 d7 @

- a0 O+ M/ v9 b  V

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-6-14 16:08 , Processed in 0.015137 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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