设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4313|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。0 }  a5 R* o9 d6 R
语句是这样的4 @. ^0 ?& P: A$ Q$ d2 X$ t/ I% k1 q
is
4 Z3 t, ~- A& o7 |0 U        i:integer;
+ z7 ?8 h7 F# X; X        Res:string;
1 m; T/ g) @  t" N/ q        obj:object;6 e% J- Z* E& E- x; Q
do; s- q% N7 |" h' N' F
        if existsObject("Status") then+ D) g3 g3 i: U& N5 p
                Status.deleteObject;
; n5 a9 L. \% t) {        end;
4 }$ m! a$ c3 \6 _: |0 }        for i:=1 to 10 loop5 p# c7 a; O$ K1 ^
                Res:=sprint("Store_",i);2 N# Z* V4 P4 l( R1 b2 J
                if existsObject(Res) then
9 x1 o/ T- [9 x! Y( Y6 F$ K                        Obj:=str_to_obj(Res);) g/ L" o: ], W5 K' g
                        Obj.deleteObject;3 J2 G  v" _0 M7 v4 H) w
                end;( c; `! \( a, a2 l
        next;2 Y5 x/ W) E1 E) I# [
        --shengcheng Status:zimoxingceng
, y, l" |7 u# n5 {; ]/ ~; y# L        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");+ _( X/ B* @0 x9 p
        Obj.Label:="warehouse status";
. ?; a" G) s" c9 z        + g2 r+ H; M0 n/ y. w
        for i:=1 to WH_nums loop
' ?( ^7 V- l; }                Res:=sprint("Store_",i);3 ?' t% `& U% p& |, \9 D
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
+ s* ]- g+ _4 e9 O" s* E                Obj.Label:=sprint("huojiaceng:",i);
& k" i. K5 F0 I6 `                Obj.xDim:=WH_x;% ]; ^$ B5 Q) [) |4 {8 o/ \
                Obj.yDim:=WH_y;
( n8 P1 f" `' Z1 n  u: F                Res:=sprint("StoreData_",i);2 Y7 W; g* y: O: b
                4 Q$ T  _# \6 C/ {
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);6 K# y6 w. z3 n7 v' P! J
                Obj.Label:=sprint("huojiaceng:",i);
6 s3 S% }7 L& ?: ?                Obj.inheritFormat:=false;
( P; ^$ Z( Z! W$ c1 o: Y/ l; Y                Obj.maxxDim:=WH_x;5 E3 g- L; [8 U. s) |+ U2 m
                Obj.maxyDim:=WH_y;
/ J3 ^0 _3 y& @: `0 k. q                Obj.ColumnWidth:=3;; g6 r5 U  g2 r1 u0 u, {6 Z5 R  {
        next;% d0 @# s1 o. R) ~
        6 |  l- W4 A2 `
        .Delivery.MUs.Forklift.speed:=2;/ ]$ B# t% d! n3 w
        WH_var.delete({1,Part_Nums+1}..{*,*});
. Z% r9 j: n+ L) Q5 Q* }" K        for i:=1 to Part_Nums loop6 G6 D+ e+ m* g$ k, F' r/ V
                WH_var[1,i]:=chr(64+i);3 `1 M* a! S! F
        next;
$ b3 K! Y- n+ Y5 {" d' O0 I& e0 `end;( d; M8 P  Z$ R  J+ r4 T
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
6 \) X, P' k0 ?( c8 x: a3 `! J* H0 d+ L

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-7-24 13:33 , Processed in 0.016157 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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