设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4049|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
2 @( j( L% f& l* ?: R8 X7 l% l" u3 j语句是这样的. g) F. N: @. ]  {# c
is' M+ i  m) J7 w' G" `; [
        i:integer;5 [( o. \# s5 j3 S, Z
        Res:string;! v* A8 Q2 x7 |+ D4 `; \
        obj:object;# E5 c6 W8 M# P( D8 a! K* o& I# ^% ?
do
, m5 {8 \: h! a5 `1 P2 B: f        if existsObject("Status") then
, G9 |, ?2 N, S3 W5 @                Status.deleteObject;3 ?. c8 R9 T6 }3 u) `+ }- X
        end;
) _8 a6 o4 d9 q( n/ f9 X        for i:=1 to 10 loop) p: H! ^3 b7 M( {: L
                Res:=sprint("Store_",i);4 C9 u/ p; m( [, O
                if existsObject(Res) then4 r! U& J4 q- K4 ?4 n+ d
                        Obj:=str_to_obj(Res);* v$ Q4 A- W; d0 l
                        Obj.deleteObject;: c) {& }* Y" d, Y1 e/ E
                end;
3 ?2 \3 z* T# M+ r! `# E        next;5 F& c/ b# n4 _
        --shengcheng Status:zimoxingceng
8 @- M6 }& }" @) F        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
7 L" @' l  s* @" H0 F2 i) l$ C+ y        Obj.Label:="warehouse status";* g4 K" W" g% X, D$ i
        $ B: y$ P' P/ [+ K
        for i:=1 to WH_nums loop: L  n: }/ B, [1 l7 Y9 M! |
                Res:=sprint("Store_",i);! w& t4 D7 H: m' T5 F
                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);4 g! T3 H; |6 x- y
                Obj.Label:=sprint("huojiaceng:",i);7 ~! T# Q: S' K* x/ H
                Obj.xDim:=WH_x;
1 C7 i7 n8 v+ z- V9 @                Obj.yDim:=WH_y;8 W' G0 q# j7 |
                Res:=sprint("StoreData_",i);% j/ \/ g6 {! w8 e# E
                  l" v  `" T- `( u' `
                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);6 J5 s  d/ U4 {+ _# P. G
                Obj.Label:=sprint("huojiaceng:",i);
3 A1 v9 R+ b9 a% n1 _                Obj.inheritFormat:=false;" u1 G. z+ j# m$ A; e0 y
                Obj.maxxDim:=WH_x;* e7 Q0 ]( z4 r4 F( h
                Obj.maxyDim:=WH_y;
0 m/ l, D0 S  P! q                Obj.ColumnWidth:=3;& T* Q! n! b3 c  y
        next;
# @; i+ O: d8 J8 v* I0 [        5 b* E. i* ]) E! n
        .Delivery.MUs.Forklift.speed:=2;
% Y5 Y5 k+ o. @7 e$ {4 I. K$ l        WH_var.delete({1,Part_Nums+1}..{*,*});+ l2 p7 `5 N+ [$ x3 g
        for i:=1 to Part_Nums loop0 Q5 J2 d6 n; h4 S0 {6 |
                WH_var[1,i]:=chr(64+i);  y: h, L3 J5 o
        next;) L+ X& _! S0 f6 G: s  V1 R- ]
end;
: Q: `& y" K: X2 h出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
* @( c1 Z5 @) n
8 |5 n0 j) z  V) i4 |4 N

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-6-10 01:58 , Processed in 0.014136 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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