设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4243|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
* J+ K' {  o1 T语句是这样的
6 b# j+ M1 V% z* r+ _  Xis
& I' i8 m7 D) c        i:integer;
" v2 q/ Q* w# H) f- Z+ ?# Y        Res:string;
4 p2 j1 V5 Z  m4 \        obj:object;) }& O9 O8 X( m  r! R; c
do
- o) ]" v" H5 X7 h        if existsObject("Status") then
% O; Q; l6 n' f4 [- E7 @% d                Status.deleteObject;; `& X$ G' ?5 v8 m4 w
        end;0 N9 Q% O: e# s7 |
        for i:=1 to 10 loop
! u- ~. P' e% s1 D                Res:=sprint("Store_",i);& Q2 C3 T" m, e5 t( k# n$ a6 X
                if existsObject(Res) then# W+ k2 T# F% k  c: N$ z' k3 h& U1 U
                        Obj:=str_to_obj(Res);! f& O" G( r# o
                        Obj.deleteObject;) i6 H% U& S$ @* b6 `
                end;2 H9 a- O4 g9 o0 X) `
        next;* T, C! n6 n  }  `1 C3 x' G
        --shengcheng Status:zimoxingceng
8 e# K" z, k* Y7 `4 }        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
  P' m1 g- Z- ?1 E- ~        Obj.Label:="warehouse status";9 A! Y' j0 r3 f+ O, U( e
       
, g3 j5 P0 x% D9 L1 o& \5 X& k        for i:=1 to WH_nums loop
  I6 b/ [) I9 w+ l: C- d, K# U                Res:=sprint("Store_",i);! \3 F9 ]$ u' P  Y# \, p  V
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
  k' g4 p3 S8 e. d/ L# x8 E                Obj.Label:=sprint("huojiaceng:",i);
$ y2 D' s; {* g2 l5 f* b                Obj.xDim:=WH_x;( s( K$ Q' P/ [6 k6 c% W% D
                Obj.yDim:=WH_y;
; u7 ?3 c3 j9 z* H                Res:=sprint("StoreData_",i);
/ R: j! J" l+ A' ?  f+ N; ]5 k1 y) T                7 c# ^" K" t" ?# V2 [' A0 \2 y
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);, h& G/ H* Y: L% ~% {! I- w* k! i
                Obj.Label:=sprint("huojiaceng:",i);( F! z/ |/ ]' C7 Q- u) v9 a. i
                Obj.inheritFormat:=false;1 l8 F( d6 K; l5 a3 u6 X* X  h! k
                Obj.maxxDim:=WH_x;
; u2 x5 h. l" ?6 M                Obj.maxyDim:=WH_y;, [. y6 L. P& H4 I+ F) E$ L  j5 z
                Obj.ColumnWidth:=3;5 F1 d0 G2 d; r/ Z' g
        next;
4 t1 Y' ?$ {0 ]0 s        / H$ J- `2 H( q# w
        .Delivery.MUs.Forklift.speed:=2;
" n  Q$ U/ x% W# f: b) q        WH_var.delete({1,Part_Nums+1}..{*,*});
6 z5 e% ?, p- C- d/ G5 |* W5 H8 H        for i:=1 to Part_Nums loop* T! z. W4 x) y$ f) l
                WH_var[1,i]:=chr(64+i);
) J& E5 H8 N  H" G$ c        next;
+ n4 f2 M* u' l% r( R; yend;1 p% G7 x/ t+ `+ z( h6 n
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
4 }$ B" E* I' F- r) \' ]. Y3 y$ h7 ]# W/ L0 C2 N' X2 [

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-7-13 04:02 , Processed in 0.015142 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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