设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4055|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
$ N/ Q. b# R% D; S- v语句是这样的
, f& y0 g8 L0 ?is6 U& h! J5 D1 T9 M2 t
        i:integer;, o4 h1 p, |9 e2 ~
        Res:string;& }$ x4 {' S; J6 Q* {: C
        obj:object;. j" }3 Z1 A% o! h  K( y
do7 R* e! _+ }& C! Y6 Z  e& t
        if existsObject("Status") then
# f5 t, p: z4 D                Status.deleteObject;% s/ w4 f+ z$ o" n9 _# R0 _
        end;
$ z+ E3 r# Y2 j5 ^        for i:=1 to 10 loop
. d$ i' H/ v, L% w3 c' i& D' E. ^                Res:=sprint("Store_",i);! |/ I4 L: J' t7 K' Y
                if existsObject(Res) then9 y$ U5 J; \/ _$ N( `9 d
                        Obj:=str_to_obj(Res);' U. T' R4 n9 K7 v& \
                        Obj.deleteObject;
0 s, b9 f6 s$ n0 T' _2 Z% }% R* b9 z& u6 h                end;
8 \3 y* i5 O3 u4 A0 C0 P4 e        next;
% B1 V$ c. ^7 W2 j5 {        --shengcheng Status:zimoxingceng  R2 `' U; f( y# N! P% x
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
4 A) ?. k( N8 m: s6 S8 s        Obj.Label:="warehouse status";+ V- ?- J' [" P4 d: R
        4 ?& I/ Z: C2 d3 u! |: b
        for i:=1 to WH_nums loop
2 {. u# h% Y, a6 E. F                Res:=sprint("Store_",i);
) F8 k% S8 {4 G, I3 y9 _                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);/ K3 Y: P9 ], V
                Obj.Label:=sprint("huojiaceng:",i);
& \: B" A. ]+ r' F                Obj.xDim:=WH_x;, @/ L) Y; d. K, \- Y( [/ A. A7 B5 B
                Obj.yDim:=WH_y;
+ {' b- [4 Q6 W: {$ v3 q                Res:=sprint("StoreData_",i);
5 F( {$ d) u( F# Y" L) Z! h                4 O. j) m& L0 ?8 ~3 U6 `
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
: z9 T3 C; q6 |% q8 q$ ]$ p                Obj.Label:=sprint("huojiaceng:",i);! `2 t. G2 I4 P/ A+ N
                Obj.inheritFormat:=false;9 |; C6 t; U! P- e9 D
                Obj.maxxDim:=WH_x;6 i* i' X5 S* {. F
                Obj.maxyDim:=WH_y;& F, A, g; z: y0 `! h
                Obj.ColumnWidth:=3;7 j% x1 Y# d. T7 K0 A( {' x
        next;
2 _& o$ i6 v8 `5 d" z        # m# g( l* _1 W1 I
        .Delivery.MUs.Forklift.speed:=2;( u7 ]3 h/ S9 U: r* K( K
        WH_var.delete({1,Part_Nums+1}..{*,*});
8 \2 c& a8 f. ?        for i:=1 to Part_Nums loop* {) V9 y- {& Z' r: L) g
                WH_var[1,i]:=chr(64+i);$ s1 e, Q  B" M# v' o
        next;
) m# P! i) @# S! h4 ~end;
' `# O( U! l* |+ R7 c/ Q! p+ f出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了+ Q* `7 `' d- y+ ?0 o
  h* Q( n2 A0 s8 E% N

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-6-11 03:13 , Processed in 0.017396 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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