设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4118|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。7 ~  I+ m8 d' i; m$ m/ E
语句是这样的- c" A6 U  A% C# ^9 ~
is
: M) O8 p$ x( b* G        i:integer;& j7 j0 F- W( V- h% f/ P+ [
        Res:string;2 }( U" }- a( Q6 b2 w
        obj:object;% V' m* V! p2 r6 E( z
do6 j) i0 D: a! p9 \% l
        if existsObject("Status") then$ Y7 j+ d- I& R& F6 L
                Status.deleteObject;
- H0 j9 N" [5 ^' a' q        end;) w" K" _8 o& g2 @6 O7 k
        for i:=1 to 10 loop
6 L, A$ i- s$ ~                Res:=sprint("Store_",i);
' y0 c0 W3 ^4 h) }  l                if existsObject(Res) then
* C5 o8 [- @3 q                        Obj:=str_to_obj(Res);+ Y" @/ L% G6 p6 D6 F
                        Obj.deleteObject;# ?* @0 o0 n7 G$ h7 [" w5 [
                end;
- M1 _( w/ g6 a1 h2 G  s/ U0 @5 h  [) ]        next;( p3 R- k$ P' @' l8 K, i
        --shengcheng Status:zimoxingceng* X" e* z. `# P* ?8 _6 Q( H
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
1 p5 `/ n& h$ c7 N  ]        Obj.Label:="warehouse status";6 S  F* L/ a$ a& a1 w- u1 t1 ?( Q
       
7 t" m4 y' J0 y% b" C) h        for i:=1 to WH_nums loop
) K1 M, x2 g$ y6 U/ K& l' x" l$ d5 J                Res:=sprint("Store_",i);
1 a+ Q3 j5 ?! g; h9 e% G" C                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
' ^: v2 {  k* a& K                Obj.Label:=sprint("huojiaceng:",i);
0 t4 u) Y3 u: q8 q8 j                Obj.xDim:=WH_x;+ X6 b" T' H: v2 {) {
                Obj.yDim:=WH_y;! E8 j4 U0 k$ B
                Res:=sprint("StoreData_",i);
! I" e2 i- s4 \# y, Y' L               
# J% E$ i8 }+ |9 p9 I. \                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
( o) J. m+ ^- R, ]2 C$ l" B9 k8 R                Obj.Label:=sprint("huojiaceng:",i);
8 g) e8 n7 s4 h1 m  ~  M                Obj.inheritFormat:=false;7 h% j! ~0 X' ?* W1 S& F$ P* _
                Obj.maxxDim:=WH_x;
' d4 y/ t' N8 Z% K, i9 l                Obj.maxyDim:=WH_y;
; a: t* G$ l1 S8 `/ E& ~                Obj.ColumnWidth:=3;
$ h  U5 D" s1 y  ~8 l        next;
5 S+ V0 O  L4 _        ! r- O1 i: r1 b) C2 r
        .Delivery.MUs.Forklift.speed:=2;$ a- _( q1 }& h/ J$ b4 r  w
        WH_var.delete({1,Part_Nums+1}..{*,*});
3 c1 C% w; t( h3 o4 P        for i:=1 to Part_Nums loop
6 T# F1 n- A0 f2 ^& q# n- M# J: [3 E                WH_var[1,i]:=chr(64+i);
' @$ ]) ]2 X" L2 q, b( K        next;$ i" T4 k5 O0 G, a+ H; b
end;* |5 i0 [& f& ^7 P" {+ \
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
2 g2 c+ I5 ]7 J) e5 G- v0 S  `4 {$ A* `" U/ L. O

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-6-23 08:01 , Processed in 0.014978 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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