设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3597|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。  h" b) O6 W6 p
语句是这样的; q- [0 Y3 l3 M
is$ V, D+ m9 u6 I: n- |* M: r7 ]6 ?
        i:integer;8 [3 q9 m/ [# c
        Res:string;  B- g# W6 u* b
        obj:object;$ |" {$ Z; ^3 k0 ]* P
do
0 {3 d; e3 E3 {/ b" n) }! r        if existsObject("Status") then
+ ^: [2 @: R5 m2 n                Status.deleteObject;' v  v$ J9 z  |6 f
        end;. o: o; \! l9 ?9 \* L
        for i:=1 to 10 loop
& ~* g, }" P4 f- r, I                Res:=sprint("Store_",i);& k6 l: ~5 f* z% {9 c% I9 V6 m
                if existsObject(Res) then0 Z3 A! J% V# c& t4 v' Y+ x
                        Obj:=str_to_obj(Res);
  W- a# [6 U$ E                        Obj.deleteObject;$ E, b  P! V9 |% Q7 x8 P) N  U
                end;6 f4 D# c6 c9 z. Q  W& v; Z
        next;
* z0 P1 h& h; W$ g% D" Z5 |0 [        --shengcheng Status:zimoxingceng5 t# E; q9 @' `, k5 {. @# N. q
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
* [9 B( F# w$ i3 @0 H' F        Obj.Label:="warehouse status";4 x- ?, @5 {5 M
        % H# Z- R) R1 O8 W, f1 H' h
        for i:=1 to WH_nums loop
4 P% z& w& J3 A' {* x& b                Res:=sprint("Store_",i);
* G4 U9 F2 r7 ~0 e/ i                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
% t8 y8 {7 V. ~& c3 `7 y                Obj.Label:=sprint("huojiaceng:",i);* L  l5 W( ]: P9 l/ c% j# O9 }
                Obj.xDim:=WH_x;
' O! L1 H2 [) m& @0 o                Obj.yDim:=WH_y;
* ]: i6 P& [  g  Y                Res:=sprint("StoreData_",i);
3 X' V  `; l8 V4 M, h. P               
- D; ~: O4 A9 R/ O                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);. T, s7 D% G; H- I
                Obj.Label:=sprint("huojiaceng:",i);% P/ J" v& h# a9 _7 K1 _2 a
                Obj.inheritFormat:=false;
3 @: X  _9 @9 w6 i! a                Obj.maxxDim:=WH_x;' J. {3 C+ C, V, [' P9 v4 \
                Obj.maxyDim:=WH_y;
1 N' [2 {1 i" E2 I                Obj.ColumnWidth:=3;& X! V$ v) S8 `' b
        next;
% Y& L- U% F% i" N' @6 I       
$ M/ H# ]% j, [* T) l        .Delivery.MUs.Forklift.speed:=2;
! R9 m, b' w2 A9 {        WH_var.delete({1,Part_Nums+1}..{*,*});
  ^' F3 C9 d. t2 D        for i:=1 to Part_Nums loop
" X2 l( H" l# x6 J5 X6 L                WH_var[1,i]:=chr(64+i);
" a6 s5 W) o% d4 o        next;  t7 l! O. q3 {7 n: [; t. p4 ?
end;. t: c4 ?1 x) V) q. ~% a( |
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了9 J, H5 g0 [/ y* `% a
; o# U1 v; p4 ~

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-3-28 06:03 , Processed in 0.019617 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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