设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4451|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。; t# O7 G2 p! j' {8 u; P
语句是这样的2 v5 @! V$ x  u. f- j3 O
is" c& j; E% C9 ]
        i:integer;
8 A7 Y1 N% J# ]6 P5 P( \+ h        Res:string;: R% Q6 p) e1 N) u  N7 \
        obj:object;
+ [# I& q; C7 n4 p$ X, L( W% d: Gdo7 w9 h* N4 ?, J& c* z! Y
        if existsObject("Status") then3 S& f/ q0 C# _, \- u+ B
                Status.deleteObject;
: ?8 d% b2 Z$ |$ [  g        end;1 ^2 Y6 d) G- a2 X
        for i:=1 to 10 loop
  b) k, \) _2 n3 E$ ^                Res:=sprint("Store_",i);
, g" d9 `& I, X" U                if existsObject(Res) then. s/ p& A7 i2 C' [8 b# i, I
                        Obj:=str_to_obj(Res);
8 p  d  S8 }3 ?+ h: O                        Obj.deleteObject;. B# r+ v" r1 s" t7 F7 j7 \
                end;- O: }$ n" T7 z, U+ c- m
        next;9 a5 V6 e( W2 p6 U
        --shengcheng Status:zimoxingceng3 [8 g" v  z* i: w9 Q: A1 d
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
$ L3 P+ n; ~7 c/ m        Obj.Label:="warehouse status";* Y3 B$ T! _. a
        ! c7 E* g* [* Y0 R; i
        for i:=1 to WH_nums loop
3 \  n, ~; A& w5 _  T% v. y4 U' @5 P                Res:=sprint("Store_",i);! D# ]( Q* `( r! D) b# v
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);3 S% J3 E! G) Z7 J9 s
                Obj.Label:=sprint("huojiaceng:",i);8 W: y7 S$ ?9 W/ K# @
                Obj.xDim:=WH_x;
5 s5 {: L  u" Q% c                Obj.yDim:=WH_y;
7 d: }! V  }3 g5 I                Res:=sprint("StoreData_",i);
* u7 Z2 v0 @8 L2 D                ) U$ W  Z- S- H% V4 S
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
( z( C8 A# t2 t9 Z                Obj.Label:=sprint("huojiaceng:",i);1 t* n' X' J) ?
                Obj.inheritFormat:=false;
: z2 Y# _8 ^  S( y$ v' A. w                Obj.maxxDim:=WH_x;
& B! l/ [& q( f/ F                Obj.maxyDim:=WH_y;
  [' _! ]+ p! Q% K                Obj.ColumnWidth:=3;
- u9 A3 ~! I. x; [, X' ]        next;& K) p/ \! I# W
        " U6 J5 [/ c4 k% h. b( t
        .Delivery.MUs.Forklift.speed:=2;; ^! T. p. k) b* ~
        WH_var.delete({1,Part_Nums+1}..{*,*});3 h, f1 j, {4 S
        for i:=1 to Part_Nums loop
5 b. @- `% a; l3 z" }( \4 ?                WH_var[1,i]:=chr(64+i);
5 ?% x/ T" e7 }: O3 D; K2 r/ a" S        next;2 u7 m7 Q" c3 O1 Z; p4 l
end;9 z7 m, G% `2 r- l* R+ D# z" \
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了0 f* N8 L" N7 O2 \, |; q7 n
$ ^: X, h; p) d+ p+ z8 K3 v

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-8-12 22:26 , Processed in 0.019256 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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