设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6361|回复: 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'
  B( d7 ^. J. G: A4 D*/( @$ u9 s/ ~0 u: B4 \
is& f( q: W* s7 c4 r+ S7 B
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 T/ Y  x& g% R% t, I) P
do2 @7 E! i+ E3 o/ ?1 |1 }# |
        Lan := rootfolder.Internal.Tools.AOLlanguage;- ?# O) ^3 W( X+ G
        if current = @.Destination -- else return7 |, a, F* G: G1 Q
        then
. f' K. W, t5 ^" `1 g                @.Destination := void;# V9 I* F0 X% p6 |; [/ v1 S
                if @.occupied then
0 r5 F" U0 l  W) K* w  D( M4 T                        part := @.cont;
7 M! n! M3 `- k                        @.transpOrder := void;
- F; N4 u' }  h* E/ m$ D( I6 g8 J                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- v, _& t/ r! V7 Z- E# B
                                @,root.eventcontroller.simTime);& r/ N- Q7 L- ^: B
                        @.HasOrder := false;
( L) ]; o" f0 [8 n; m& p0 X9 E% o, X2 {                        @.DrivingHome := true;) @+ v# R: t* q- h3 U
                        rgManager.tryToStartTransOrder;: r  \, A* W( S# B1 ~
                        if @.Destination = void
/ d4 ]1 G. l( d8 ]  H, J3 P                        then -- no transport order for vehicle @
( m4 u7 `8 \/ ]. j$ O  e5 |3 G6 t                                @.Destination :=6 S" K: y* Z. U( V9 P0 d# ~5 q6 C
                                rgManager.nearestFreeStation(@,track.~);! l6 y% Y! T' H: F( F9 T1 g4 Z
                                newDirection(@);   2 k# s1 R' Z: r' Q) z! k
                                if @.Destination /= void then
" s+ B; U* r5 w! s) Q                                        @.Destination.NumReservation :=, R( u" s: q( w5 Z  i* J, j
                                        @.Destination.NumReservation + 1;
7 ]* M8 l; V" `9 H2 u; L                                end;; ~" q! r! U% G- W$ ^7 \2 O
                                @.CurrIcon := "drivingHome";
8 t! T9 O; G1 B9 e& B# [0 t6 l% A4 V, p                                @.DrivingHome := true;
- `2 H# F  G6 [( P& u" `% @- d( N                        end;
4 Z: o% m- N) P+ W7 R- q                else -- the vehicle @ is empty, both vehicle and part are in the same dock station! f+ h9 i3 g  v2 d( C
                        part := @.transpOrder;
( b3 n0 n  f! F' A                        part.move(@);-- load part
4 f7 B  v3 b! h) t                        @.CurrIcon := "load";
5 [0 d* R, f! ^- n+ g' K                        GlobalDistObj := part.globDestination;$ ?" W0 P7 I8 y5 g- ^* S
                        assignLObj := rgmanager.rgAssignL;/ P& S; Y; R+ f- o# @, u
                        row := assignLObj.getRowNo(GlobalDistObj);
$ s5 p5 t0 c3 z0 Z; b2 Z                        if Row = -1 then -- since 70
, [' a( D6 s; e2 b                                if lan=1 then
# ~3 l; m* c5 |  s6 d                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' _" ?+ c, a2 t( e7 [* q                                                to_str("in der Andockstation: \"",?.~.name,"\""));( s0 U9 b& ^5 C( L
                                else
9 c2 t! {% j: H+ c; `                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 f2 |: c2 i. _) G  V                                                to_str("in docking station: \"",?.~.name,"\""));                                / w+ E  o1 x2 [% r3 Y3 P8 a
                                end;! ]7 o* d2 b# b+ q7 k, X
                        else
; S7 r& E- M+ u; T                                @.Destination := assignLObj[1,row];
$ B6 F% L" P7 W- x8 d9 `                        end;                       
  R& \/ z' l+ O& @( `                        newDirection(@);
; y! C- F( h  a- Q4 X# Y                        @.HasOrder := true;
& q, H0 @2 I! ^3 O: g/ \                end;
( t: V' y( o+ }6 ]$ P$ C        end;
3 A. M: z1 b! o/ \0 S; f+ P/ s+ qend;        -- of the method
* O' W2 R$ y6 T
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ; |7 U- j7 q+ G/ z+ ^8 Y5 G3 I
: r* u# n- Q9 h0 v8 `6 q- J4 e
这是AGV_putin中arrive的method。/ \! Q  \0 r8 p9 p& K4 H
" N% @4 C/ @# _6 ]+ C
当到达物料速度越高时,这个报警更多,
! I) r' k/ E) O* j6 O% O可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。/ C/ o  S9 a, Y! @% F2 H
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
6 c& p% S8 j. [2 M
8 s/ Z/ A! x$ I% E  n7 k. P- v) ~另外一个小建议,就是move,所有的move都可以这样
+ Y% q5 _# O! e( M/ s  t' L; wif not move() then debug end
) s3 R: _* h) t* m这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。2 K% T* X, _( l1 ]
plant simulation中的free libraries有AGV模板,
: @2 Q, E4 g. L3 z% o- k里面也有案例。
8 F: p$ f  }9 Q1 R, C# @我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 N. r  a6 ?; v0 Z* u, i& @
0 m% ]8 w, L3 P/ R0 x% N2 R9 o
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑   G3 U* T6 I  h5 R2 _% t
) x" q7 p! Q! {
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. k# }0 z% i5 p0 }1 o, q% \这是AGV_putin中arrive的method。
: [$ C6 W8 l8 ^  \- I2 O# b" T: M/ H' Q# x1 z$ P9 R' d6 f
当到达物料速度越高时,这个报警更多,
' X' Z( M( h: i  r
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-1 19:12 , Processed in 0.018458 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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