Analysis and Models in Interdisciplinary MathematicsView this Special Issue
Research Article | Open Access
Francisco Javier Moreno Arboleda, Jaime Alberto Guzmán Luna, Sebastian Alonso Gomez Arias, "Identification of V-Formations and Circular and Doughnut Formations in a Set of Moving Entities with Outliers", Abstract and Applied Analysis, vol. 2014, Article ID 241684, 11 pages, 2014. https://doi.org/10.1155/2014/241684
Identification of V-Formations and Circular and Doughnut Formations in a Set of Moving Entities with Outliers
Diverse movement patterns may be identified when we study a set of moving entities. One of these patterns is known as a V-formation for it is shaped like the letter V. Informally, a set of entities shows a V-formation if the entities are located on one of their two characteristic lines. These lines meet in a position where there is just one entity considered the leader of the formation. Another movement pattern is known as a circular formation for it is shaped like a circle. Informally, circular formations present a set of entities grouped around a center in which the distance from these entities to the center is less than a given threshold. In this paper we present a model to identify V-formations and circular formations with outliers. An outlier is an entity which is part of a formation but is away from it. We also present a model to identify doughnut formations, which are an extension of circular formations. We present formal rules for our models and an algorithm for detecting outliers. The model was validated with NetLogo, a programming and modeling environment for the simulation of natural and social phenomena.
Diverse movement patterns may be identified when we study a set of moving entities, for example, a flock of birds  and a school of fish . One of these patterns is known as a V-formation for it is shaped like the letter V; see Figure 1. Another movement pattern is known as a circular formation for it is shaped like a circle; see Figure 2.
Informally, a set of entities shows a V-formation if the entities are located on one of their two characteristic lines. The lines meet in a position where there is just one entity considered the leader of the formation . Several authors have analyzed V-formations. In [4, 5], there is an attempt to explain from a physical point of view the reasons why certain species of birds, such as Canadian geese (Branta canadensis), red knots (Calidris canutus), and plovers (Calidris alpina), tend to fly this way.
Other authors try to simulate V-formations at a computational level. For instance, Nathan and Barbosa  propose a model based on rules that allows us to generate V-formations depending on specific parameters. The authors validated their model using NetLogo , a programming and modeling environment to simulate natural and social phenomena.
On the other hand, a circular formation is a set of entities grouped around a common center and where the entities’ distance to the center is less than a given threshold. Regarding related works with circular formations, we identified the following.
In  the authors experimented with a set of data referring to the movement of different animal species. It was found that despite being in different ecosystems, species follow similar behavioral patterns. The authors also tried to model general grouping behaviors of fish, birds, insects, and even people. One of these behaviors is circular formation in which they identified physical forces: attraction, repulsion, alignment, and frontal interaction.
On the other hand, researchers in the field of robotics and in control theory, inspired by social grouping phenomena and by the patterns of birds and fish, have developed applications to coordinate the movement of multivehicle systems. Among these patterns are circular  and V-formations; see Figure 3.
On the other hand, regardless of the type of formation, Reynolds [2, 10] proposes a computer model of coordinated animal motion for bird flocks and fish schools. His model considers three simple rules that act upon individuals: (i) separation: steer to avoid crowding local flockmates, (ii) alignment: steer towards the average heading of local flockmates, and (iii) cohesion: steer to move toward the average position of local flockmates.
Although the previous works allow the simulation of a set of moving entities, they are not aimed at the explicit identification of V-formations and circular formations. The identification of these types of formations may be useful in fields as zoology, to analyze the movement of birds  and fish , and in the military and videogames where squadrons of combat planes, ships, and robots usually assume these types of formations [3, 12]. V-formations also usually appear in stock markets (stock prices) . In this direction the model of Andersson et al. , although it is not aimed at the explicit identification of formations, identifies an entity leader in a set of moving entities. We use their model as the basis for identifying V-formations and circular formations, as we will show in our paper.
This paper is organized as follows. In Section 2, we present our models for V-formations and circular and doughnut formations, which are an extension of circular formations. In Section 3, we present support for outliers in our models. In Section 4, we present experiments. In Section 5, we conclude the paper and propose future works.
2. V-Formations and Circular and Doughnut Formations
2.1. Andersson’s Model
Next, we present the essential elements of Andersson’s model .
Consider a set of entities that move in a space, usually in a region during a time interval . This space is represented by the Euclidian plane. Time is represented continuously. denotes an infinite set of time-points: . On the other hand, denotes a finite set of discrete time-points . Every represents a time-step and corresponds to a time-point in which the position of a moving entity (and perhaps other data) was recorded. A unit-time-interval is an open interval between two consecutive time-steps, that is, , for all , .
The coordinates of an entity at a time-point are given by a pair of functions and , both having the signature Real. Andersson assumes that between two consecutive time-steps an entity moves along a straight line with constant direction and constant velocity. This assumption has been adopted in other works (see [15–17] for a discussion). Therefore, in such a model in order to be practical enough, the recording frequency of the positions of moving objects should be adapted to the nature of each domain. For example, when detecting bird formations the elapsed time between two consecutive time-steps should not be longer than 30 seconds.
Consider an entity at a time-point , where , , ; then the direction of at , denoted by , is the angle specified by the straight line segment that goes from , to ; see Figure 4. The angle is between . Andersson declares the direction of an entity at a time-step to be undefined, because at a time-step an entity might change its direction (for more details see ).
The front region of an entity is a region associated with at a time-point , where , , , which represents the perception region of an entity, for example, a visual or an auditive range. The front region of is defined as follows: consider three straight line segments , , and, , each of length . Each segment has an endpoint at . The direction of the segment is . Segments and form angles of and with regard to segment , respectively. The circular sector (a wedge-shaped region) with a radius , delimited by and , makes up the front region of at and it is denoted by front(e_i, t); see Figure 5.
An entity is in front of an entity , at a time-point , where , , , if is in the front region of , that is, if is inside front(e_i, t); this is denoted and we say that follows is a follower of at . We consider an additional restriction to establish that one entity follows another: let ; then entity follows entity at if (i) and (ii) ; see Figure 6. An entity is said to follow an entity during a time interval , where and are time-points in , if and only if follows at , for all , .
An entity is said to be a leader of a formation during a time interval , where and are time-points in , if (i) does not follow any entity during and (ii) is at least followed by entities at each time-point , . It is said that there is a leadership pattern if is a leader of at least entities for at least unit-time-intervals.
Consider the formation in Figure 7 where entities displayed a V-formation at a time-point , and is the leader entity. Note that if we applied Andersson’s model  to this formation, we would observe that no entity contains in its front region. Therefore, this example shows that Andersson’s model  is inadequate to identify leadership patterns in these types of formations, unless we consider a wide front region for each entity, as shown in Figure 8. Thus, the entities on the extremes, and , will require a wide front region to be able to contain the leader entity ; this is not a realistic assumption in V-formations since an entity’s visual field is not usually that wide .
In the following section, we extend Andersson’s model to identify leadership patterns in V-formations.
2.3. V-Formation Model
Let be a set of moving entities at a time-point , card. is a V-formation at if the following hold.(i)There exist nonempty subsets and of such that , , , and , where is said to be the leader entity of the formation.(ii)Entities in tend to form a straight line at .(iii)Entities in tend to form a straight line at .(iv)Straight lines and meet at position , .(v) (the smallest angle defined by straight lines and at ).Regarding conditions (ii) and (iii), to establish if a set of entities tend to form a straight line, we use Pearson’s correlation coefficient . Thus, given a set of points , indicates how much they adjust to a straight line (linearity degree). ; if , then points tend to form a straight line. is calculated as shown in (1). A threshold may be specified by the user to indicate the linearity degree required for the lines of the formation; that is, : To obtain the equation for each straight line characteristic of the formation ( and ) we may apply the equations that correspond to the straight line which most suits a set of points ; see (2). Table 1 presents the results for the formation in Figure 9: Regarding condition (v), is calculated as follows: we get straight lines and from the formation and find the smallest angle between them as follows. is the positive angle in that is specified by the line segment that goes from to , where is the position of (leader entity) according to equation for and is the position of , according to equation for . is the positive angle in that is specified by the line segment that goes from to , where is the position of (leader entity) according to equation for and is the position of , , according to equation for .Let ; then if , and , otherwise. For example, in the formation in Figure 9, rad (40.36°), rad (294.44°), and rad (254.08°); thus, rad (105.91°).
In an analogous way to leadership patterns, we say that there is a V-formation pattern if the set of moving entities shows a V-formation for at least unit-time-intervals.
2.4. Circular and Doughnut Formations
In this section, we present a formal model to identify circular formations. We also present doughnut formations, which are an extension of circular formations.
2.4.1. Circular Formation Model
Let be a set of moving entities at a time-point . Let be the minimum circle that encloses the entities in and let be its radius and let () be its center (Welzl  and Megiddo  have showed that this circle can be found in linear time). is a circular formation at if(i) (a user-given radius with center at ),(ii)the minimum number of members in the formation is .In Figure 10, we show a circular formation with 9 members.
2.4.2. Doughnut Formation Model
Let be a set of moving entities at a time-point . Let be the minimum circle that encloses the entities in and let be its radius and its center. is a doughnutformation at if(i) (external radius, a user-given radius with center at ),(ii)for each entity of the formation its distance regarding is greater than (internal radius, a user-given radius with center at , ),(iii)the minimum number of members in the formation is .Note that a circular formation is a particular case of a doughnut formation, where . In Figure 11, we show a doughnut formation with 8 members.
Circular and doughnut patterns are also defined in an analogous way to a V-formation pattern.
Informally, for V-formations an outlier is an entity which is away from its characteristic lines, and for circular formations it is an entity found beyond the radius of the formation .
3.1. Outliers in V-Formations
There are sets of entities which tend to display a V-formation; they may have at a time-point entities which are away from their characteristic lines and which, therefore, affect Pearson’s coefficient. These entities are called outliers [22, 23].
There are numerous methods to detect outliers in different domains . Listing 1 presents an algorithm that receives an array of entities (lineMembers) which form a characteristic line of a formation at a time-point . The algorithm determines if, after removing a maximum number of entities on the given array, the Pearson’s coefficient surpasses a given threshold . For example, if it is permitted to remove a maximum of two entities from a characteristic line of the formation, it is considered that the entities in Figure 12 display a V-formation having two outliers on each characteristic line. Then, the algorithm receives the minimum value of Pearson’s coefficient which should be met and a maximum percentage of entities (percentageOutliers) which are permitted to be removed from the array of entities. This percentage is calculated with regard to the total number of entities .
Example 1. Consider the set of entities in Figure 13 which would form a straight line if entities and were not considered; that is, and are outliers.
Input algorithm parameters:
, and percentageOutliers = 20%.
Step 1. Equation of : .
Step 2. nbrOutliers = .
Step 3. and .
Step 4. lineMembers .
Step 5. Pearson = PearsonCoefficient (lineMembers) = 1.
Step 6. ; then return outliers = .
The algorithm determines that entities and are outliers. Then, we conclude that entities , and tend to form a straight line with Pearson’s coefficient greater than 0.99.
3.2. Outliers in Circular Formations
Let be a set of moving entities at a time-point . Consider an entity such that is a circular formation and the distance from to () (center of the minimum circle that encloses the entities in ) is greater than at . This entity may be considered as a member of the formation which is temporally away from it; that is, is an outlier. To identify this type of entities, we introduce a parameter , where . An entity is considered an outlier at a time-point if its distance to (, ) is greater than and less than ; see Figure 14.
Since the distancing of the outlier entity from the formation is temporal, an analyst may introduce a second parameter to control the maximum continuous time of permitted distancing. That is, if an entity separates from a circular formation at a time-point , then, to be considered an outlier, it will have to reincorporate () to the formation before . This same aspect can also be considered for outliers in V-formations.
An analyst can also specify a maximum permitted number of outliers maxNumberOutliers in the formation. This value can be calculated from a percentage (percentageOutliers) with regard to the total number of entities in the formation.
3.3. Outliers in Doughnut Formations
Let be a set of moving entities at a time-point . Consider an entity such that is a doughnut formation. For doughnut formations we consider two types of outliers: external and internal. An entity is considered an external outlier at if its distance to () (center of the minimum circle that encloses the entities in ) is greater than and less than , where . On the other hand, is considered an internal outlier at if is less than ; see Figure 15.
Analogously to circular formations, and maxNumberOutliers values may be specified, not only for external outliers but also for internal outliers.
4. Experiments and Discussion
4.1. Experiment for V-Formations
For our experiment, we used Nathan’s model  implemented in NetLogo in order to generate V-formations. NetLogo is a programmable modeling environment for simulating natural and social phenomena that have been used in previous works [14, 25].
We worked with a population of 15 entities. The dimensions of the Euclidian plane where the entities move were and , where the unit of measure for distance in NetLogo is a patch. To generate V-formations, we used the parameters in Table 2. These parameters allow us to define aspects related to vision and movement of the entities in Nathan’s model.
For outlier detection, we considered for our model the following parameters: and percentageOutliers = 20%. Our experiment began from tick 40199 and ended at tick 40400, because in Nathan’s model the generation of V-formations requires a stabilization time (tick 40199 in our experiment, a tick is the unit of measure for time in NetLogo). Time-steps were taken in intervals of 20 ticks, for if we consider a smaller step, a change in the position and direction of an entity would be practically imperceptible. Thus, the total number of steps was 10. Figure 16 shows the position of entities at ticks 40200, 40220, 40380, and 40400 and Table 3 summarizes our results.
4.1.1. Analysis of V-Formation Results
According to the results shown in Table 3, our model classified several sets of entities as V-formations. These results agree with what was expected since Nathan’s model had already stabilized and V-formations were being generated effectively for those times. Moreover, it was necessary to apply the outlier detection algorithm just in two ticks (at ticks 40380 and 40400, see entities in brackets in Table 3, second column). On the other hand, we found that formations showed a high linearity degree since Pearson’s coefficients in all cases were greater than 0.92.
We also applied Andersson’s model. We considered and for the front region of each entity the parameters in Table 2; that is, patches (vision distance) and rad (103°) (vision cone). Andersson’s model only identified formations of two and three entities. This is reasonable as explained in Section 2.2 (see Figure 8). In addition, his model does not give information about the shape of the formation that it identifies; even if we considered a wider front region, his model would not indicate that a formation is, for example, -shaped.
4.2. Experiments for Circular and Doughnut Formations
For experiments with circular and doughnut formations, we also worked in NetLogo and used Wilensky’s model  (a model inspired in Reynolds’ work ), which generates randomized formations of entities in NetLogo.
We worked with a population of 102 entities. The dimensions of the Euclidian plane where the entities move were and . To generate formations, we used the parameters in Table 4.
The model was executed on 1200 consecutive ticks (one run) and we conducted an analysis of circular formations and doughnut formations every 400 ticks. We considered that a set of entities showed a circular/doughnut pattern if the set showed a circular/doughnut formation during all the run (1200 ticks). A total of 100 runs were conducted. The parameters used to detect circular and doughnut formations are shown in Tables 5 and 6. Table 7 summarizes our results for the 100 runs. Figure 17 shows the results for one of the runs.
4.2.1. Analysis of Experiments for Circular and Doughnut Formations
According to the results shown in Table 7, the model classified several sets of entities as circular formations and around three remained throughout the 1200 ticks of a run. Regarding doughnut formations, the model detected around two formations that remained during the 1200 ticks of a run. These results agree with what was expected since Wilensky’s model had already stabilized in NetLogo.
With respect to Andersson’s model, we considered and the parameters in Table 2. His model identified 752 formations during the 100 runs, a value that is greater than the total number of circular and doughnutformations identified during the 100 runs. This is reasonable because with (note that the average number of entities in his formations was four) it is expected that any set of at least three entities that are close to each other (considering patches) will be identified as a formation. However, as our previous experiments with V-formations, his model is unable to indicate the shape of a formation that it identifies.
5. Conclusions and Future Work
In this paper, we propose two models:(I)a model to identify V-formations with outliers. The model considers the location of entities to determine if they form this type of formation during a time interval;(II)a model to identify circular formations with outliers. The model considers the location of entities to determine if they form this type of formation during a time interval. In addition, we proposed an extension to identify doughnut formations with outliers.The rules for model (I) are flexible since they allow V-formations which are not necessarily perfectly aligned, in accordance with the real world. Furthermore, we consider outliers in V-, circular, and doughnut formations, that is, members of the formation that could be temporarily away from it. Our experimental results in NetLogo showed that our models identified these types of formations in such simulation environment where they were generated. We also showed that when we applied Andersson’s model, his model did not give information about the shape of the formation that it identified; that is, his model suffers from lack of semantic information about shape formations.
Regarding future work, we plan to conduct a series of experiments in the stock market where V-formations usually appear . Moreover, we plan to extend our models to identify isolated entities, that is, entities that even if they are considered members of a formation, they follow their own path and do not influence the path of other entities . We also plan to propose models to identify patterns such as convergence, that is, a set of entities that converge or approach a place; divergence, that is, a set of entities that disperse or move away from a place , and self-organization, that is, a set of entities that move as a formation without there being a leader or an entity guiding the rest  or that this leader is unknown to the members [30–32].
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
This paper presents preliminary results of the project “Apoyo al Grupo de Sistemas Inteligentes Web-SINTELWEB” with Quipú code 205010011129, developed at the Universidad Nacional de Colombia, Sede Medellín.
- S. Dodge, R. Weibel, and A. K. Lautenschütz, “Towards a taxonomy of movement patterns,” Information Visualization, vol. 7, pp. 240–252, 2008.
- C. W. Reynolds, “Flocks, herds, and schools: a distributed behavioral model,” ACM SIGGRAPH Computer Graphics, vol. 21, no. 4, pp. 25–34, 1987.
- F. Cattivelli and A. H. Sayed, “Self-organization in bird flight formations using diffusion adaptation,” in Proceedings of the 3rd IEEE International Workshop on Computational Advances in Multi-Sensor Adaptive Processing (CAMSAP '09), pp. 49–52, December 2009.
- P. Seiler, A. Pant, and K. Hedrick, “Analysis of bird formations,” in Proceedings of the 41st IEEE Conference on Decision and Control (CDC '02), vol. 1, pp. 118–123, December 2002.
- C. M. Sewatkar, A. Sharma, and A. Agrawal, “A first attempt to numerically compute forces on birds in v formation,” Artificial Life, vol. 16, no. 3, pp. 245–258, 2010.
- A. Nathan and V. C. Barbosa, “V-like formations in flocks of artificial birds,” Artificial Life, vol. 14, no. 2, pp. 179–188, 2008.
- U. Wilensky and W. Rand, “Making models match: replicating an agent-based model,” Journal of Artificial Societies and Social Simulation, vol. 10, no. 4, p. 2, 2007.
- R. Lukeman, Y.-X. Li, and L. Edelstein-Keshet, “Inferring individual rules from collective behavior,” Proceedings of the National Academy of Sciences of the United States of America, vol. 107, no. 28, pp. 12576–12580, 2010.
- “Jets “should copy birds to save energy”—telegraph,” 2013, http://www.telegraph.co.uk/news/uknews/8846224/Jets-should-copy-birds-to-save-energy.html.
- C. Reynolds, Boids: Background and Update, 2001, http://www.red3d.com/cwr/boids.
- W. L. Romey, “Individual differences make a difference in the trajectories of simulated schools of fish,” Ecological Modelling, vol. 92, no. 1, pp. 65–77, 1996.
- N. Moshtagh, N. Michael, A. Jadbabaie, and K. Daniilidis, “Bearing-only control laws for balanced circular formations of ground robots,” in Proceedings of Robotics: Science and Systems IV, MIT Press, 2008.
- K. Nesbitt, “Interacting with stock market data in a virtual environment,” in Data Visualization, pp. 273–282, Springer, New York, NY, USA, 2001.
- M. Andersson, J. Gudmundsson, P. Laube, and T. Wolle, “Reporting leadership patterns among trajectories,” in Proceedings of the ACM Symposium on Applied Computing (SAC '07), pp. 3–7, New York, NY, USA, March 2007.
- R. H. Güting and M. Schneider, Moving Objects Databases, Elsevier, San Diego, Calif, USA, 2005.
- J. Gudmundsson and M. Van Kreveld, “Computing longest duration flocks in trajectory data,” in Proceedings of the 14th Annual ACM International Symposium on Advances in Geographic Information Systems (ACM-GIS '06), pp. 35–42, November 2006.
- M. Benkert, J. Gudmundsson, F. Hübner, and T. Wolle, “Reporting flock patterns,” Computational Geometry, vol. 41, no. 3, pp. 111–125, 2008.
- J. L. Rodgers and W. A. Nicewander, “Thirteen ways to look at the correlation coefficient,” The American Statistician, vol. 42, no. 1, pp. 59–66, 1988.
- E. Welzl, “Smallest enclosing disks (balls and ellipsoids),” in New Results and New Trends in Computer Science, vol. 555 of Lecture Notes in Computer Science, pp. 359–370, Springer, Berlin, Germany, 1991.
- N. Megiddo, “Linear-time algorithms for linear programming in R3 and related problems,” in Proceedings of the 23rd Annual Symposium on Foundations of Computer Science (SFCS '08), pp. 329–338, IEEE, New York, NY, USA, 1982.
- S. Wilde, Thoughts Forming in a Fish, 2013, http://www.stuartwilde.com/2013/02/thoughts-forming-in-a-fish.
- D. M. Hawkins, D. Bradu, and G. V. Kass, “Location of several outliers in multiple-regression data using elemental sets,” Technometrics, vol. 26, no. 3, pp. 197–208, 1984.
- I. Ben-Gal, “Outlier detection,” in Data Mining and Knowledge Discovery Handbook, pp. 131–146, Springer, New York, NY, USA, 2005.
- S. Papadimitriou, H. Kitagawa, P. B. Gibbons, and C. Faloutsos, “LOCI: fast outlier detection using the local correlation integral,” in Proceedings of the 19th International Conference on Data Ingineering, pp. 315–326, March 2003.
- B. W. Miller, I. Breckheimer, A. L. McCleary et al., “Using stylized agent-based models for population-environment research: a case study from the Galápagos Islands,” Population and Environment, vol. 31, no. 6, pp. 401–426, 2010.
- U. Wilensky, NetLogo Flocking Model, Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, Ill, USA, 1998.
- P. Laube and S. Imfeld, “Analyzing relative motion within groups oftrackable moving point objects,” in Geographic Information Science, pp. 132–144, Springer, New York, NY, USA, 2002.
- J. Gudmundsson, M. Van Kreyeld, and B. Speckmann, “Efficient detection of motion patterns in spatio-temporal data sets,” in Proceedings of the 12th ACM International Symposium on Advances in Geographic Information Systems (GIS '04), pp. 250–257, November 2004.
- J. A. Canizo, J. A. Carrillo, and J. Rosado, Collective Behavior of Animals: Swarming and Complex Patterns, Departament de Matemàtiques, Universitat Autònoma de Barcelona, Barcelona, Spain, 2009.
- Z. Wang and D. Gu, “Distributed cohesion control for leader-follower flocking,” in Proceedings of the IEEE International Conference on Fuzzy Systems (FUZZ-IEEE '07), July 2007.
- H. Su, N. Zhang, M. Z. Q. Chen, H. Wang, and X. Wang, “Adaptive flocking with a virtual leader of multiple agents governed by locally Lipschitz nonlinearity,” Nonlinear Analysis B: Real World Applications, vol. 14, no. 1, pp. 798–806, 2013.
- H. Su, X. Wang, and Z. Lin, “Flocking of multi-agents with a virtual leader,” IEEE Transactions on Automatic Control, vol. 54, no. 2, pp. 293–307, 2009.
Copyright © 2014 Francisco Javier Moreno Arboleda et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.