设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7841|回复: 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': t; V0 z3 m* G( D: k/ `
*/
5 _9 j4 t9 c2 N! q% w; n# gis" x1 \& ?; I; K
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 H+ K" ]/ A7 e3 a* H; Z9 R# z
do
1 i* z( ], T8 T/ Z3 Z        Lan := rootfolder.Internal.Tools.AOLlanguage;
, J2 w; b' @2 [3 O/ k        if current = @.Destination -- else return
" r2 G0 h; [* R# |        then( X) B# d6 q5 l  l, y0 ]1 @- i6 }! d. X
                @.Destination := void;
+ \( _( }. J. }5 V- |                if @.occupied then
( ]5 k1 ^$ W1 ?) m) n                        part := @.cont;# W6 v8 Y; `9 q: i& z) E
                        @.transpOrder := void;
% Z+ `* [- I& `! c3 c8 J                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: V- o; f! t5 a7 t9 Z& Z& {# N                                @,root.eventcontroller.simTime);/ p3 k. ^) L- @; |* K4 `
                        @.HasOrder := false;" A1 z2 m: `0 Q* t
                        @.DrivingHome := true;1 R$ [: z+ T/ t* w
                        rgManager.tryToStartTransOrder;6 ~5 K$ J/ Z3 f5 B! S$ s  u% ?1 ]
                        if @.Destination = void2 h$ q8 J/ ], r
                        then -- no transport order for vehicle @# p, ~% w% D0 w0 e7 k4 q5 P8 b! n) [: v
                                @.Destination :=
, O0 B0 s; ~3 |  V$ S                                rgManager.nearestFreeStation(@,track.~);
' v" g  k, E  b$ K" g                                newDirection(@);   6 T$ f' h) r; i& ?3 Q
                                if @.Destination /= void then
2 z" U. l; g  y! D  M# D% x                                        @.Destination.NumReservation :=0 F8 @7 `4 A, L9 Q" z% W
                                        @.Destination.NumReservation + 1;  ?  N- Z' W6 j& W  W; o. L
                                end;
+ B  n* F# L# }4 P6 Y. f                                @.CurrIcon := "drivingHome";
2 w% a1 g& o, N3 \3 j                                @.DrivingHome := true;
1 w; e2 L7 R# k; R: F& ^                        end;8 h: a/ d3 q0 k* U) }' r
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 T! Y* o: t9 {6 ]                        part := @.transpOrder;
+ J. c3 Y' n' D3 a0 ~1 M                        part.move(@);-- load part
6 d  ?/ \7 r0 R, a                        @.CurrIcon := "load";) ~( f, T8 S7 E8 g0 v2 Z
                        GlobalDistObj := part.globDestination;- P5 v3 ^1 m0 R& p
                        assignLObj := rgmanager.rgAssignL;; z% R! [: Y7 G/ U8 A/ H& X( r
                        row := assignLObj.getRowNo(GlobalDistObj);
) Q* Q  y( _" ^* J' [+ z# o+ M                        if Row = -1 then -- since 708 i! S" K* _; S' ?- {
                                if lan=1 then
0 J1 |* U  k" a4 p3 |4 h3 S                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& V$ A4 J) |( p! g8 y                                                to_str("in der Andockstation: \"",?.~.name,"\""));9 }8 x, Y) J. H/ V$ E6 ?: N! V- b
                                else
5 i- F, P8 |# c                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- P- q0 `" l; {. V: [                                                to_str("in docking station: \"",?.~.name,"\""));                               
# d6 P. u) E, S& ^; q) t                                end;8 i, h# M, S% \5 S0 y
                        else( |. j  c$ c# u; K' _
                                @.Destination := assignLObj[1,row];
, ^. A; C2 k0 x* L. {( v                        end;                        2 o+ Z% b! H1 q9 y9 S( b
                        newDirection(@);
7 `  F& h+ S" [1 t1 O                        @.HasOrder := true;
$ a, v7 A# F' c: X                end;4 f) x( v& v5 `% B7 b
        end;
1 c) z+ D% ~% X7 Kend;        -- of the method# s' A3 a  a- [$ p4 a
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ W. T, U7 x! U4 i( J6 J* U
# A3 R- n2 l5 P! `( {$ Y
这是AGV_putin中arrive的method。& M6 I7 e+ B: n8 ~8 s) h1 c; r( e

( d, h8 f' O# U/ C3 O9 h当到达物料速度越高时,这个报警更多,- W4 n! z8 z4 z' g
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 P/ R  {7 C' Y' Q
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 W7 l# m! O' ?" l, P- c
' ^* p3 T$ ?# J: W" P另外一个小建议,就是move,所有的move都可以这样' Y9 E: x- i- d9 h# G5 y% d; y
if not move() then debug end
% A) b, @% t) g这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
  ?3 g+ V+ D- l4 }plant simulation中的free libraries有AGV模板,9 d& R7 \6 f: W& P0 a4 y
里面也有案例。. k: K5 B; Q7 c1 K) B
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 S0 A& C7 L; h, N; c, {+ H. y: o
+ ^0 ^5 ]- n7 z% A: c1 Y我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 R' j6 K% ]4 L. n2 D$ E
( n! K- N; s0 U* m" V8 I
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
0 v" `1 x* Q1 y+ D这是AGV_putin中arrive的method。
% j. T  _  C+ I1 s7 D% S" ~( ?% z- E3 R0 Q- m
当到达物料速度越高时,这个报警更多,

7 C$ \$ h9 _3 [& h# K1 x" b) i/ G另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-1 11:17 , Processed in 0.022429 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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