设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3637|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。, W2 ?: X5 |) l7 \
语句是这样的
$ l8 ^  W4 k. v# f% y' T% z1 Cis; {2 g" j6 M" `
        i:integer;
# ^) h/ p/ p4 }# i# O! h        Res:string;& B6 h/ j& Y6 n( r3 T, X# J
        obj:object;
9 W! S* O8 v. G, u7 Ado
: N3 f, k$ y: n  n+ P4 P        if existsObject("Status") then
/ i' G; @" h# M% q# T                Status.deleteObject;
  w3 x4 t% Y' S2 ^  p! }6 w        end;
: p" c2 @; \) C- O        for i:=1 to 10 loop5 K: F8 ^7 ]& ~& }0 F8 `
                Res:=sprint("Store_",i);
# P1 s0 i$ p# q. X                if existsObject(Res) then
6 n2 n2 I- S8 u" d. S                        Obj:=str_to_obj(Res);
6 n1 a0 s- |) x                        Obj.deleteObject;
- `, q# ^# ?# L5 y$ x) T7 J                end;9 O. S  c* s) r, P& o3 d0 C
        next;
. @2 l/ [( W% u6 g  I        --shengcheng Status:zimoxingceng
; m4 M$ y! }  m* b9 `2 T1 |        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
* e% i: H" |& j% y0 e        Obj.Label:="warehouse status";' S- A0 f5 k* N) ?
        : R) p$ W5 O4 T5 T5 Z& @
        for i:=1 to WH_nums loop) B& c* }/ J: \8 h' @- v
                Res:=sprint("Store_",i);
: ~4 H9 w6 H( i1 f# v: s. W                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);& q, _! A+ |6 U1 A5 q* q) x
                Obj.Label:=sprint("huojiaceng:",i);
' Y2 p+ k8 S, H! V0 P" o4 k                Obj.xDim:=WH_x;; o% U5 t& G% M: [9 t! |) Y4 z
                Obj.yDim:=WH_y;* J  n7 N9 P3 G6 E. q# K
                Res:=sprint("StoreData_",i);2 [0 ~3 U9 s% M- v
               
1 F6 d. D0 f6 I" n2 F                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
* F9 ^  l+ S4 ?. O+ v                Obj.Label:=sprint("huojiaceng:",i);
! {/ l! ]* B/ h8 s& [. `                Obj.inheritFormat:=false;
8 H/ Y$ e9 R8 W                Obj.maxxDim:=WH_x;
- j/ U* ?) R5 g6 s0 p5 o7 N                Obj.maxyDim:=WH_y;
3 D% {1 T% \: \7 s                Obj.ColumnWidth:=3;
% M# B& g7 `- L1 O        next;
4 w$ X  t+ y* M        ; E/ k3 P5 R& ?$ p
        .Delivery.MUs.Forklift.speed:=2;
# h9 W1 q: @+ ~. F        WH_var.delete({1,Part_Nums+1}..{*,*});
/ P' m2 h5 n+ l  C, v$ c' r        for i:=1 to Part_Nums loop
* l2 {# P2 O. K# U3 N" J) P* C                WH_var[1,i]:=chr(64+i);
$ h1 f  }9 l/ `2 U        next;
* y: ~  _/ c! z, P3 pend;8 n6 s/ q& v# l( p, U" g) D( d
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
9 V5 o! O) r- R0 J% D* ]% g/ {
; h# I3 p5 J) [5 @7 c7 {$ f- B) U

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-4-5 22:25 , Processed in 0.019829 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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