设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8534|回复: 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'/ D3 d% Q' c  w8 n: g
*/
6 P! j& F* h' W6 Z6 e  O# y7 @is( F1 b5 t5 F, T# T1 b. m( X9 p8 x
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) d1 K3 b0 J9 }do
% c# g& {" k5 _9 M) l, |4 p) l        Lan := rootfolder.Internal.Tools.AOLlanguage;
) Q" g% g; O) Y0 U, E) Q8 O        if current = @.Destination -- else return' J) }" ?+ X* m5 D& S6 j7 E3 c
        then5 {1 P8 F, m5 n) [- X. A
                @.Destination := void;9 U3 _" K8 c& w& G8 H( y  y' J
                if @.occupied then
6 j- o( S4 J3 c: v6 g                        part := @.cont;
/ D% S! ]! e  U$ z( q, J                        @.transpOrder := void;
. v/ F) H# S* w3 w                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; {1 L( a4 M! a1 a8 Q                                @,root.eventcontroller.simTime);8 m# T) h& I# M6 X6 f
                        @.HasOrder := false;
* R- T( n! b& r( v4 \                        @.DrivingHome := true;
' b4 _$ ?5 ^. p. r                        rgManager.tryToStartTransOrder;
. x% Q: P0 H/ t$ e. u; X3 u% y                        if @.Destination = void
5 E. @' _5 k4 N. K, |                        then -- no transport order for vehicle @
) q# ~( M. C( ]0 ^5 h' A                                @.Destination :=
( M6 J4 @, j% d' V: ]- m& B  e0 p                                rgManager.nearestFreeStation(@,track.~);) a6 W* P: @" Z! W  k
                                newDirection(@);   4 \" R, g1 ^7 D; t. N5 Y
                                if @.Destination /= void then
2 g  o* h" n' R" g4 q( B3 l/ v                                        @.Destination.NumReservation :=
6 g( z6 j; F  }* v4 _) r' q                                        @.Destination.NumReservation + 1;0 W* ~# I/ i- K7 E0 k
                                end;
8 G3 I3 D" Q7 R$ G2 m                                @.CurrIcon := "drivingHome";- e, x( i+ V8 O6 l+ |
                                @.DrivingHome := true;0 u( y& I' _  ?8 m  G
                        end;
" A$ I7 ]5 R" R- @# X  _- F4 U                else -- the vehicle @ is empty, both vehicle and part are in the same dock station# d& N9 _; d( }# A( s1 P
                        part := @.transpOrder;  c8 ]4 |0 F' T! w/ c
                        part.move(@);-- load part
* m# I, N0 b+ H, \* }                        @.CurrIcon := "load";+ }, S1 |! ^" u1 v
                        GlobalDistObj := part.globDestination;& `4 c( E# F+ H
                        assignLObj := rgmanager.rgAssignL;5 R( D% x% |8 h0 e4 K5 I
                        row := assignLObj.getRowNo(GlobalDistObj);
& [- h4 V+ B! t, Q( a                        if Row = -1 then -- since 70
: m. V% J  A0 C. j7 k9 z  Z. j! A                                if lan=1 then
6 F& i5 I9 R+ c6 }                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ K8 @/ D* l- @" _4 _+ L                                                to_str("in der Andockstation: \"",?.~.name,"\""));
$ n5 ~, o# |5 j7 Q1 s                                else
+ o% A; L  b* s+ ^2 G) h0 J                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; m5 L7 L0 ?' a8 M% f                                                to_str("in docking station: \"",?.~.name,"\""));                                4 ?% M/ p( ^: u  G# n
                                end;
# j' R6 y8 D( T' J3 n  C4 H                        else
( O' J# f! P& Y2 Z# k6 j! D, {                                @.Destination := assignLObj[1,row];
+ E7 _$ _' K+ g' ?" f) O3 s9 B                        end;                        ) x) r) [, E5 h/ h7 @" r6 D
                        newDirection(@);
: i& o, j+ o, n0 l                        @.HasOrder := true;+ y$ o) l7 [; \- _* @3 g
                end;8 f/ c+ F( O. s( `4 l
        end;
  L  s) e/ i2 Hend;        -- of the method
3 _2 J& d: x3 E4 ~) ^
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 d9 e6 E3 _1 `7 i% n
6 {. v6 `$ Q: i' \: X+ p这是AGV_putin中arrive的method。
$ x6 L; K2 o) t! N# G% }& u$ f" N
/ l/ R6 w. _6 K+ D$ f当到达物料速度越高时,这个报警更多,
" L: n: u. T1 M4 [5 a1 S$ I可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ g- N* `" i0 X* V程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
1 |; V% W( T, E$ G
! ~4 f9 ^& Y. b- i/ L1 j另外一个小建议,就是move,所有的move都可以这样# c4 L7 g: m+ A* p
if not move() then debug end
3 m. C, s$ W+ v这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
1 t. V3 Z: x! {8 }, l) T1 ]plant simulation中的free libraries有AGV模板,
. O# }/ m5 w0 o: {3 G. f里面也有案例。
( E" Q2 y8 g0 R- g# w& {  L我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 M+ ?+ [. O7 t9 l4 Y5 ^+ K' b, ^) s
5 q. A! l" d  r9 Y( O' E
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
- t0 z& ?& H8 c$ ?( y7 Z% b) a+ L$ U8 T2 M0 O
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 j6 v/ r" R6 G4 I7 Y* \8 O6 g
这是AGV_putin中arrive的method。
# T  p. V0 d% r& R. _! \2 I
$ a% P# I6 V. Q2 J当到达物料速度越高时,这个报警更多,
2 X) F8 w( l) b' x$ |- [
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-9 17:45 , Processed in 0.015790 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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