设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3506|回复: 0

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

[复制链接]
发表于 2015-5-10 17:46:09 | 显示全部楼层 |阅读模式
我在做《生产系统仿真——plant simulation应用教程》第八章的仓储案例,在8.2.2里需要生成仓储货架层,我按照书上的语句输进去之后结果在22行出错了。
  Z$ g5 O( u, s- n; c* E$ m: }语句是这样的
8 I: g! J! U$ k! }) n4 w3 y' K8 g0 Dis
% T) b6 w6 H+ i        i:integer;
4 x; r/ H( ^3 ?3 `/ J! f        Res:string;6 P/ {- D4 N) ?
        obj:object;5 O7 Z9 G# F5 R- K" x& W
do* H1 {' c6 n) e0 r5 ^  P
        if existsObject("Status") then
/ S0 L# A( D. k                Status.deleteObject;1 @. I0 C$ |3 q; S) z- v3 t
        end;5 ^, ~) \, o3 \/ L  }9 J# ?
        for i:=1 to 10 loop
8 k/ Z- b4 B4 K! A/ {1 `/ S( E5 v                Res:=sprint("Store_",i);
# F+ S* F$ a3 r/ E1 P, {                if existsObject(Res) then4 r, l# [% `& s$ S% e2 \
                        Obj:=str_to_obj(Res);
3 R; W- F8 @1 m2 _                        Obj.deleteObject;/ G- v' X8 D& u' \
                end;
1 E6 l$ `8 {2 V        next;/ ~$ V7 K0 }# m/ M+ n: D
        --shengcheng Status:zimoxingceng
/ B/ X7 R6 q, r! ?; @        Obj:=.MaterialFlow.Frame.createObject(current,160,140,"Status");0 O$ t% G2 |8 A( o- a* \
        Obj.Label:="warehouse status";  w0 p& D" q4 l+ b7 l5 h
        " H  X2 H, ]" R; z) V  k
        for i:=1 to WH_nums loop+ V: I2 T- G: v; X: h: v. \6 Y$ b
                Res:=sprint("Store_",i);
7 p. A, M1 o+ Z( A# p  O                Obj:=.Delivery.Res.store.createObject(current,400,i*80,Res);3 e9 k2 n( E; l: X  M. q
                Obj.Label:=sprint("huojiaceng:",i);2 q# g* G! x5 P( `8 e& t8 Z
                Obj.xDim:=WH_x;
) |1 q/ ~$ o* P7 k                Obj.yDim:=WH_y;
% W# S( d. K" n+ G4 u- c1 I* b8 F                Res:=sprint("StoreData_",i);' F5 k: c2 [% H; ~5 j
               
, u. l6 Z' s3 S# ^; _                Obj:=.InformationFlow.TableFile.createObject(current.Status,i*120-60,40,Res);- R; N  x: q: h" C$ E
                Obj.Label:=sprint("huojiaceng:",i);
% K1 U9 d1 B" \& u$ A# a                Obj.inheritFormat:=false;
& S& ]( v* d9 u/ o; s                Obj.maxxDim:=WH_x;" x3 A( k. l$ r; N9 h
                Obj.maxyDim:=WH_y;
' |0 @/ {& F0 t; V3 @                Obj.ColumnWidth:=3;
% z. ^' H7 l! {4 V% }$ c        next;& ]! z3 W! ?+ E6 V, T
       
# o5 M3 ]( [! J, v( l' T1 }+ ]6 ?        .Delivery.MUs.Forklift.speed:=2;
7 S: e  E2 B. e! v0 r, C4 n" }        WH_var.delete({1,Part_Nums+1}..{*,*});
8 \0 x& ?, f2 x+ Y6 J: N        for i:=1 to Part_Nums loop
6 d2 Y+ V8 V: l6 W. y                WH_var[1,i]:=chr(64+i);& V2 T5 P3 ?) {( u; ?
        next;
, Q  w- X) t& S) D) U$ S( dend;( j; O3 ?; Z/ A9 P
出错的截图在这里。这些语句可以生成出来子模型层Status,但是生成不了货架层,错误显示说是unknown identifer res.求大神帮忙看看!!!多谢了
6 ^3 l* D4 ?2 [# y% i/ M3 Y) H% v  a$ }6 G- I# d) e" o( D

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-3-12 06:36 , Processed in 0.019881 second(s), 17 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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