设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3798|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
/ c: \7 g# h! A, l8 F语句是这样的9 S6 D/ U, ?3 H3 G
is
3 q8 K5 S/ o1 u. u/ N' |( a# _        i:integer;' N- O  R8 o( F
        Res:string;2 w. @8 d, F. r' C! F
        obj:object;
& A6 v  T. h0 M4 M7 ]do8 B( p" z( D# A( e1 H
        if existsObject("Status") then* R& q( g6 w$ Y: O$ u. b! e  X6 ~) n
                Status.deleteObject;' m7 W8 O- ?4 _$ u5 p6 C9 q
        end;
; v6 X' q$ Q0 k: F' e) K        for i:=1 to 10 loop" D0 ^9 {3 `4 {! K) r
                Res:=sprint("Store_",i);! L  F' S$ Y) D( M4 Q
                if existsObject(Res) then8 Z& H& l4 Q* o- y) A" K
                        Obj:=str_to_obj(Res);/ G8 a5 O% e6 |% M' m$ X
                        Obj.deleteObject;
) w5 h) k) m: P5 ^% A                end;; j7 Q- B* Z' W+ \: ~5 E/ _7 W
        next;
% f( f. `9 y+ a: U, }3 q: |2 M* w        --shengcheng Status:zimoxingceng
- b+ ~+ w# u1 b  ~( @        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");) s' d$ b* s0 }' Q
        Obj.Label:="warehouse status";/ n9 U9 N- [) F" R9 a4 d, {
        & S& ^$ t  V+ n4 Z  `! D
        for i:=1 to WH_nums loop
! H4 o' V8 m+ ~6 ^                Res:=sprint("Store_",i);
# e  T2 `" m3 F& u  j  R                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
9 l( x, T+ o) |7 U3 t4 t2 i7 p$ \$ D6 v                Obj.Label:=sprint("huojiaceng:",i);9 D5 H% M: w$ z
                Obj.xDim:=WH_x;( o3 D7 m, k. s9 p+ `; P* ~
                Obj.yDim:=WH_y;$ o- l( U/ ^0 G( B% ^+ Y# X
                Res:=sprint("StoreData_",i);
0 v$ h9 k; h# M: H2 W                3 P- }4 r  Z( a& G6 x, {& W" E
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);- Y  C, E$ G  v$ I
                Obj.Label:=sprint("huojiaceng:",i);3 P3 ~$ ]% E0 L+ q4 w3 J7 m7 t
                Obj.inheritFormat:=false;: Z& Q. G/ R4 v: C/ p1 o
                Obj.maxxDim:=WH_x;
8 A+ v  D- X# q                Obj.maxyDim:=WH_y;
! V# W: O3 f# ^# `; L                Obj.ColumnWidth:=3;3 y0 U) I& {! _" L
        next;
8 d3 b3 w( M0 O3 j2 D4 B        ! r* B8 P, i# K, c. w8 @
        .Delivery.MUs.Forklift.speed:=2;6 {! r( ]. {# h$ ~3 N9 |  q8 p
        WH_var.delete({1,Part_Nums+1}..{*,*});
! ?" r! u- ?. L5 W' Q        for i:=1 to Part_Nums loop
; Y& J: ]4 i. A                WH_var[1,i]:=chr(64+i);7 ?" |7 |* W; F/ t5 O
        next;; V, g2 @+ I9 q6 P" }4 }
end;* |& ?' S' g% U% W
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了' \8 t2 b# d; j/ s
. W% g7 W# l8 j% W: |' Y. w: Y

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-4-28 03:03 , Processed in 0.015850 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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