• Aucun résultat trouvé

Étapes de la simulation pour une grille infinie

Dans le document 2.3 Le rendez-vous déterministe asynchrone (Page 55-121)

6.3 Fonctionnalités

6.3.2 Étapes de la simulation pour une grille infinie

Par souci de simplicité, le logiciel de simulation va construire une grille de taille limitée à 10 x 10. (Figure 6.6).

1. Choisir une étiquette pour chaque agent (Figure 6.6).

2. Choisir le nombre de rondes de décalage (optionnel) (Figure 6.6).

3. Sélectionner un nœud pour placer l’agent-1 et cliquer sur le bouton «Placer sur le nœud sélectionné »de la zone Agent 1 (Figure 6.6).

4. Sélectionner un nœud pour placer l’agent-2 et cliquer sur le bouton «Placer sur le nœud sélectionné»de la zone Agent 2 (Figure 6.6).

5. Cliquer sur le bouton «Départ»pour commencer la simulation (Figure 6.7)

6. Exécuter l’algorithme : chaque agent va se déplacer à travers les nœuds de la grille. La zone console affiche les étapes d’exécution de l’algorithme .

7. Fin de la simulation une fois le rendez-vous effectué (Figure 6.8).

Figure 6.6 – Placer les agents dans la grille

Figure6.7 – Exécution de la simulation de l’algorithme de rendez-vous dans une grille de taille 10x10

Figure 6.8 – Fin de la simulation de l’algorithme de rendez-vous dans une grille de taille 10x10

Conclusion

Dans ce mémoire, nous avons étudié des algorithmes de rendez-vous, dont la com-plexité ne dépend pas de la grandeur de l’environnement, ce qui permet de les appliquer dans de très grands environnements tout en préservant l’efficacité du rendez-vous. Nous avons présenté un algorithme déterministe qui résout le problème de rendez-vous de deux agents mobiles avec une distance initiale d’au plusDdans un graphe arbitraire de degré maximal∆. Nous avons prouvé que cet algorithme résout le problème du rendez-vous en un temps deO(D∆(∆−1)D−1logL)avec une borne inférieureΩ(∆(∆−1)D−1+DlogL), oùLest la grandeur de l’espace des étiquettes des agents. Dans un graphe spécifique qui est la grille infinie orientée, nous avons construit un algorithme qui résout le problème de rendez-vous de deux agents mobiles avec une distance initiale d’au plusD. Nous avons prouvé que cet algorithme résout le problème du rendez-vous en un temps deO(D2logL) et nous avons établi une borne inférieureΩ(D2+DlogL) sur le temps du rendez-vous dans la grille infinie avec distance initiale d’au plusD. Enfin, en appliquant l’algorithme précédent de la grille infinie, nous avons construit un algorithme qui résout le problème de l’approche de deux agents mobiles dans un plan avec une distance euclidienne initiale au plusD. Nous avons prouvé que cet algorithme résout le problème du rendez-vous en un temps O(D2logL).

Les problèmes ouverts ci-dessous sont énumérés pour la recherche future :

— Trouver un algorithme optimal qui résout le problème du rendez-vous dans un graphe arbitraire avec un degré maximale ∆inconnu.

— Trouver un algorithme optimal qui résout le problème du rendez-vous dans une grille infinie orientée.

— Trouver un algorithme optimal qui résout le problème de l’approche dans le plan.

Code Source du logiciel de simulation

Listing A.1 – Class Agent

1 i m p o r t {N o d e} f r o m ’ ./ n o d e ’;

2 i m p o r t {P o i n t} f r o m ’ ./ p o i n t ’;

3 i m p o r t { a n g u l a r M a t h } f r o m ’ angular - ts - m a t h ’;

4 e x p o r t c l a s s A g e n t {

5 p u b l i c L a b e l: s t r i n g ;

6 p u b l i c C u r r e n t N o d e: N o d e;

7 p u b l i c C u r r e n t P o i n t: P o i n t;

8 p u b l i c S h i f t = 0;

9 p u b l i c a g e n t 2 S h i t = 0;

10 c o n s t r u c t o r(l a b e l: s t r i n g) {

11 t h i s.L a b e l = l a b e l;

12 }

13 g e t T r a n s f o r m e d L a b e l() : Array<string> {

14 let b i n a r y S t r i n g = a n g u l a r M a t h.n u m b e r T o B i n a r y(N u m b e r(t h i s. L a b e l) ) ;

15 let r e s u l t = [];

Listing A.2 – Class Graph

30 a d d E d g e(s o u r c e: string, d e s t i n a t i o n: s t r i n g) {

56 }

21 c o n s t s o u r c e P o i n t: P o i n t = t h i s.P o i n t s.f i n d(n = > n.Id ==

8 I s S a m e P o s i t i o n() : B o o l e a n {

25 }

6

35

64 n o d e s[t h i s.v e r t i c e s[i].n a m e] = t h i s.v e r t i c e s[i].w e i g h t;

Listing A.8 – Class RendezVousManager

30 p r i v a t e a g e n t 1 W o r k e r;

61 t h i s.S e c o n d A g e n t = new A g e n t(t h i s.a g e n t 2 L a b e l) ;

92 t h i s.S e c o n d A g e n t = new A g e n t(l a b e l) ;

122 c o n n e c t e d E d g e s.f o r E a c h(e = > {

151 t h i s.r e n d e z v o u s D o n e = r e n d e z v o u s D o n e;

181 }

211 c o n s t a g e n t 1 O l d N o d e: N o d e = t h i s.n o d e s.get(m o v e.F r o m) ;

240 a g e n t 1 N e w N o d e.s i z e = 15;

271 s i z e: 30 ,

300 t h i s.t r a f i c A n i m a t i o n S p e e d * 3 , ’ b l u e ’, f u n c t i o n() {} ,

330 r e t u r n t h i s.N e t w o r k.g e t M a x N e i g h b o u r s() ;

359 a c t i o n: ’ i n i t ’,

388 t r a n s f L a b e l = s h i f t e d.j o i n(’ ’) ;

411 t h i s.a g e n t 2 b i t C o u n t e r++;

441 } e l s e if (e v e n t.d a t a.bit !== u n d e f i n e d) {

469 if (t h i s.i s R D V) {

494 t h i s.t r a n s o f r m e d L a b e l 2 = t h i s.g e t T r a n s o f r m e d L a b e l W i t h P o s(t h i s.

2 i m p o r t { G r i d } f r o m ’ ../ d a t a / g r i d ’;

33 p r i v a t e c u r r e n t A g e n t 1 B i t = ’ ’;

64 }

95 s e t S e c o n d A g e n t P o s i t i o n(p o i n t I d: s t r i n g) {

125 d i j k s t r a.a d d V e r t e x(new V e r t e x(n o d e.id, c o n n e c t V e r t e x, 1) ) ;

153 o l d N o d e P o s.i m a g e = ’ ’;

180 ] , t h i s.t r a f i c A n i m a t i o n S p e e d * 3 , ’ red ’, f u n c t i o n() {} ,

207 c o n s t n e w N o d e E d g e s = t h i s.v i s N e t w o r k.g e t C o n n e c t e d E d g e s(n o d e I d) ;

236 g e t A g e n t 2 T r a n s o f r m e d L a b e l() {

267 }

294 t h i s.a g e n t 2 b i t C o u n t e r = 0;

319 if (e v e n t.d a t a.m o v e T o N o d e !== u n d e f i n e d) {

347 t h i s.g e t A g e n t 1 C o n s o l e() ;

375 }

400 } e l s e {

16 e x e c u t e R o u n d B i t() ;

42 w r i t e T o C o n s o l e(’ D é b u t de l \ ’ e x é c u t i o n de l \ ’ a l g o r i t h m e . ’) ;

68 w r i t e T o C o n s o l e(’ Fin de l \ ’ e x é c u t i o n du bit ’ + bit + ’ à la

89 var n o d e C o u n t = 0;

116 i n v e r s e P a t h.p u s h(N u m b e r(t h i s.a g e n t.C u r r e n t N o d e.Id) ) ;

142 m o v e T o N o d e(nId) ;

173 r e t u r n r e s u l t;

204 var end = s t a r t;

16 }e l s e if (e.d a t a.a c t i o n == ’ i n i t ’) {

42 c o n s o l e.log(’ A g e n t l a b e l : ’ + t h i s.a g e n t.L a b e l + ’ t r a n s f o r m e d

66 w r i t e T o C o n s o l e(’ Fin de l \ ’ e x é c u t i o n du bit ’ + bit + ’ à la

90 p a t h += ’ E ’.r e p e a t(t h i s._ d i s t a n c e) ;

120 b i n a r y S t r i n g = t a b l e.map(f u n c t i o n(e l e m) {

151 f u n c t i o n w r i t e T o C o n s o l e(m e s s a g e) {

152 var p a r a m s = {

153 m e s s a g e T o C o n s o l e : t h i s.c o n s o l e C o u n t e r +’ : ’ + m e s s a g e + " \ n \ r "

154 }

155 t h i s.c o n s o l e C o u n t e r++;

156 p o s t M e s s a g e(p a r a m s) ;

157 }

[1] Agathangelou, C., Georgiou, C., and Mavronicolas, M. A distribu-ted algorithm for gathering many fat mobile robots in the plane. PODC (2013), 250–259.

[2] Barrière, L., Flocchini, P., Fraigniaud, P., and Santoro, N.Rendezvous and election of mobile agents : impact of sens of direction. Theory Comput. Syst.

40, 2 (2007), 143–162.

[3] Chalopin, J., Das, S., and Kosowski, A.Constructing a map of an anonymous graph : applications of universal sequences.International Conference On Principles Of DIstributed Systems (OPODIS)(2010), 119–134.

[4] Chalopin, J., Das, S., and Santoro, N. Rendezvous of mobile agents in unknown graphs with faulty links. DISC (2007), 108–122.

[5] Cieliebak, M., Flochini, P., Prencipe, G., and Santoro, N. Distribu-ted computing by mobile robots : Gathering. SIAM J. COMPUTING 41 (2012), 829–879.

[6] Czyzowicz, J., Ilcinkas, D., Labourel, A., and Pelc, A. Asynchronous deterministic rendezvous in bounded terrains. Theory Comput. Syst. 412 (2011), 6926–6937.

[7] Czyzowicz, J., Ilcinkas, D., Labourel, A., and Pelc, A. Worst-case op-timal exploration of terrains with obstacles. Information and Computation 225 (2013), 16–28.

[8] Czyzowicz, J., Kosowski, A., and Pelc, A. How to meet when you for-get : log-space rendezvous in arbitrary graphs. Distributed Computing 25 (2012), 165–178.

52 (2013), 179–199.

[10] Czyzowicz, J., Labourel, A., and Pelc, A. How to meet asynchronously (almost) everywhere. ACM Transactions on Algorithms 8, 37 (2012).

[11] Dessmark, A., Fraigniaud, P., Kowalski, D. R., and Pelc, A. Determi-nistic rendezvous in graphs. Algorithmica 46 (2006), 69–96.

[12] Dieudonné, Y., Pelc, A., and Villain, V. How to meet asynchronously at polynomial cost. SIAM J. COMPUTING 44 (2015), 844–867.

[13] Dobrev, S., Flocchini, P., Prencipe, G., and Santoro, N. Multiple agents rendezvous in a ring in spite of a black hole.International Conference On Principles Of DIstributed Systems (OPODIS)(2003), 34–46.

[14] Flocchini, P., Ilcinkas, D., Pelc, A., and Santoro, N.How many oblivious robots can explore a line. Information Processing Letters 111 (2011), 1027–1031.

[15] Flocchini, P., Ilcinkas, D., Pelc, A., and Santoro, N.Computing without communicating : Ring exploration by asynchronous oblivious robots. Algorithmica 65 (2013), 562–583.

[16] Flocchini, P., Santoro, N., Viglietta, G., and Yamashita, M. Rendez-vous of two robots with constant memory. SIROCCO (2013), 189–200.

[17] Flochini, P., Prencipe, G., Santoro, N., and Widmayer, P. Gathering of asynchronous oblivious robots with limited visibility.Theoretical Computer Science 337 (2005), 147–168.

[18] Guilbault, S., and Pelc, A. Asynchronous rendezvous of anonymous agents in arbitrary graphs. InInternational Conference On Principles Of DIstributed Systems (OPODIS) (2011), pp. 162–173.

[19] Izumi, T., Souissi, S., Katayama, Y., Inuzuka, N., Défago, X., Wada, K., and Yamashita, M. The gathering problem for two oblivious robots with unreliable compasses. SIAM J. COMPUTING. 41, 1 (2012), 26–46.

[20] Marco, G. D., Gargano, L., Kranakis, E., Krizanc, D., Pelc, A., and Vaccaro, U.Asynchronous deterministic rendezvous in graphs.Theoretical Com-puter Science 355 (2006), 315–326.

112

[22] Miller, A., and Pelc, A. Tradeoffs between cost and information for rendez-vous and treasure hunt. Journal of Parallel and Distributed Computing 83 (2015), 159–167.

[23] Pelc, A.Deterministic rendezvous in networks : a comprehensive survey.Networks 59 (2012), 331–347.

[24] Schelling, T. The strategy of conflict. Oxford University Press (1960).

[25] Ta-Shma, A., and Zwick, U. Deterministic rendezvous, treasure hunts and strongly universal exploration sequences. In SODA(2007), pp. 599–608.

113

Dans le document 2.3 Le rendez-vous déterministe asynchrone (Page 55-121)