设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2865|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。0 q2 i* k8 j# Z" A3 c* g5 }
语句是这样的* a3 c4 R, H, u. l  o1 K: a! b9 h9 a
is- r2 h6 I2 Q3 t' X" ~
        i:integer;
5 b" G) Q4 `) z1 }9 |. }% {( G        Res:string;
! T/ A  s- W. I/ ^* Z8 P        obj:object;! [1 p$ \8 G1 _# @  l3 P2 X
do' `. g6 b  a$ N7 O
        if existsObject("Status") then% I- V/ Z6 @4 g% l7 m
                Status.deleteObject;
/ R/ P* f! m" |! V. u6 n% _3 y        end;4 N( `: K) L) a# d
        for i:=1 to 10 loop/ p) x) J$ s" p9 T1 [$ E& l
                Res:=sprint("Store_",i);
  |* y2 `) P" p2 D                if existsObject(Res) then
2 X9 t! H2 O" `2 }/ q                        Obj:=str_to_obj(Res);
, _% n' `6 w8 `3 v- K                        Obj.deleteObject;% r" @3 a, q. x& W$ M0 t  S- W5 I
                end;! N. w* {3 f0 R/ G
        next;0 j+ ~' ^: ]& v: v, o  [8 }; m
        --shengcheng Status:zimoxingceng
- M0 y/ I* m  T7 x' F" Q/ Q) i& @        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");' g5 y$ [7 T& k% l; d! O
        Obj.Label:="warehouse status";
# m; o; C/ \6 \; B8 v7 B2 n       
' q3 E( g0 g/ o- @+ z1 x# C2 |        for i:=1 to WH_nums loop% f5 E" Z+ q7 H. Z! @) i1 D
                Res:=sprint("Store_",i);% [" f$ ?( }2 t/ J' t3 W5 |
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
* z$ p2 @* G, [: g: H! k, i                Obj.Label:=sprint("huojiaceng:",i);
1 U  y. F5 K5 L1 T5 T9 K4 Q                Obj.xDim:=WH_x;
* Z% X) T5 h% {( M" p                Obj.yDim:=WH_y;
3 c5 Y" P' k% s                Res:=sprint("StoreData_",i);
$ J. G- \6 q; x) V1 K0 u                " B& g: v& p2 K! Z
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
" c. K% K8 d* x6 s" r1 M% y                Obj.Label:=sprint("huojiaceng:",i);
. J- o1 ]6 D* C                Obj.inheritFormat:=false;# j0 ~* n0 j: W
                Obj.maxxDim:=WH_x;
9 w" s5 P9 x. F* r' ?# h                Obj.maxyDim:=WH_y;
$ X" N( y1 V5 j! c                Obj.ColumnWidth:=3;; O, r4 @$ r* P. B& D
        next;, u" n5 g5 U% q% K1 d& D
       
. s& V  G' q) O# J        .Delivery.MUs.Forklift.speed:=2;
( o  t) C8 q' A) u        WH_var.delete({1,Part_Nums+1}..{*,*});
6 X( [: S, P! Z8 C6 y7 Z        for i:=1 to Part_Nums loop
  v+ h2 u0 N1 O6 r! e& z                WH_var[1,i]:=chr(64+i);
# r1 h5 J7 C" w' o- s2 ~& ]        next;& u6 n2 c- n  [5 n
end;' ^% V0 E' h) w4 ^& K) Y
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了7 e5 P- d8 K$ E+ l1 \

8 V) q/ X/ M; c

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2025-11-5 11:31 , Processed in 0.030840 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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