设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4336|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
, [) j. [, ?+ g4 g! O' u* a& E语句是这样的, I0 b2 d' D3 U1 }6 k$ q' `# Y, P
is; Y! x- m: |" ]  p0 K
        i:integer;
( o, X5 L% o$ f        Res:string;" h$ v/ j3 k" E2 z' T
        obj:object;
, j0 x" x7 M4 A+ N. mdo
3 o$ F. I& m0 x: A3 ^0 s        if existsObject("Status") then
# ~2 S: b+ J. P' F3 c$ S                Status.deleteObject;1 d# y# j. R1 l7 J
        end;
. y% O2 U, @. K* O. A        for i:=1 to 10 loop
3 d0 h5 _- b: I) S4 |                Res:=sprint("Store_",i);- V# D, M' J& @0 e* n( H( R# H6 a
                if existsObject(Res) then5 Z) `% C/ H, \7 s1 i- ]( e+ |
                        Obj:=str_to_obj(Res);
+ C: g6 Z+ w# i* a/ P2 v                        Obj.deleteObject;; D9 y( e/ ?" B
                end;3 Q. \* O+ o  d# M2 Q  ^' h
        next;
7 h5 }% `0 z4 T        --shengcheng Status:zimoxingceng
  J9 q3 O5 Y. J+ ~        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");8 w! W2 Q# [0 H# c$ G. X5 q+ }
        Obj.Label:="warehouse status";- J& h. ^1 e) i& v& j3 X0 z
        ' ?6 Y3 P% t' k! _
        for i:=1 to WH_nums loop1 c7 ~. n9 U% C: N9 n2 h
                Res:=sprint("Store_",i);# J/ @% F( ]7 J8 I
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);. O: f* v0 h+ k+ S4 q
                Obj.Label:=sprint("huojiaceng:",i);# c- Y; f' h& P1 C) J
                Obj.xDim:=WH_x;
1 y1 G) R. W3 U- K4 r/ V- Z                Obj.yDim:=WH_y;! ?- y& R- j8 {; H- @* j* p. _
                Res:=sprint("StoreData_",i);
; q% f9 `& Z3 b; g: n: n: X% X$ t" d               
0 Q8 M( s6 z: d: @) z                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);2 w+ J( e& m- q  F
                Obj.Label:=sprint("huojiaceng:",i);4 e$ d, R! M) [, T
                Obj.inheritFormat:=false;
/ t' z0 }4 |, ?' v; f5 Q* J                Obj.maxxDim:=WH_x;# \* a; _* z* v6 R! [6 M
                Obj.maxyDim:=WH_y;3 k/ Z8 _. S3 `, T5 ?( d
                Obj.ColumnWidth:=3;
5 G& ?2 H' ?9 Z, W* j; L5 N        next;4 v( Q$ f# a3 m0 U/ D
       
* o9 B( U7 n% E, T$ R        .Delivery.MUs.Forklift.speed:=2;* H' J/ H8 o! |6 b3 l
        WH_var.delete({1,Part_Nums+1}..{*,*});6 l$ M2 ?1 b3 ^6 ~/ k
        for i:=1 to Part_Nums loop; R9 q$ p6 O* x/ V! a% T7 J
                WH_var[1,i]:=chr(64+i);0 L; D' _7 s8 f7 i5 _9 L/ i/ m
        next;
" S7 b0 o4 U' G' e8 p9 fend;, ~2 G- P- c% \+ Q0 k: ]
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
7 s  V3 \9 f& A. x# R/ E
: a% l9 w3 u5 e1 ~

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-7-27 10:53 , Processed in 0.022448 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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