设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4516|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。+ |4 n6 r7 V% B$ b" j
语句是这样的
+ U" J" z* |  f" T) T- Jis
' K4 V4 g9 Z2 [" y5 C/ Z/ y        i:integer;* a  t; ~2 Q, K) R! n8 S
        Res:string;
" b5 Y3 a/ ?& U' H' w        obj:object;
  A9 n4 _, G( Z% t. O' Ldo! l6 q* o( `5 n& D5 F1 \  }
        if existsObject("Status") then. ]7 m+ v, ^4 ^# Z
                Status.deleteObject;
/ K/ D" O0 N  e& Z5 q        end;
2 ^- `% x, J+ V0 u7 {  Z+ a' p        for i:=1 to 10 loop- H) |& }( [& S# H! d
                Res:=sprint("Store_",i);
; R! R+ t! C  E8 y5 F                if existsObject(Res) then
3 W% v7 P; w+ j' e# {                        Obj:=str_to_obj(Res);8 m" p# E) L: H. Z/ |( a
                        Obj.deleteObject;6 J8 @7 K0 w; e' l* s
                end;- ?$ c4 C6 I" B4 i: c! ~
        next;
- D* p, w* P( V# W        --shengcheng Status:zimoxingceng: C3 U; }3 i+ h1 f& {9 s! n7 f) N
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
* T: g* M# N/ e) {) R% b        Obj.Label:="warehouse status";- w) I- M/ {( H5 u& E9 l5 F
       
3 Q& U- j, Q3 U) m8 u        for i:=1 to WH_nums loop
3 E! o4 d( w5 I' j8 i, _) `' B                Res:=sprint("Store_",i);
0 G- _3 h& _; v3 U( p                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
1 M' |1 a! \2 o: n                Obj.Label:=sprint("huojiaceng:",i);" R: L- L0 ~7 c
                Obj.xDim:=WH_x;
4 R2 d/ U( p0 t                Obj.yDim:=WH_y;1 U9 T, Q2 x( J/ I% g
                Res:=sprint("StoreData_",i);
% c: L; `. G$ h: w% C7 V                - l! f7 a. {$ ~0 R- _& w+ `
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);. m. T. k+ R% o# t5 f4 V
                Obj.Label:=sprint("huojiaceng:",i);  s, b" V# R* @; G4 q$ F
                Obj.inheritFormat:=false;
" B1 w( m. z2 m9 H, Y                Obj.maxxDim:=WH_x;
+ o% A' U3 U7 y4 P* J; N3 H                Obj.maxyDim:=WH_y;
! }. C, {. [9 r6 V7 o                Obj.ColumnWidth:=3;1 O1 [5 t+ C3 \
        next;
3 v) C5 r) S, _. h       
1 G0 R# d' ^8 A& W" U        .Delivery.MUs.Forklift.speed:=2;
. c  c7 l+ k  n        WH_var.delete({1,Part_Nums+1}..{*,*});3 ]1 T! H  ~( o# z( V
        for i:=1 to Part_Nums loop
% Q8 J0 ~6 a" y3 o                WH_var[1,i]:=chr(64+i);/ z; x* s4 q. O/ F  t  j) t- p( a
        next;
, t( [& v! z1 cend;
, g  O4 l" h! e, y5 ^出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了, N( E" J+ U  B. F3 {# \$ ?

% a, B0 x! `4 T+ X

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-8-27 04:38 , Processed in 0.018517 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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