设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7500|回复: 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', H; e5 n( J. n9 H/ f1 b
*/. q' f0 i: s- V) j2 n
is2 h# r$ ~9 _6 i& T
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) D' W4 a! O* g- N9 G- ldo
, _1 o( D& Z+ V& H: x        Lan := rootfolder.Internal.Tools.AOLlanguage;, x1 M  _& |$ i( t' d% ~
        if current = @.Destination -- else return& K# p; i) \+ _  l
        then
3 N: ?0 g2 E* D* X                @.Destination := void;5 T! ?& ~# t3 o6 ^8 D2 O
                if @.occupied then
; s" e4 j2 G' G7 T                        part := @.cont;
( h' b' E4 |& }8 [! ~                        @.transpOrder := void;
7 k! r+ {, s6 [+ c$ z$ ]- z  i* U                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( j4 T& g' T+ n# w/ K9 A9 V
                                @,root.eventcontroller.simTime);
( y2 V7 `% j) P% H/ V+ G                        @.HasOrder := false;7 M% ]  Q1 k, O
                        @.DrivingHome := true;
' ]! m6 B8 P) o: q) }0 q/ C4 ~                        rgManager.tryToStartTransOrder;' {% |2 z: @/ l6 `0 _% F
                        if @.Destination = void. y; {( P' s0 m+ n2 ]
                        then -- no transport order for vehicle @; H! i* s& _& Z0 p$ J: k
                                @.Destination :=
2 @/ P9 L) j$ Z' u2 T' d) E  a                                rgManager.nearestFreeStation(@,track.~);
) [' |. C/ y. f! D) M. r                                newDirection(@);   
9 `( i6 f! ?" d. F4 c                                if @.Destination /= void then! m3 N: w4 t: b/ u+ @& h
                                        @.Destination.NumReservation :=
. V, [; g; _9 y                                        @.Destination.NumReservation + 1;( G! |& c% t7 r- {0 D. J8 w
                                end;1 `9 C. S: ]  j" h- ]
                                @.CurrIcon := "drivingHome";+ j& @2 ~# F! J0 O% I3 y' K
                                @.DrivingHome := true;
" b; E2 r; K' L7 [0 W* f& M( v# d                        end;, j$ w, h9 U) X
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: V" ~! q7 X5 W" y% Q                        part := @.transpOrder;! I. B5 K4 I# a& z0 H
                        part.move(@);-- load part' d- Z7 e$ Z* V) @* u; p
                        @.CurrIcon := "load";
$ w- p6 \5 y9 F8 r+ O  }) {" g                        GlobalDistObj := part.globDestination;
/ h, J) j( P! L4 |                        assignLObj := rgmanager.rgAssignL;
# A6 l& x& [! p1 {( l                        row := assignLObj.getRowNo(GlobalDistObj);
' W! H) x# P. h' C9 E6 @2 i                        if Row = -1 then -- since 709 t! h- [5 u: M: ]
                                if lan=1 then
/ @4 f$ n7 r( N' _" W$ s                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  V1 R, C* j5 `  B. t
                                                to_str("in der Andockstation: \"",?.~.name,"\""));& ?5 e9 P4 F- z) J
                                else5 Q/ g- q3 K+ Y) v+ }& c( Q. z
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: I& }4 C& a* j9 j5 T8 m
                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 R, h' Z5 D) T3 V                                end;
  e/ T& B  c9 a                        else
% ^5 d1 i# \2 K9 }0 g                                @.Destination := assignLObj[1,row];( @4 G' o2 K1 F0 y/ v% o. ?$ d. P
                        end;                       
3 `/ S6 Z4 g% ?; r" i- W* f                        newDirection(@);
' f1 m+ [/ I3 ~# `! D3 X: L                        @.HasOrder := true;2 V! f7 E% B$ t$ R1 V+ r
                end;
$ `( k! E" y- d# ?3 R! P. c        end;% x/ ~. T$ l2 h) C
end;        -- of the method0 R- j/ t& s* C) q: f
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) v+ A5 ]5 h$ \( ]$ F8 B
8 W, d/ L( k! J2 d  K* j
这是AGV_putin中arrive的method。+ {; x8 g3 s+ N9 w: H, j# ~

5 A. v* P1 H1 j( M. m1 Z2 q0 C9 B. E当到达物料速度越高时,这个报警更多,
& B- n4 P9 M0 \; _4 [+ x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。7 z) q+ q+ w' E# ^, n0 y) b, Y
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
8 Y7 n) {3 E4 j( [
. d; q% l6 Q' @/ L- K7 x另外一个小建议,就是move,所有的move都可以这样- \# S& c" m$ |" f! K3 A
if not move() then debug end
# c  D8 y0 [2 H  _这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ B  O2 U  b! q
plant simulation中的free libraries有AGV模板,! M7 n. s) P" F9 I& j
里面也有案例。, t8 C6 A9 b5 D) A2 j5 [6 x  V
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  m8 Y$ a# {# z: b2 P

, E: }7 r  ?% w5 z- A( p' R- w我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
5 ?7 [( _- R5 [4 s7 e4 e# v: x' z
: H. Q* ]3 U& x# c, `6 C* f0 H那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. y. ]% _9 d7 }+ d3 q6 O+ b. q这是AGV_putin中arrive的method。
( b- e8 A$ `# A. M& `( w* g+ }4 p) R. ~, c4 v* y- x( m
当到达物料速度越高时,这个报警更多,
# N+ l4 L6 }8 F: b" f# J! \
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-15 00:45 , Processed in 0.022413 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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