设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4282|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
: V5 r( U. ^( B9 [语句是这样的
* C* h5 R7 n( v/ g( Y, |% P" T: Ris
+ s: t: u$ w* f4 a$ P        i:integer;
2 l0 }, t1 R9 Z9 n0 L8 `        Res:string;
5 ]! ~( I1 r2 ]8 E/ r        obj:object;
5 G+ q+ c9 c1 V  B4 X0 {do: s' I' B% B# |( ?& @  h* U' E
        if existsObject("Status") then7 s. h- b3 r4 M0 j
                Status.deleteObject;& G) w& l! S) B( }0 H, T2 Q$ `: U! E6 \
        end;
! Q& O5 X5 Y; S+ g- x        for i:=1 to 10 loop# T+ P) Z  ?2 S
                Res:=sprint("Store_",i);. Q6 C. [2 |( _
                if existsObject(Res) then
6 \2 a9 Y  h/ o$ k                        Obj:=str_to_obj(Res);
) Y7 P4 p: ^! M; J! b8 x+ w                        Obj.deleteObject;
5 O- U# |% B0 ^: n6 n1 }* y7 ~8 v& g                end;
7 `* E7 p. s) [        next;% Z" w& w2 a  ?" d) l8 J: o: [; E
        --shengcheng Status:zimoxingceng
* a" L, `+ R8 L7 g: M; P        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");1 G* m/ _% m- A
        Obj.Label:="warehouse status";) l+ n) |! v. a: J) f+ Z7 o4 J+ U+ C- ]
       
% L# w6 {6 M1 z        for i:=1 to WH_nums loop, s) Y7 F% r3 |( C* {
                Res:=sprint("Store_",i);
+ p! Y& h6 m5 p                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
' c2 Z$ m3 x$ e/ d5 _  f5 t                Obj.Label:=sprint("huojiaceng:",i);
! q# ^% L( ^( X6 z. f& l4 N                Obj.xDim:=WH_x;! V3 u0 w0 X# D
                Obj.yDim:=WH_y;/ i# S& m/ @" y, q- l. p
                Res:=sprint("StoreData_",i);
( ]; S& x4 B: u4 M, \                - T% |5 N' t1 [
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);. x. G/ ^$ M" E2 r8 T3 W9 d2 M' f3 X9 A
                Obj.Label:=sprint("huojiaceng:",i);  T- l4 Z6 {/ q* N) H& [$ @
                Obj.inheritFormat:=false;, G" F. o  |2 x) n: R* E& N3 o: i' }
                Obj.maxxDim:=WH_x;: Y4 _" W7 m8 ~, O5 C  `% o
                Obj.maxyDim:=WH_y;
' c/ j5 p  H4 W& n) E& U                Obj.ColumnWidth:=3;4 I% g/ N: F& }2 W  w
        next;5 H. N- U: |; N. J6 y
       
. [. Y& G4 L6 }; U+ @$ D$ D        .Delivery.MUs.Forklift.speed:=2;
4 c' J3 y+ V3 P: ^% T7 k        WH_var.delete({1,Part_Nums+1}..{*,*});. l  H0 M, }4 Q9 c/ i( A  P' p
        for i:=1 to Part_Nums loop
* P" m+ X/ {! a% T/ c8 {5 C" r                WH_var[1,i]:=chr(64+i);
2 e; D  |0 g4 ^# A6 q        next;
2 Z9 u9 }3 i8 F- s. {end;" v! u  c6 P: e+ T& W' s$ L! ?
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了6 W# O% |) v* N

" v+ C, Z3 k7 s) I2 l

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-7-19 11:39 , Processed in 0.015438 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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