设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3127|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
. t' l. Y' B" r  }$ U语句是这样的
+ u; g5 T7 G/ p  p7 E: tis
% ]$ }( f/ v& u: k3 |        i:integer;
! ^6 I. R' k# c8 h8 N4 k        Res:string;
* P5 {5 |; p9 E# g' l) [+ h        obj:object;
. J- F% G0 W7 }& g- edo
$ b4 [$ i' q. a3 ]8 W! n1 M        if existsObject("Status") then
/ e0 J9 C) P* o# K                Status.deleteObject;
7 |$ ~% ~% M4 H0 `% A7 H2 S% ^5 u: y        end;
3 t; [+ s+ @9 M8 M& W; Y        for i:=1 to 10 loop
: V; W) I2 P5 T3 r; }- A                Res:=sprint("Store_",i);
& o! p* b2 j3 }6 f                if existsObject(Res) then
+ t1 ?6 J+ K- ?  T" G4 r                        Obj:=str_to_obj(Res);; p. E& i2 l- K- I, \6 @9 o
                        Obj.deleteObject;
/ B0 O" j: H- C0 L                end;
. x- c' Q& s, X; b1 X        next;
( w) L0 X( B. \( y" ?        --shengcheng Status:zimoxingceng5 Q+ ]+ F. S/ x5 ~
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");) t9 [% ^- i4 V
        Obj.Label:="warehouse status";7 X3 w6 G+ w& I# b# v
       
& y4 G! f: d: k9 _( ]        for i:=1 to WH_nums loop
4 l) ?& l8 G& q* w2 a6 X4 u. w                Res:=sprint("Store_",i);
" L. v1 U% ~. v                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
, f: O* v! a5 C, w                Obj.Label:=sprint("huojiaceng:",i);
* t+ P2 L% W7 b                Obj.xDim:=WH_x;4 \1 U) [! H& ?! L! N( h
                Obj.yDim:=WH_y;' U. K: f2 C% j+ V; U: }
                Res:=sprint("StoreData_",i);
" ^9 A6 G" I# M9 Z& ~. J               
, k3 @# |) a& `6 x6 Q5 c- |6 ?                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);1 r6 T5 s' Q% I5 ?( L( [6 S) w0 \$ p
                Obj.Label:=sprint("huojiaceng:",i);
$ l4 x8 Y% X! t+ M+ n                Obj.inheritFormat:=false;1 q1 h3 ]" ?7 d6 K+ F" ]5 k$ B
                Obj.maxxDim:=WH_x;
* L8 Q. z& b7 a5 L# s                Obj.maxyDim:=WH_y;
5 r5 b7 W: O' B5 z- I, y: R% f                Obj.ColumnWidth:=3;
* G$ a  r2 H4 Y; y        next;, E- J" f* `4 d' U
       
  o; o) S* g4 G        .Delivery.MUs.Forklift.speed:=2;
1 d# y% v5 `0 C' D$ D        WH_var.delete({1,Part_Nums+1}..{*,*});
2 W. c9 G( \/ c. r' J% c3 v5 `        for i:=1 to Part_Nums loop) N, M9 `; Y2 K" q, r+ D
                WH_var[1,i]:=chr(64+i);- N; p2 g) y8 S# A
        next;
5 P  T8 {8 Q2 }$ v9 ^' Fend;% Q# c% C- X7 \1 q1 B
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
5 i5 X* J2 B' Y6 p+ P: |# Y: l0 q9 _# v) w+ @2 ~

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2025-12-22 12:28 , Processed in 0.013561 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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