设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9044|回复: 9

[求助] 用AGV模板发生了以下错误,请解!

  [复制链接]
发表于 2011-11-5 16:38:28 | 显示全部楼层 |阅读模式
问题在哪里?

本帖子中包含更多资源

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

x
 楼主| 发表于 2011-11-14 10:37:54 | 显示全部楼层
没有解决,再顶一下。
 楼主| 发表于 2011-11-17 11:03:27 | 显示全部楼层
/* called by:        entrance ctrl of the object 'track'2 k1 U) E* o, x
*// t- X2 o6 h# Y/ m  l6 R
is+ {7 h+ n8 U8 s/ V
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ f! |6 L1 l: X. y6 {do, h, ^$ n% A; U  v
        Lan := rootfolder.Internal.Tools.AOLlanguage;
. k7 V2 }  u/ X+ m8 c* Y& S  Q; B        if current = @.Destination -- else return6 ?: H- f' O' k  R2 B4 T
        then
8 C( e. ~  T# u+ ?5 G$ y                @.Destination := void;
2 K5 r0 ^$ t5 Y: Y/ s) x# l                if @.occupied then: W* |% m) J; b9 Z% I
                        part := @.cont;% R" ?: m# W- k1 v9 Q2 g6 y
                        @.transpOrder := void;" ]6 _3 u5 w' X0 ^/ L1 b
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  X4 q# z, X0 e- w7 F) x$ ]6 h, A                                @,root.eventcontroller.simTime);0 ^# b" x4 l  S* k
                        @.HasOrder := false;
3 A$ c) a* C% C( W% n: e! J8 k2 n# ]                        @.DrivingHome := true;
1 C$ O% a/ d0 h% @. m! u6 _                        rgManager.tryToStartTransOrder;
; L$ x; n& L7 B, v( f                        if @.Destination = void$ W& q; k# X2 @3 Q1 h: n
                        then -- no transport order for vehicle @2 h6 V: Y1 G- B' w
                                @.Destination :=
8 D, P! Y( t& b% r2 |& k) `                                rgManager.nearestFreeStation(@,track.~);
5 C5 M0 M  w% x; \% n* `) O                                newDirection(@);   
+ w& _! Q& @1 q; x/ \                                if @.Destination /= void then; g. p7 G- `7 k4 o% w
                                        @.Destination.NumReservation :=
  e" \! k/ P! l; T3 \9 v                                        @.Destination.NumReservation + 1;; q) {0 x, w1 h8 J9 T$ S
                                end;
9 @6 N$ w: |  b# `4 h. C6 ?% M                                @.CurrIcon := "drivingHome";
# F; u2 W% r3 i& P% i                                @.DrivingHome := true;* A% z8 b5 q! ?% p2 l: J  [) J1 |
                        end;
, b+ c' e. l$ `* E, m                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) f& p  B7 ~& H: M$ [2 X
                        part := @.transpOrder;1 P* }6 h5 O5 }- y; B0 g
                        part.move(@);-- load part
4 i, K0 J% Y$ ?3 g* [: S                        @.CurrIcon := "load";8 z" u+ t, ], X1 L% J
                        GlobalDistObj := part.globDestination;& c, S* f3 K% G3 R: X! m" r
                        assignLObj := rgmanager.rgAssignL;
4 {: \: `5 h, x                        row := assignLObj.getRowNo(GlobalDistObj);
5 [& ?; v5 }9 g5 m                        if Row = -1 then -- since 70: @4 P' H3 Z5 H5 I  ^8 p6 p- C
                                if lan=1 then  y# l" X( x2 ]. v' ?3 x
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! |& ]# }$ C4 x' Z) W                                                to_str("in der Andockstation: \"",?.~.name,"\""));
0 m$ f/ H9 ~/ r# q" T5 c' ^' o                                else
) C  }" r9 f8 j; w3 r2 a: |                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# U; D$ r. c% I                                                to_str("in docking station: \"",?.~.name,"\""));                                  w9 v+ c4 y4 n, z
                                end;
5 @3 k8 R* m/ p                        else! a* I2 D' k. Q1 D0 u1 b
                                @.Destination := assignLObj[1,row];$ `2 |# F. i4 V  Q$ j5 K
                        end;                          S  r  Z9 [; X& ?' {+ f# a
                        newDirection(@);
  T) H" @# g% `; ^! i                        @.HasOrder := true;& A% [% [6 u2 q: x
                end;$ d- I2 F# f: S0 |. A+ K
        end;
. U- Q4 P+ w- Eend;        -- of the method
5 M7 {% I+ z- n2 K- w
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   X7 [; a  m3 v5 s' q4 f
  n% q4 B! z7 G% a9 q3 g
这是AGV_putin中arrive的method。- a1 W* V& d8 m4 V2 e$ s

9 Z/ g5 L/ K* F; D, J当到达物料速度越高时,这个报警更多,9 z; \4 J4 K2 f1 Q9 O  i
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。0 b7 G: v* w. w1 }# i
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 {) H& q! h2 c0 j% O

# E; J  N! F- D7 w* U+ x另外一个小建议,就是move,所有的move都可以这样) }7 l# H5 e# G& k. ~
if not move() then debug end
0 ]' Y- O- c- a$ e. z$ n这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. [; X, n7 ^, u* A& r, r. Kplant simulation中的free libraries有AGV模板,4 Y/ K: _* W  x
里面也有案例。
' A0 e  }8 Y7 P6 a1 z& s' S我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。& i: q4 N$ P: V2 {

7 G- @  W: U/ T2 i2 r# T我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : h- P% {# O7 ?2 J- V4 W( J. n5 b
& Q0 e$ C! \& ^" C
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
3 I: ]5 W0 p4 g  s这是AGV_putin中arrive的method。
( x( v$ \; o3 a- K2 y! R) x
/ u2 L" q7 N/ n) z( n当到达物料速度越高时,这个报警更多,

8 p6 D" x3 l8 E/ s1 C* C另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-10 09:07 , Processed in 0.052802 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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