设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3323|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。+ w4 w  S/ o/ ^% `0 H# U3 F
语句是这样的
! m( L* _- ?7 v9 gis
0 p7 m6 d# f$ F4 ~7 [8 P9 {        i:integer;
# m7 z: B) R8 ^( u2 ?        Res:string;
9 k) S' O/ c7 ]$ A  r$ I8 C# p        obj:object;) F2 t* f7 \' V4 C( y
do0 G) t  X' s) u& q2 e6 f
        if existsObject("Status") then' H, H) A* V* U4 a
                Status.deleteObject;- y& k8 V/ c/ `+ H
        end;
( ]$ c" B' n% G! o8 Y' n        for i:=1 to 10 loop
2 R: F  R: q; Q                Res:=sprint("Store_",i);
( Y; w/ P4 u( n" @! |0 W7 f                if existsObject(Res) then4 ^; Q+ C$ O2 s" j# R4 W
                        Obj:=str_to_obj(Res);
+ j/ i/ ?6 i, L                        Obj.deleteObject;! t' H' w5 f  ?& \
                end;) l* s: {9 r( t, [
        next;2 h3 |6 u0 a, E/ _8 r+ a4 q% K
        --shengcheng Status:zimoxingceng1 W9 ?8 p* l: N' |4 P8 E
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
, w& h, {& X' ~$ P        Obj.Label:="warehouse status";
. l& _2 j, p) }. h6 q7 u2 {" A7 [        ! a6 N% \. c, }' a8 W& A
        for i:=1 to WH_nums loop
1 L# P( l; e3 r, ]) Z! C                Res:=sprint("Store_",i);. m: S' h& X/ S5 ?
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);4 C6 f! _/ ~. t: ~5 [- X, p
                Obj.Label:=sprint("huojiaceng:",i);
1 P, n. E4 i& M+ j                Obj.xDim:=WH_x;9 F, ~, J# z  ^0 ?: V
                Obj.yDim:=WH_y;
1 E/ F* u2 C4 @% z* _                Res:=sprint("StoreData_",i);
9 d: O! g) v% ]* F6 V4 c* q3 x4 {7 I               
4 p4 U4 l+ c9 N( g0 ]. j                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);7 |- w: U$ O8 ^! e  L$ k
                Obj.Label:=sprint("huojiaceng:",i);8 E8 Z7 M/ R5 }# S, }2 e+ l
                Obj.inheritFormat:=false;9 h# ?0 k' o- A9 J) G
                Obj.maxxDim:=WH_x;
- M- n: P) U7 V/ `7 X" A                Obj.maxyDim:=WH_y;
- U! X: f7 b: o* a) C                Obj.ColumnWidth:=3;* F, L4 s: ^5 d- q: K; ?2 B' D
        next;# C4 K- l& X. S$ ]; ?
        4 K2 h2 f: r9 L) f7 v
        .Delivery.MUs.Forklift.speed:=2;
" r5 V3 U, i: Q1 _        WH_var.delete({1,Part_Nums+1}..{*,*});
9 B* K" m5 t4 T        for i:=1 to Part_Nums loop
7 I# C2 H- X- f  f                WH_var[1,i]:=chr(64+i);
) b* U. k% p+ k! V5 A9 h% @! C        next;* ?6 a' q( \4 k% G  j& a, ^
end;
7 Z7 h5 G, n: ~1 B% W* m出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
, G5 c0 R7 r0 C( d1 X+ p0 |! }" W7 f; K

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-2-8 00:21 , Processed in 0.015576 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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