设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3446|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
3 N) ]7 d6 b, ~; `* X9 G9 l+ [语句是这样的
  l* e- {8 L' Ais! x. U; R3 T% U/ L! D0 u0 P
        i:integer;; [; \" d3 A' D/ O, w% t# r
        Res:string;% k( e/ R2 A5 |2 {/ F
        obj:object;
. l7 P/ ]6 r! k, @- `) U# Ydo
* b* o7 R. L0 z/ x        if existsObject("Status") then8 f/ F; L; \) g( l
                Status.deleteObject;. x* k( k  [3 d" L
        end;
2 g- G) R: o; G2 y        for i:=1 to 10 loop
2 m- a, z5 c( P/ ?0 v( u8 s                Res:=sprint("Store_",i);, q; x8 q4 @' Q5 j
                if existsObject(Res) then
. J8 {5 b& W: M/ M/ B                        Obj:=str_to_obj(Res);# ]$ Z8 M% f% I6 b% R
                        Obj.deleteObject;
, h) S* C# p* b: p8 u                end;
6 Q0 s* r2 o+ A& C$ k! E& a- E- `) K        next;
& O; I* y6 i2 h, p7 m3 f( o        --shengcheng Status:zimoxingceng
1 v5 m2 `- h# t. q; F2 i" Z        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");
( h/ Z* C% F: c' A3 I7 d0 d        Obj.Label:="warehouse status";
4 O! O6 A7 O' N0 v8 J2 h5 Z        4 T7 [0 `# [2 o; I8 W# x; q- G
        for i:=1 to WH_nums loop) X. s9 T% @% x
                Res:=sprint("Store_",i);
8 i/ a6 ?2 V' q2 u  T" I' U$ H                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);  t7 d' M2 N$ J1 n4 J& A% L2 j" L
                Obj.Label:=sprint("huojiaceng:",i);1 ?; H" C5 r6 Z
                Obj.xDim:=WH_x;
( Z9 [4 Z/ w7 }: B1 f1 B                Obj.yDim:=WH_y;
4 w& W9 Y  D3 z; E& s                Res:=sprint("StoreData_",i);
3 V$ ]! `* Y* Z               
/ M3 L  e: B, G  U7 W, \                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);
7 n0 M  N6 U( y, P3 d. V                Obj.Label:=sprint("huojiaceng:",i);  W1 X- ]* q9 k( i6 x  r
                Obj.inheritFormat:=false;% P) _% U. p$ t6 i: c) ]2 k. Z9 l
                Obj.maxxDim:=WH_x;
7 ?, D( \- A/ s: c: y                Obj.maxyDim:=WH_y;
. o) V7 _. A0 T$ ]' s; |                Obj.ColumnWidth:=3;
5 K: I' y8 l8 Q9 C0 x        next;
' z% [- \8 z3 z' M( ~        3 `0 e2 `5 y$ o, U) S) I
        .Delivery.MUs.Forklift.speed:=2;
, J0 G; T. V( C3 v9 P        WH_var.delete({1,Part_Nums+1}..{*,*});
# A" P! t! V" s4 |% y/ y) m        for i:=1 to Part_Nums loop
- t5 D. j! B+ `' c5 \/ A, Z: D0 i                WH_var[1,i]:=chr(64+i);
% g6 C+ o$ M+ M* A        next;+ d; H7 G9 O8 ]4 t; X
end;
' ~1 h$ q& Q2 t: U" r0 H$ y出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了5 {  [( b, }4 }

1 s5 [" g1 R! D4 d# D

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-2-28 08:11 , Processed in 0.019591 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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