设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6986|回复: 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/ x0 t# P$ d4 r4 n9 \  [
*/
3 A5 h9 n( ^1 [0 y: m5 sis
) z+ \. T% X' R6 e5 c0 Q        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( r+ r# Y- F: v  p6 g( b$ _6 sdo
3 H- [4 ~$ G3 @; T        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 T; T, P! F$ Z- C( \        if current = @.Destination -- else return
3 i# m4 _! l% z9 H) I" |        then- y2 I( H7 v; y& e# F
                @.Destination := void;
8 Q: j9 [5 [' X) V" n+ _" `                if @.occupied then( n7 H  v9 ?3 p4 Z3 q
                        part := @.cont;
) T, @& i* a( q0 B0 a; e                        @.transpOrder := void;( f8 B; S0 R  Z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ T5 [! a! |7 ~& @* N7 X  g
                                @,root.eventcontroller.simTime);& r, [3 H1 v& U5 N# Z4 {- {
                        @.HasOrder := false;
- j; }/ ]% _2 P9 i! f; s/ x4 \                        @.DrivingHome := true;: k% E, |: @9 O
                        rgManager.tryToStartTransOrder;; k  g$ |  F1 q
                        if @.Destination = void4 H* |% O! N& r: c6 R
                        then -- no transport order for vehicle @5 z( g4 M( P7 X
                                @.Destination :=
% X$ Q5 [* n9 ?' P( |1 n) `( U                                rgManager.nearestFreeStation(@,track.~);
8 {# {0 ~3 p1 x9 g# g+ ~                                newDirection(@);   
/ }) D( C8 n9 `  I                                if @.Destination /= void then+ D( ~" t/ t4 o1 X9 a
                                        @.Destination.NumReservation :=$ k9 V' j1 X4 t6 h$ z3 |& f- q
                                        @.Destination.NumReservation + 1;- ~; f% b+ [' R0 P/ A
                                end;# f. {$ ]9 ]6 v! m. x9 s9 d
                                @.CurrIcon := "drivingHome";7 i4 J9 x# _1 r( S- H
                                @.DrivingHome := true;
: }+ x1 [1 j1 i* h5 N! W                        end;2 X( p) q8 X  k3 P; b4 y; y5 a
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ ~) I5 K* |. B2 ~0 V5 |! v" z6 ]                        part := @.transpOrder;  f- a/ Q8 \1 U
                        part.move(@);-- load part; q: l6 }% Z9 k7 ]
                        @.CurrIcon := "load";
, i2 W8 [4 n9 B3 D0 M                        GlobalDistObj := part.globDestination;& n2 [9 ?- Y7 p1 d  M$ O: |
                        assignLObj := rgmanager.rgAssignL;6 K- S. ^2 C; u  P7 u
                        row := assignLObj.getRowNo(GlobalDistObj);
1 Y" I, _8 l0 Y1 n0 w7 U3 ~                        if Row = -1 then -- since 70
' |& Q, `' R! e( S7 B                                if lan=1 then
. y2 ?& J' n2 i% h- Q                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 d( t! X/ A# e& k; ~, N8 f
                                                to_str("in der Andockstation: \"",?.~.name,"\""));# u& ?) N% I' V
                                else
( t' H& e& F( V. H9 D4 {$ x                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 `2 B7 o$ k+ L/ E$ m$ a0 s                                                to_str("in docking station: \"",?.~.name,"\""));                                - D( V+ l8 }" f3 z
                                end;# U5 C& w% Q2 |# D8 x
                        else
3 {- D! }" y, ^  j! e1 K1 I                                @.Destination := assignLObj[1,row];
) ]( U( @$ H& w8 E: w! k& F                        end;                        ! T9 |" v+ h( i
                        newDirection(@);( ?2 y" [6 Z" J2 {5 y/ x
                        @.HasOrder := true;, b! _4 C2 a  `$ g& a
                end;
. |4 N$ u5 V% {) m5 M        end;& f3 q8 y6 F! Y( r# |: }% V, J2 Q
end;        -- of the method
/ \5 b# a) Y" X, O
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 9 B+ q+ t0 t8 d; z! Z; _
& n  ^! K/ A: d; ~- w: F
这是AGV_putin中arrive的method。  s3 Q$ `& q9 G1 o

0 w! Q- l0 j$ U  F2 g9 e: U5 i当到达物料速度越高时,这个报警更多,! K& W4 w. O! E: ]! r! Q$ v
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 ^: ]* P0 {0 B# i
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?1 _3 {5 f8 ~4 n9 A
5 V$ H8 t+ S7 G3 R( T
另外一个小建议,就是move,所有的move都可以这样
5 F  ]& n2 h: qif not move() then debug end. R( A; @" x; F2 ^
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
* \# j" d7 L# w# L) iplant simulation中的free libraries有AGV模板,
) P1 o) R8 X+ d' h% {里面也有案例。
7 i& [2 i+ [) U! Y$ C( l' y: |我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
! V9 N( h. L4 u1 J( {4 k% o  l. B3 N
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 0 t4 ]6 B4 B6 V! c3 P3 O( i- ]6 ^

/ _  s- C% H/ ?/ k那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 3 Z. l( T: V& r2 e! ^3 F
这是AGV_putin中arrive的method。
& |: i( V: K& [9 [+ G" j0 J8 f. d) e2 `& [; }" y
当到达物料速度越高时,这个报警更多,
1 i: u( ^: x1 D9 @6 \
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-9 23:11 , Processed in 0.023141 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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