设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3433|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
8 @1 `% l$ H+ }% W- L; B" S: x语句是这样的
4 B* b  U1 K. Q6 b! T; t" xis& Y( G5 {& a% i, [
        i:integer;
! D( F3 r5 I; M- d3 a        Res:string;
' ]/ i2 v; ^: }8 ~; m        obj:object;7 Y# G; Y0 u$ g0 T9 g/ B' W
do
. |, _3 O% ^; c! z" J        if existsObject("Status") then
4 i4 Y  w( B- S4 `  |3 u0 i+ g                Status.deleteObject;
8 N' `3 @: F9 l6 l$ [8 s        end;
4 H) `2 F& Z/ B) b; J        for i:=1 to 10 loop5 }6 O/ ]3 {, ^' |5 t8 H6 g* n
                Res:=sprint("Store_",i);
9 e% y  V- t! r' Z% D& c                if existsObject(Res) then% R4 C4 ?" K8 Q# \; o
                        Obj:=str_to_obj(Res);" D/ V) T0 L1 F2 o! t8 D
                        Obj.deleteObject;
7 l. q7 A  ?6 N  V; P                end;1 T9 v, }- s; Z& t0 ^% N9 A  g3 W
        next;3 @3 u* J% T' ^1 J
        --shengcheng Status:zimoxingceng2 w' B* p* I  ?. v
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
+ y% ~2 ~- ^* ~7 l4 I) r" L        Obj.Label:="warehouse status";! x1 ~1 `" b5 \; |2 I9 S1 }1 E; e
       
% y' Z' M4 [' X) F, R9 }        for i:=1 to WH_nums loop# A7 v2 g0 J) C/ S  z
                Res:=sprint("Store_",i);
( P- u6 h1 D" U. ~, l! F                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);
7 _5 Y. R( j4 @( k$ i) s  [  J9 D                Obj.Label:=sprint("huojiaceng:",i);
7 I8 r! S  I- t* j0 a                Obj.xDim:=WH_x;
! U4 |# D! n8 o8 R                Obj.yDim:=WH_y;- S2 o, z; p: }) C) \
                Res:=sprint("StoreData_",i);$ k" R+ v3 T& ?  d9 g/ i
                + H6 @5 m9 {: o& r- l# G- n
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
, p0 |- }% \+ v  z9 h                Obj.Label:=sprint("huojiaceng:",i);
# F& q, x8 j2 j! K/ L4 [6 O2 k2 a                Obj.inheritFormat:=false;
5 e+ d) |7 P; q3 j4 I  w. e                Obj.maxxDim:=WH_x;  `4 \: K: P  L
                Obj.maxyDim:=WH_y;
2 W# d. P% {. q# |6 J" U                Obj.ColumnWidth:=3;
5 k1 o8 f* E- d# `( ~9 e) b% P        next;
6 v2 _( }+ P6 j: w+ C6 l; t       
0 q. N" {/ H" @5 ?$ @! U& Y& N        .Delivery.MUs.Forklift.speed:=2;
1 R# t' C; B2 ~        WH_var.delete({1,Part_Nums+1}..{*,*});0 ^  S; G2 r5 X, [5 H8 M7 ]
        for i:=1 to Part_Nums loop- e2 d/ w6 {3 E; R3 q: Q
                WH_var[1,i]:=chr(64+i);8 i# T( p7 ]( q' L7 o
        next;
1 H4 J: C$ @* P8 G  \4 v8 `* Kend;
, Y/ r) Z3 ]$ s% P2 ?) j- e出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了" a1 F& ^% ^+ u0 W& z

; o7 ?2 ~/ v" T/ [. x

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-2-25 17:04 , Processed in 0.016459 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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