设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10016|回复: 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'
8 ?3 k) ?; l' k" H; i0 W. ~/ H# Y*/
$ b  \# q2 K& c  O; p1 Ois! ^3 ^, h) s) T/ j. h& W8 V$ z
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; t, Y8 X  Q3 g, z! ~; Mdo
' ~, M; D$ x$ U! D# g8 A# {        Lan := rootfolder.Internal.Tools.AOLlanguage;0 s, b1 k  a8 S8 q- ^
        if current = @.Destination -- else return' Z' [6 i( {, \- Y2 q2 x0 \
        then; J4 ?4 f& E) V! I( S1 }0 ]( j) m
                @.Destination := void;# _4 t- u- i3 I7 x2 Y
                if @.occupied then6 q* }7 r# _; O
                        part := @.cont;
1 o8 z5 H6 |1 @: H8 M/ x% {                        @.transpOrder := void;
; ]! {  S4 J5 Q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' L) Z. U1 P6 a- @/ x* x
                                @,root.eventcontroller.simTime);5 c5 [5 ]# l8 V6 p3 y& t* L) e; M
                        @.HasOrder := false;: U) D9 {1 Q# S  s% c  g- q) D" U
                        @.DrivingHome := true;
3 d' _% Z5 d% |% w2 j                        rgManager.tryToStartTransOrder;7 t0 }4 t2 w% q. j
                        if @.Destination = void
6 |$ r% Z: L+ R  |. }                        then -- no transport order for vehicle @
4 w) N' [- N! j  S  H% b. z1 T! t                                @.Destination :=4 D! b8 y' O" y
                                rgManager.nearestFreeStation(@,track.~);) }3 O! x9 ]4 |" ]: Q
                                newDirection(@);   $ }# F4 n3 p# {4 g
                                if @.Destination /= void then
4 [* G0 |# E2 l+ ?2 p                                        @.Destination.NumReservation :=
. w. R  t* _9 x1 G6 }4 P                                        @.Destination.NumReservation + 1;$ Z8 j  V; w, F" a5 o6 A
                                end;. P& [  i+ N1 m4 C' _
                                @.CurrIcon := "drivingHome";1 N; b% W# s: e, t  r, k, j) n( j
                                @.DrivingHome := true;2 Q$ H5 _- \4 n& v! A8 E" X
                        end;/ i9 o" U0 B/ w! L! U; A4 M
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station. y# w) _* U5 f
                        part := @.transpOrder;/ E7 U, N# V0 z% b: C
                        part.move(@);-- load part
5 ^+ b- V' C8 x4 {4 Q                        @.CurrIcon := "load";
' n. o" v" X* u. l- a# X                        GlobalDistObj := part.globDestination;  c$ E9 Q1 v6 q* g) N+ ]- `
                        assignLObj := rgmanager.rgAssignL;6 X! c$ k: C) x/ t/ L
                        row := assignLObj.getRowNo(GlobalDistObj);0 P) R+ @" J1 y( F! d7 l
                        if Row = -1 then -- since 70
* x/ T, Q% I% b                                if lan=1 then
2 f7 ?& _5 F  ^# c                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" x3 f- [+ V. [4 W                                                to_str("in der Andockstation: \"",?.~.name,"\""));
* V6 N. o. W% C: _; S4 K9 }                                else
8 f# s: h, K. N" e/ D  \* Z/ e( ]; q                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 V6 m! L  R4 |/ j7 L
                                                to_str("in docking station: \"",?.~.name,"\""));                               
* `; R9 |. y& b: r( O$ o                                end;) N- ?# @+ f  E3 M) r+ c
                        else
) N; U1 A$ H- A5 f3 _2 q0 r                                @.Destination := assignLObj[1,row];
, W4 |* l2 \$ r# g4 {3 N                        end;                       
1 O2 c/ t6 @: y9 ?" p( c8 `                        newDirection(@);
5 M5 V0 t- e9 l5 c! K$ R% A                        @.HasOrder := true;
- Y2 V6 @7 ~2 H0 I0 x                end;
8 a+ U0 n: b- u  S/ b# l        end;
; o8 T1 @, k* ~7 ]$ t7 Yend;        -- of the method
" y8 O, f! z& l# e: A/ W/ ?$ g& ^
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% f# J6 n" B1 F. ?- t$ }
4 D( h( T7 H3 k* p" o* ^5 s这是AGV_putin中arrive的method。
1 s2 s& o+ U" f8 I1 f$ v- Y% X" c/ d1 Z/ b5 W/ D2 i0 q
当到达物料速度越高时,这个报警更多,& E1 `4 G! k4 c: v$ H  l
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 W* G: d8 d( r  @. }0 m
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 M, E4 w; Y- A& e: g3 `; U9 U! J) H5 S2 z
另外一个小建议,就是move,所有的move都可以这样+ s2 U0 k/ |$ ~" y% H
if not move() then debug end
6 D! h6 i5 c0 P8 B这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# R% s" ?" r* S8 I7 d3 Yplant simulation中的free libraries有AGV模板,
1 g" L! x. @+ U3 K2 P& V! W0 u) O里面也有案例。
; Z9 p: c8 n$ ]) n) t6 }我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
% k3 _6 _7 ^+ n" r( F9 J8 |1 |" U9 E: @( c5 \2 F  ?( C- w1 h
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
! X; v$ `% C3 O% M* g( x% L' V  r2 B( N) D9 J
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 e" s6 B+ |# T5 C+ _3 v, j) ^
这是AGV_putin中arrive的method。
$ u! x  B% [9 M: O
" ]1 b$ G. ^, m当到达物料速度越高时,这个报警更多,
" {6 f- `: }+ k; z
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-7 17:43 , Processed in 0.018502 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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