设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8218|回复: 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'
" F: j- L( x  p* P4 t*// Q! P& \8 q& {0 {' |. @
is: @" F4 N, T  Q% i1 b3 {, O
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, _) a  M& u& K  d+ hdo
6 W: N1 F1 j! B' \0 O. x        Lan := rootfolder.Internal.Tools.AOLlanguage;
4 Y; s( ^2 h# s1 n0 k7 T. H        if current = @.Destination -- else return
9 m1 O! x, J$ L        then
0 z  p* u) \$ V. x4 U( V                @.Destination := void;8 O; n( }! H3 [! t1 n/ J3 l
                if @.occupied then, k8 U, K3 \" {
                        part := @.cont;
/ i' D; X/ o9 w3 ~- K                        @.transpOrder := void;
5 i6 X. B( W1 E/ h* o: _, X                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 n& }+ \  z" d# p; `9 Y                                @,root.eventcontroller.simTime);8 l8 g1 U) [; g
                        @.HasOrder := false;
0 e8 J* v' e. W                        @.DrivingHome := true;8 p, Z! Z9 P. d' f+ k
                        rgManager.tryToStartTransOrder;, n7 Y  \% F/ e6 t" O
                        if @.Destination = void
, ~# S* j; J5 T8 i4 E: o6 C1 ^, b                        then -- no transport order for vehicle @0 r0 N" t) L% {* F  q' z+ j, @
                                @.Destination :=$ ^% L7 W0 ~- Q  [- j
                                rgManager.nearestFreeStation(@,track.~);  C6 _, d2 S' c/ v; l
                                newDirection(@);   ' J0 x' k) u# J- u+ X2 O, f
                                if @.Destination /= void then
1 u% q* c+ \4 @; s3 b% G2 z                                        @.Destination.NumReservation :=- J( C6 q3 ~" F! J  n
                                        @.Destination.NumReservation + 1;
/ _2 n$ ^' L; m& R0 `                                end;& L( G* {$ i" V" u  p
                                @.CurrIcon := "drivingHome";+ g3 L* y  m  G0 S2 c# |/ @
                                @.DrivingHome := true;
4 L0 [! i, |0 h3 r% d                        end;7 B, Z2 Q6 T+ ~4 e$ a2 U
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* O( c; y; n7 E: y: r5 E4 D                        part := @.transpOrder;
8 Q! L8 M) N/ {                        part.move(@);-- load part, O# h& i# E# }$ G, r3 @
                        @.CurrIcon := "load";
0 f0 `9 z: j8 r4 l/ {  W5 @                        GlobalDistObj := part.globDestination;
  {$ X" [- \' T! x9 b                        assignLObj := rgmanager.rgAssignL;
, x+ m$ O, L/ e                        row := assignLObj.getRowNo(GlobalDistObj);9 i2 n, o  g0 i- V) D7 p' ]8 G
                        if Row = -1 then -- since 70
  H& X' e3 c# N8 r& ]8 _0 q                                if lan=1 then. i: E; n" {. q: x! ]
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) r9 A  T  [( i                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: R- ~1 W0 p; b& M: U                                else
% J& ^. _( y2 z2 s0 m- P                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) p. h- s8 j; A+ \                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 Q, h/ }8 J( R- z                                end;
! L7 b7 i: ?! Y$ U' I, t6 d1 q' v                        else
# D& y* ?7 ~+ B0 D; d; ?) {$ u                                @.Destination := assignLObj[1,row];8 e: Z( G: W& ~# X' y* g
                        end;                       
) N3 I/ j: c, d# E9 x                        newDirection(@);
! O& ^4 \  O' {4 H                        @.HasOrder := true;$ ]; [& W/ {- _( A" E/ Z5 t
                end;5 `! m/ g. s9 p2 r! d& r
        end;
/ ]! \* z+ \- w3 }9 c: k1 E6 Aend;        -- of the method7 L. f6 z+ T4 q2 R
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 % @9 i0 T( M% o8 s9 f- D6 ]  L
" m( s4 U5 ^$ m% j' k
这是AGV_putin中arrive的method。5 C: E3 v- G4 c8 P

/ Y4 b, _# r0 q" N) R' a5 |当到达物料速度越高时,这个报警更多,
# q  p1 Y4 q( w  d0 ?可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
) n- j+ L. W' Q程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?! k5 O1 I( [, R0 Q" M7 q
, e+ Y! j% u$ V  I+ F' B2 z& \0 c
另外一个小建议,就是move,所有的move都可以这样- I& V6 \: ?, \) t! p  i9 F3 N0 {
if not move() then debug end% M( _! R& R8 C
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 }7 ?! w7 W, p- U; Y, d0 |plant simulation中的free libraries有AGV模板,
! W2 {6 }0 b- E, I7 i里面也有案例。1 U' W) Z" H7 n: K, k
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  }7 K* M9 T/ F6 B+ J& H0 C$ r
) X; j7 V3 T6 a% N
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : d6 z3 j, `# i6 H& g1 s* ~) [
" h7 \8 K5 H6 B% p4 W
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. f7 T+ I8 ?1 y" R. p3 }; k这是AGV_putin中arrive的method。
& A3 x9 s0 O8 H$ S7 k0 e2 R  \0 v8 q* b8 c- Q  A
当到达物料速度越高时,这个报警更多,
& W/ l! W8 x& b) K$ |" j
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-21 13:56 , Processed in 0.013881 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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