# Georeferenced Dynamic Event Handling

Sérgio Onofre, João Paulo Pimentão, Pedro Sousa

► To cite this version:

Sérgio Onofre, João Paulo Pimentão, Pedro Sousa. Georeferenced Dynamic Event Handling. 6th Doctoral Conference on Computing, Electrical and Industrial Systems (DoCEIS), Apr 2015, Costa de Caparica, Portugal. pp.251-258, 10.1007/978-3-319-16766-4_27. hal-01343491

HAL Id: hal-01343491

https://inria.hal.science/hal-01343491

Submitted on 8 Jul 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Georeferenced Dynamic Event Handling

Sérgio Onofre¹, João Paulo Pimentão² and Pedro Sousa²

¹ Holos SA, Caparica, Portugal, onofre@holos.pt

² Dep. Engenharia Electrotécnica, FCT – UNL, Caparica, Portugal
{pim, pas}@fct.unl.pt

**Abstract.** A fast and efficient response to hazardous events can make the difference between life and death. Using this necessity as premise, surveillance systems are evolving, increasing the number of sensors used in event detection and developing new methods and algorithms for events handling. Nevertheless the timeliness and efficiency of response to events could be improved using new technologies, such as mobile devices with GPS capabilities, georeferenced location of events, and event classification. Having access to events and security agents' locations could improve event's handling in terms of responsiveness and appropriate distribution of work load per agent. Under the scope of a research project Advanced Surveillance System (DVA) a new approach to surveillance systems based in this geographic position of sensors, detected events and security agents was developed. DVA implements new algorithms for events' assignment and processing. This paper describes DVA's new approach to event handling.

**Keywords:** Multi-agents; surveillance; distributed systems; geographic position; mobile; collective behavior; human-machine cooperation, task assignment.

## 1 Introduction

The surveillance systems have been used as an important tool in protecting people and goods. These systems have evolved, from simple monitoring cameras to complex systems that detect different types of events automatically.

DVA's architecture is based in a multi-agent architecture, where events, sensors and human resources are georeferenced. The cooperation between these georeferenced components, allows the creation of a comprehensive surveillance system able to display collective intelligence, supported by the collective awareness in the performance of surveillance and security functions [1].

Event assignment to a human resource depends on several criteria, such as: proximity (distance and "time to"), type of event, workload and profile.

This paper begins by presenting some current approaches used to perform task's assignment, and then introduces a new approach to event assigning and processing, based in the new architecture for Surveillance Systems developed under the scope of the DVA project (http://dva.holos.pt).
## 2 Relationship to Cloud-based Solutions

Using current technological innovations, DVA implements, as basis for its data repository, a Cloud storage system. The use of Cloud allows to recover events' data and status, actions history and latest agents' positions in order to minimize system failures in case of malfunctions.

All the actions executed, GPS positions, event status and agent assignments are saved in the cloud after its executions or when changes occur, storing in, real time, a snapshot of the system is current status. In case of failure of one software agent, the system will deploy another software agent to replace its task, using as reference data stored in the cloud.

## 3 Dynamic Task Assignment

There are several approaches to the problem of dynamic task allocation, especially when it involves different parameters such as tasks type or location and performing agents assigned types or locations. These parameters can encompass a large amount of data that needs to be correlated.

One of the approaches to visualize and interpret large high-dimensional data sets is Self Organizing Maps (SOM). SOM could be used to visualize process states or financial results, by representing the central dependencies within the data on the map [2]. There are several approaches to task assignment based in SOM using neural networks. One of the most recent is presented by Huan Huang et al [3], where a dynamic task assignment and path planning for Multi-AUV (autonomous underwater vehicles) systems in variable oceanic currents environment is proposed. In this work, the authors present two algorithms used to solve their problem: SOM-based algorithm - to assign targets to AUVs; velocity synthesis - to plan the path for each AUV in complex ocean current environment.

Another approach for AUV is presented by Sanem Sariel et al in "Naval Mine Countermeasure Missions" [4], where DEMiR-CF's distributed framework is presented for multirobot teams. This framework integrates incremental task selection schemes, distributed allocation methods, and several precaution routines. Also based in SOM, Anmin Zhu and Simon X. Yang [5], propose a dynamic task assignment for multi-robots in arbitrarily non stationary environments, where: initial neural weights of the network to select the winner, update of the weights, and neighborhood function are defined.

In "UAV Task Assignment", Brett Bethke et al [6], present a health-aware task assignment algorithm for control and coordination of actions of multiple autonomous vehicles in a dynamic environment, improving team's operational reliability and capabilities through better system self-awareness and adaptive mission planning.

A distributed market-based coordination algorithm for a team of robots is presented by Nathan Michael et al [7]. In this case agents will bid for task assignment, assuming that the agents have knowledge of all tasks as well as the maximum number of agents that can be assigned to every individual task. A distributed auction algorithm described in "Distributed Task Assignment for Mobile Agents" by Brandon J. Moore and Kevin M. Passino [8], is used to assign mobile agents to spatially distributed tasks. This approach controls the motion of the agents during the algorithm's progress.
Finally in the "Dynamic Task Assignment in Robot Swarms" by James McLurkin and Daniel Yamins [9], four algorithms are described for dynamic assignment of tasks in multi-robot systems: Random-Choice, Extreme-Comm, Card-Dealer's and Tree-Recolor.

These approaches could be used in different systems as described, nevertheless all of them assume that agents have the same characteristics, not differentiating their suitability for a given task. Also these approaches are not assuming different types of tasks. These assumptions work on general systems, but not on systems that have different types of task to assignment and different types of agents to execute them. Another important issue is the fact that the full set of events is not known at the beginning, with events emerging during execution with different requirements such as agent profile or priority. Also, events' processing time (time used by agents to solve the event) is not the same for each event. This time constrains agent's action to the event, giving more relevance to the workload of each agent.

# 4 Georeferenced Dynamic Event Handling

Considering the weakness of current surveillance systems in terms of cooperation between humans and machines, this paper presents a new approach to events' assignment, improving the efficiency and time response to events. The next sections briefly describe the DVA, the dynamic georeferenced event assignment algorithm and the event handling process.

## 4.1 The DVA System

DVA's surveillance architecture is a multi-agent system, which allows a distributed approach to surveillance by assigning tasks among the agents. Each agent is responsible for very specific tasks according to its profile. The main types of agents present in DVA are: Sensors, Processors, Inference, Action, and Mobile [1]. In summary, Sensor Agents interact directly with the sensors (for example a camera or temperature sensor) and send the data to the Processor Agents. These agents transform raw data into parameters with: value, type of parameter, unit, timestamp and coordinates. The parameters are used by the Inference Agent that, with a set of rules, can infer the existence or not of a given event. If an event is detected, the system automatically creates an Action Agent, which will be responsible by its handling.

Events are described by: event type, priority, location, time of occurrence, status and associated parameters. Event statuses are: **To be checked**, **Confirmed**, **Concluded** and **Canceled**.

In DVA, associated to each status, different actions can be defined, such as:

* **Concluded and Cancelled**: Send email notification; Send SMS notification;

* **To be checked and Confirmed**: Send email notification; Send SMS notification;

* **To be checked**: Assign event for confirmation;

* **Confirmed**: Assign event for processing. Email and SMS notifications can be used to alert users of a new event occurrence, sending event's complementary information.
<figure><img src="image_2.png" /><figcaption>Fig. 3 Georeferenced assignment process</figcaption></figure>

Event assignment process, illustrated in figure 3, uses different criteria (such as agent's types, location and workload) to search and assign an agent to event's confirmation and processing. The event assignment process, executed by the Action Agent, starts by identifying all the Mobile Agents presented in the system and then sorting then, using the algorithm described in the next section, to determine which must be selected.

## 4.2 Dynamic Georeferenced Event Assignment

As mentioned before, in DVA's system, events are typed, prioritized and georeferenced. Also, Mobile Agents (human agents) are typed, according with their function, locomotion mean, georeferenced and tagged with their current workload. This categorization, in terms of events and agents, provides information used to improve the assignment process. Resuming, in terms of categorization:

Events have a: Type (Fire, Earthquake, Flood, Intrusion and Gas); Priority/severity (High, Medium and Low); Location (GPS coordinates).

Agents have a: Type (Profile: Fire-fighter, Policeman, Security Agent or Civil Protection); Workload (Number of Event assigned); Location (GPS coordinates); Locomotion (on foot, by car).

Using these categorizations as criteria, the system can locate and select the most appropriated agent according with event's type, priority and location.

### Distance and Time Criterion

DVA uses Google Maps services to calculate distance and time between two locations, on foot and by car, depending of agent's locomotion means. These values will be used as inputs to determine which agent is closest to event's location. Nevertheless, to ensure DVA's independence from external services, in case of service failure, DVA's system uses Haversine's formula [10], to calculate the distance between locations. The formula used is:

$$D = 2r \arcsin\left(\sqrt{\sin^2\left(\frac{\phi_2 - \phi_1}{2}\right) + \cos(\phi_1)\cos(\phi_2)\sin^2\left(\frac{\lambda_2 - \lambda_1}{2}\right)}\right) \quad (1)$$
Where: D = Distance between two locations; r = Radius of earth (6371000); φ₁, φ₂ = Latitude of location 1 and location 2; λ₁, λ₂ = Longitude of location 1 and location 2;

Using the calculated distance, is possible to estimate the time to reach the location on foot, by car, or other type of vehicle, defining an average speed to each case.

For example, considering 5km/h for walking/running and 50km/h for car's use, to determine the time in minutes, the formula used is:

$$T_{\text{walking}} = \frac{D}{5000} \times 60 \quad \text{and} \quad T_{\text{car}} = \frac{D}{50000} \times 60 + T_{\text{traffic}} \quad (2)$$

As mentioned before, the lowest calculated time (according with agent locomotion) will be used as a criterion to determine the event's assignment. Noteworthy that for the car's use the time delay in case of transit must also be considered, nevertheless in this paper will be considered zero for simplicity.

## Workload Criterion

Each agent can have one or more events assigned and each represents a workload's increase. In addition, event's processing time is undetermined, being different for each event. For example, a small fire event could be solved in 5 minutes with a Fire extinguisher and large fire could last a morning or a day to be extinct. Given this fact, at this time, just the number of events is considered. Nevertheless as the system tested in practice, one may get further insight on how to deal with this issue. The workload criterion will represent, therefore, the number of events currently assigned to an agent.

## Profile Criterion

Depending of the agent's profile, its capability to respond to a given event's type will be different. For example, a policeman will find it harder to respond to a fire than an intrusion, likewise fire-fighters respond better to fires than to intrusions. The next table shows an example of classification, identifying performances of each agent's profile according event's type. In this case, "1" represents the best performance and "5" the lowest.

<table><caption>Table 1. Profile vs event performance.</caption><thead><tr><th></th><th>Police</th><th>Firefighter</th><th>Security</th><th>Civil protection</th></tr></thead><tbody><tr><th>Fire</th><td>3</td><td>1</td><td>3</td><td>3</td></tr><tr><th>Flood</th><td>3</td><td>1</td><td>4</td><td>2</td></tr><tr><th>Intrusion</th><td>1</td><td>5</td><td>2</td><td>5</td></tr><tr><th>Earthquake</th><td>3</td><td>2</td><td>4</td><td>2</td></tr><tr><th>Gas</th><td>3</td><td>3</td><td>4</td><td>2</td></tr></tbody></table>

## Priority and Events List Criteria

When a new event arises, an agent either be free, processing an event or on the way to an event. If the agent is not free, the new event's priority will be compared with current agent's events list priority. The result of this comparison will influence event's assignment, even changing its previous assignments. Current agent's events list could change distance and time to the new event, by adding to the route all current's events that have the same or higher priority than the new event.
For example, if an agent is underway to an event of highest criticality 10km away from its current position and the new event is on the opposite direction, the distance to consider to the new event is not the one from the current position, but the distance to the current event over a distance up to the new event. Nevertheless, if the current event has less criticality than the new one, the agent can interrupt its way, so the current position is considered to calculate the distance. This criterion will influence the distance and time criteria, changing time to reach event according agent's events list and events priority.

### Winner Agent

To identify which agent is the most adequate for event's assignment, an adaptation of the Euclidean formula for three dimensions is used. The three dimensions to consider in the Euclidean formula will be: Time, Workload and Profile. In Euclidean 3D space formula, the distance between two points is defined as:

$$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2} \quad (3)$$

Where "d" is the calculated distance, and "x", "y", "z" represent the different dimensions. The direct application of this formula works when the three-dimensions are defined with same magnitudes i.e. normalized. In DVA, the three-dimensions have very different magnitudes (Time, Workload and profile), thus being necessary to rescale them. Considering this special case, the Euclidean formula was adapted to:

$$Sc_a = \sqrt{\left(\frac{t_a}{30}\right)^2 + \left(\frac{l_a}{5}\right)^2 + \left(\frac{p_a}{5}\right)^2} \quad (4)$$

Where "Sc_a" is agent "a" scores to new event, "t_a" the time to agent "a" reaches the event, "l_a" agent "a" workload and "p_a" agent "a" profile. In DVA 30 minutes is considered by our consultant security experts as the maximum allowable to reach a location, under duress 5 as the maximum workload by agent and 5 as the lowest adequate profile. These values were used to normalize the formula's parameters.

The winner agent will be the one that has the lowest score for the set of agents.

$$W_a = \arg\min_i \{Sc_1, Sc_2, \dots, Sc_n\} \quad (5)$$

### Event Reassignment Procedure

If the assigned agent has to interrupt a previous event handling, caused by a new event (with higher priority) assignment, a new event assignment will be executed for the event whose handling was been interrupted. This procedure will be executed until all the events have an assigned agent.

## 5 Example

This section illustrates an example of DVA's Dynamic georeferenced event assignment application. This example will not use Google Maps services, but the formulas presented to calculate distance and time.

In this example's application, DVA has five agents available to handle events. As a start point, two events will be considered. These two events are already assigned to agents A4 and A2 respectively. Agent A2 is already in its event's location, processing
it and agent A4 is on the way to event E1. When a new event arises, represented as E3, a new assignment process will start. Table 2 illustrates the current system's events list, with its values, and the current situation of agents are shown in table 3.

<table><caption>**Table 2.** System's events list.</caption><thead><tr><th></th><th>Event 1</th><th>Event 2</th><th>Event 3</th></tr></thead><tbody><tr><th>Latitude</th><td>38,64885</td><td>38,66601</td><td>38,63088</td></tr><tr><th>Longitude</th><td>-8,88107</td><td>-8,96553</td><td>-8,91523</td></tr><tr><th>Priority</th><td>High</td><td>High</td><td>Low</td></tr><tr><th>Type</th><td>Fire</td><td>Intrusion</td><td>Intrusion</td></tr></tbody></table>

<table><caption>**Table 3.** Agents current status.</caption><thead><tr><th></th><th>Agent 1</th><th>Agent 2</th><th>Agent 3</th><th>Agent 4</th><th>Agent 5</th></tr></thead><tbody><tr><th>Latitude</th><td>38,68316</td><td>38,66601</td><td>38,63195</td><td>38,64161</td><td>38,67807</td></tr><tr><th>Longitude</th><td>-8,91026</td><td>-8,96553</td><td>-8,94150</td><td>-8,90579</td><td>-8,94150</td></tr><tr><th>Workload</th><td>0</td><td>1</td><td>0</td><td>1</td><td>0</td></tr><tr><th>Event list</th><td>-</td><td>Event 2</td><td>-</td><td>Event 1</td><td>-</td></tr><tr><th>Status</th><td>Stooped</td><td>Handling</td><td>Stooped</td><td>On way</td><td>Stooped</td></tr><tr><th>Profile</th><td>Police</td><td>Security</td><td>Police</td><td>Police</td><td>Firefighter</td></tr><tr><th>Locomotion</th><td>Motorcycle</td><td>Walk</td><td>Walk</td><td>Car</td><td>Car</td></tr></tbody></table>

Using these two tables as inputs, all the criteria will be calculated, according to the agents' profiles setups and locations, its events list and workload. The next table presents the calculated values for each criterion, and the final score for each agent.

<table><caption>**Table 4.** Agents calculation and scoring.</caption><thead><tr><th></th><th>Agent 1</th><th>Agent 2</th><th>Agent 3</th><th>Agent 4</th><th>Agent 5</th></tr></thead><tbody><tr><th>Profile</th><td>5</td><td>4</td><td>5</td><td>5</td><td>2</td></tr><tr><th>Distance</th><td>5,83</td><td>9,57</td><td>2,28</td><td>5,87</td><td>5,72</td></tr><tr><th>Vehicle Time</th><td>7,00</td><td></td><td></td><td>7,04</td><td>6,87</td></tr><tr><th>Walking Time</th><td>69,95</td><td>114,87</td><td>27,41</td><td>70,44</td><td>68,65</td></tr><tr><th>Score</th><td>0,23</td><td>70,31</td><td>27,41</td><td>0,31</td><td>0,64</td></tr></tbody></table>

Comparing the calculated scores, Agent 1 will be the agent assigned to E3. In this case, it will not be necessary to perform any event reassignment.

# 6 Conclusions

DVA was developed to react geographically to events such as intrusion, fires, gas leakage, earthquakes or floods. This system can help prevent or minimize events that can compromise the safety of persons or property. The assignment process described in this paper aims to improve the current surveillance systems, reducing event's time
response and increasing efficiency, by using geographical position of events and humans together with other functional characteristics.

This new approach, may also contribute to reduce the surveillance system dependency on humans, by automating event detection and assignment, thus minimizing human errors and personnel costs. Also, this approach could fulfill some of the gaps found in related work in the literature, such as use of agents with different characteristics, such as speed and profile, and different events types and priorities.

DVA is currently in test, being used as a support system to surveillance of Madan Parque (Science and Technology park). The current tests will allow us to validate the application of the assignment process. Some preliminary results of these tests allowed us to identify areas where the system can be improved. One of the already identified areas for improvement is the relation between agent profile and performance on event types. In fact, we found that the allocation of "hard" values to this relationship is not consensual and the performance could be improved by the use of fuzzy logic.

## References

1. S. Onofre, P. Sousa, and J. Pimentão, "Geo-referenced multi-agent Architecture for Surveillance," in 16th PEMC 2014.

2. T. Kohonen, "The self-organizing map," Proceedings of the IEEE, vol. 78, no. 9, pp. 1464–1480, 1990.

3. H. Huang, D. Zhu, and F. Ding, "Dynamic Task Assignment and Path Planning for Multi-AUV System in Variable Ocean Current Environment," Journal of Intelligent & Robotic Systems, Aug. 2013.

4. S. Sariel, T. Balch, and N. Erdogan, "Naval Mine Countermeasure Missions," IEEE Robotics & Automation Magazine, vol. 15, no. 1, pp. 45–52, Mar. 2008.

5. A. Zhu and S. X. Yang, "A neural network approach to dynamic task assignment of multirobots.," IEEE transactions on neural networks / a publication of the IEEE Neural Networks Council, vol. 17, no. 5, pp. 1278–87, Sep. 2006.

6. B. Bethke, M. Valenti, and J. How, "UAV Task Assignment," IEEE Robotics & Automation Magazine, vol. 15, no. 1, pp. 39–44, Mar. 2008.

7. N. Michael, M. M. Zavlanos, V. Kumar, and G. J. Pappas, "Distributed multi-robot task assignment and formation control," in 2008 IEEE International Conference on Robotics and Automation, 2008, pp. 128–133.

8. B. J. Moore and K. M. Passino, "Distributed Task Assignment for Mobile Agents," IEEE Transactions on Automatic Control, vol. 52, no. 4, pp. 749–753, Apr. 2007.

9. J. Mclurkin and D. Yamins, "Dynamic Task Assignment in Robot Swarms," Robotics: Science and Systems, 2005.

10. R. W. Sinnott, "Virtues of the Haversine," Sky and Telescope, vol. 68, no. 2, p. 159, 1984.

11. J. Claro, B. Dias, B. Rodrigues, S. Onofre, J. P. Pimentão, and P. Sousa, "Autonomous robot integration in Surveillance System," in PEMC 2014.