设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4595|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
$ ^% m% x* w8 f9 ]  [9 W9 l" F  k语句是这样的" G# X6 |8 B( [' G
is$ O9 U- W6 p2 M- c3 ~3 I& Q
        i:integer;
( ]0 O1 T2 o% W; H  l        Res:string;6 E' Q+ R  F' y; h9 P
        obj:object;* C" A: G+ B5 U7 V, I
do
- c6 Z: c$ B# z4 g  e; T6 O+ ~$ o$ d        if existsObject("Status") then
# k) b/ K5 p: [" X( x8 `: R3 @1 v( A' O                Status.deleteObject;% F+ q" U" S. n
        end;3 T5 `4 H( s$ Z8 t* \0 E/ J
        for i:=1 to 10 loop7 k. \% G: E* X# N! f
                Res:=sprint("Store_",i);
* o4 L9 v5 c- G1 C                if existsObject(Res) then
8 q: v4 h7 ~( M' J1 U9 ~                        Obj:=str_to_obj(Res);
5 V- w& S, f* H                        Obj.deleteObject;9 {6 c1 K5 t5 w6 {( ~7 k$ @/ |
                end;4 ]4 f* F4 e9 T" o* F. B- a
        next;
; r  m) K- S* B        --shengcheng Status:zimoxingceng
1 B; C' W4 p$ G* Q: E3 X        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");- b1 Y# }8 A3 Q2 J( w7 I2 [) X' c+ }
        Obj.Label:="warehouse status";
; b. w. s# w. I2 k% P) d( A        ( ~$ }# O& I1 a$ |8 j
        for i:=1 to WH_nums loop
0 f# n8 i8 \! e* c& a                Res:=sprint("Store_",i);
* B# m& R& m1 x8 c, W                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);) U6 V5 c" ^5 X# z9 |( `2 E; L
                Obj.Label:=sprint("huojiaceng:",i);
3 g- X1 t* I" Z  j                Obj.xDim:=WH_x;
- v) e7 A& _) }) O4 Y0 z9 k                Obj.yDim:=WH_y;( H. r# }8 J- ^0 B9 P' L
                Res:=sprint("StoreData_",i);! V8 X0 V+ I1 n6 C9 U7 m6 S3 h+ I* o
               
( z- o# ?+ P2 f" c) O+ l+ t4 H. r                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
1 w* {( E# Z3 J; Z                Obj.Label:=sprint("huojiaceng:",i);
2 @2 n5 G6 s" H% b6 o; h. v( U                Obj.inheritFormat:=false;6 }$ ~+ Z- H: \# @( ^/ M
                Obj.maxxDim:=WH_x;
# R7 ~: ^% R$ A2 y4 V! k; R) V9 S                Obj.maxyDim:=WH_y;; Q$ |- Z" a; b# N! O$ W
                Obj.ColumnWidth:=3;4 t) }- f5 ?# Z/ J! V. L1 f
        next;  T. \( t4 A' e0 a: |
        , l1 E# C% y! i; `" ?7 c
        .Delivery.MUs.Forklift.speed:=2;
( Q% D  H! H% j6 t% T        WH_var.delete({1,Part_Nums+1}..{*,*});
, Z# B  K% Z4 a0 t' L' ]        for i:=1 to Part_Nums loop
$ R. a/ [+ f0 M( M                WH_var[1,i]:=chr(64+i);" M. p/ X- f3 O" j7 }5 L7 D
        next;
. F- G0 M8 U4 ~# B  Qend;" o: d3 A8 E: i& y! I7 k
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
2 K" v  V: J  N5 p" o, \; V& q9 v$ D& `% H" |+ u

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-9-7 15:27 , Processed in 0.019277 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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