设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3326|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
9 \8 |: |* p7 O! a& v语句是这样的' `6 y0 j5 ^) k- Q" v
is# d# \# b* j3 A; |
        i:integer;
" P$ v5 W3 h0 Q$ a$ ]. L        Res:string;) ]9 B/ A5 u" `' |( o
        obj:object;2 ?) e$ t/ w# g* E& \
do& e; @! L6 l5 m1 S* B
        if existsObject("Status") then
' k6 d, T( W! ?, J% y+ v0 X* O                Status.deleteObject;
8 w8 \/ ^6 ~- a        end;
* ]$ s$ P; d4 @7 b$ K' L        for i:=1 to 10 loop' L4 f( Q; G' A/ t/ \& v
                Res:=sprint("Store_",i);
+ c4 U2 ]/ r8 T8 y                if existsObject(Res) then
8 B1 E, c% S- x; @                        Obj:=str_to_obj(Res);5 i" m; e; ?% Q
                        Obj.deleteObject;
5 y* d2 I& l) ?; k. E7 d                end;
7 M3 @1 o$ S3 ]        next;
  S' \0 d' z8 p# {. W        --shengcheng Status:zimoxingceng
5 r$ O; |8 C+ O* f        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
9 z/ _. S# Q5 v! Z# _2 ?( _7 B        Obj.Label:="warehouse status";. ]  ?) m' ?0 J  |; j: C2 r
       
: ]9 J7 K; ~. @' K$ K2 B5 u        for i:=1 to WH_nums loop
0 O) |2 l" D, ~7 t* U4 D0 v                Res:=sprint("Store_",i);
% w3 s5 _9 Z* C3 V# ]                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);. |  K, s% I2 _- C& O/ t( R9 }
                Obj.Label:=sprint("huojiaceng:",i);
! s& |2 p) ~. f9 z/ c1 ?3 c2 L: }                Obj.xDim:=WH_x;# s( B; t% v+ b0 {! t; F
                Obj.yDim:=WH_y;# T3 A/ }' |2 }, R
                Res:=sprint("StoreData_",i);/ \: j7 U9 y: _1 @: R8 c/ ^
               
+ |0 n/ b. _- y% u! [                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);0 l/ i2 y6 H7 L/ ?. G2 B! E6 B' _
                Obj.Label:=sprint("huojiaceng:",i);
1 A3 u; Y: x# A3 a: ^; ^3 i, h                Obj.inheritFormat:=false;6 D. n& p2 y% g( d+ E% J
                Obj.maxxDim:=WH_x;
% B* e( K8 Y* _9 H                Obj.maxyDim:=WH_y;& s+ Y4 @2 K% F. d* ?
                Obj.ColumnWidth:=3;
9 u4 \2 H' t( s7 m        next;
  S7 j* `* Z2 ?9 C       
  m; O) P4 q7 q1 s3 a) J        .Delivery.MUs.Forklift.speed:=2;
3 g& V( |, e2 p' D! r2 A        WH_var.delete({1,Part_Nums+1}..{*,*});( c& q% U( A5 n2 x7 U5 ~
        for i:=1 to Part_Nums loop
& n7 {$ U/ n6 {% A7 ~, ]7 k+ D                WH_var[1,i]:=chr(64+i);
8 z5 S; ?; Z& \# w. r& [( l4 c        next;
9 B# d. T9 c; s7 H& Jend;. d4 h9 V' Q' E0 j. l- j, W/ D* t
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了' x& F/ s3 X$ a/ [+ J7 g2 Q/ j  \
) y& q; h$ T5 E9 _" q, f

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-2-8 12:55 , Processed in 0.015826 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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