设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4351|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
, g3 g" A' E  G( |语句是这样的
1 X+ s0 r: E! U3 N7 j& fis
, `- j* _4 l$ ~        i:integer;# ^- t, }  Z" z1 ]1 \; D5 x
        Res:string;
1 X; x! S8 I' W$ ^. ~+ l) Q( L6 {" s! o        obj:object;0 K) w- ]/ L$ o+ B4 h. K/ t
do
; O* u0 }+ t- V7 b        if existsObject("Status") then
) W) x5 ?9 B0 v7 o9 ^3 w/ Q                Status.deleteObject;( @0 ?8 v3 e) K0 J. L8 J8 ^
        end;
0 v/ s; T3 g6 E4 U+ z! T3 \, g" V1 D        for i:=1 to 10 loop
6 y7 W- f9 r. g: h- C/ o' N                Res:=sprint("Store_",i);- I9 n) e; g! r  R4 k3 ]' @1 i( H
                if existsObject(Res) then
! |0 d6 Q8 s0 d                        Obj:=str_to_obj(Res);6 C# L9 ]; L! E$ l! f% a
                        Obj.deleteObject;2 X) M% i' ~0 }$ h
                end;
) J& b, {' P5 u        next;
5 y, ~4 \$ f( P( Q% q, h% n2 p4 a        --shengcheng Status:zimoxingceng* _" T6 l: m, p
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");! \9 u$ e& {% g3 n  |/ [) H
        Obj.Label:="warehouse status";
# n+ B* j& @  g& b$ E        5 O! @, Y& `! X) G
        for i:=1 to WH_nums loop
: \( ~! @- [4 c  {1 G. |" Z                Res:=sprint("Store_",i);
/ A9 y' f. W- ]8 |+ H4 Q5 H9 }                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);% y6 K, U3 n+ i0 R0 q" N+ `8 x
                Obj.Label:=sprint("huojiaceng:",i);
7 F9 `2 |1 n. j0 g$ `2 h                Obj.xDim:=WH_x;
- x6 M2 X& j1 S. R                Obj.yDim:=WH_y;
4 D0 i) T0 z; N' E. q, l. P                Res:=sprint("StoreData_",i);
0 r# i% v7 D2 v# v# p                6 R# F$ w) b+ O+ ~: q2 Y) j
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
; E( L1 v7 Z+ n  H                Obj.Label:=sprint("huojiaceng:",i);; u! q' U5 g) I9 J4 I& J4 Q
                Obj.inheritFormat:=false;
9 S$ U1 b" q7 Z% }                Obj.maxxDim:=WH_x;
8 ^3 p8 f$ F4 M8 L                Obj.maxyDim:=WH_y;0 ]5 K. s. B3 y" S/ V  y
                Obj.ColumnWidth:=3;2 M5 P, C5 |% I% ^  c4 w9 w; y
        next;1 s; V3 \& z4 ?( j9 j; ~
        ; E: i4 s9 i% [1 Z# R
        .Delivery.MUs.Forklift.speed:=2;, _. ^/ s1 ?6 K
        WH_var.delete({1,Part_Nums+1}..{*,*});* l1 X: o, s3 K% N
        for i:=1 to Part_Nums loop
8 j0 l# s, s# l* z+ i6 k) i5 V2 B                WH_var[1,i]:=chr(64+i);% [& c  z3 q2 i' E
        next;3 T1 A* c( x# D, {- r$ X& N. _" ?
end;
  E, j3 L/ {+ U* c: I6 N出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
4 V. _; `1 l. z# Z6 x9 e
! y9 S$ L3 D2 ~

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-7-29 11:44 , Processed in 0.013075 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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