设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3174|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
+ f6 ^. t3 g7 F0 G语句是这样的
* }9 p/ O( w$ I% }is
* x2 K! z* y+ p2 v* ?* P        i:integer;
+ D0 l! I9 w$ J7 g3 S8 m- Y& z        Res:string;
' A0 `& l8 z# C! d. i* X' v1 h        obj:object;
+ J9 B, F( ~! L) r) v0 t& a) H7 Y6 Xdo
" m3 g! q; M1 E9 `6 Q5 C+ [: W        if existsObject("Status") then
" p  ], c& N4 _  N                Status.deleteObject;
8 l# J8 P; q) U% e$ q9 U0 w        end;- u- D% ~' N/ J2 Q' M" C
        for i:=1 to 10 loop
/ _4 U9 v+ w9 J8 w                Res:=sprint("Store_",i);/ [9 L( ~: r. G% C
                if existsObject(Res) then
) @& j' Q+ V* \4 b6 a3 R                        Obj:=str_to_obj(Res);
, ~3 X1 N" U7 K  z. P- ]  F2 c- y                        Obj.deleteObject;) L; q+ H  e9 J  \
                end;( g( x5 K' ^0 y
        next;! M. K2 O9 G$ H8 Z# M. G
        --shengcheng Status:zimoxingceng& L' @0 U( V7 ?. g0 ?
        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
  Q3 v4 D0 f% B# s' z2 y        Obj.Label:="warehouse status";
1 ^$ h5 s3 ?7 X( w) b$ _1 [       
; i: v# H# c5 V: w3 V( W        for i:=1 to WH_nums loop
( w9 U% c1 _9 X+ P; F/ Y                Res:=sprint("Store_",i);5 k1 I! _9 R* Z
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);" T7 X  ^, c' s9 K+ y- n; F# @
                Obj.Label:=sprint("huojiaceng:",i);
% m& m1 H: c" w! t, J                Obj.xDim:=WH_x;
6 Q% k+ j4 }- o% ~6 I# F8 t6 ^                Obj.yDim:=WH_y;
7 O5 V2 V2 ~0 A$ J+ X                Res:=sprint("StoreData_",i);
8 i% ]# m2 Q) r, \1 Q4 h  z. R4 e               
+ n0 E" }8 {! m" B                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
8 c8 B0 |3 ?4 d! s- j& P( V2 o                Obj.Label:=sprint("huojiaceng:",i);
7 C% z: V; G( Z6 C+ R; I4 {                Obj.inheritFormat:=false;
3 t# J5 q, M; G  f" p                Obj.maxxDim:=WH_x;7 z; B. d3 K# D- Y& j- o
                Obj.maxyDim:=WH_y;
/ s5 B8 a+ R- g) L- @. r4 L                Obj.ColumnWidth:=3;! F  t7 L! m; l# _; P' E1 H" x, y
        next;
7 e" u* Q6 _: ?- l       
  y% E, }/ b. ^. U        .Delivery.MUs.Forklift.speed:=2;. B5 I( Z* H5 v2 |# R. p* {
        WH_var.delete({1,Part_Nums+1}..{*,*});
- V3 E8 [( k% v3 M1 `" u; _% O$ n        for i:=1 to Part_Nums loop
$ @1 t6 `9 k. l' Y                WH_var[1,i]:=chr(64+i);& `! j+ S$ r4 A% s( g6 p, V1 Z
        next;
3 R# {$ i" b6 Bend;6 `' y4 i& m1 k, ^) ~' r
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了  n6 \% w& F$ E1 a, [* c- _

* x/ }3 n0 q' ~* M0 s' a7 D, l2 R- D

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-1-8 03:11 , Processed in 0.020457 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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