# Agreement Technologies for Coordination in Smart Cities
## 3 Applications
### Evacuation Coordination in Smart Building
#### 3.2.1 Distributed Architecture  
The objective of the evacuation route guidance architecture (ERGA) is to provide individualised route guidance to evacuees over an app on their smartphones based on the evacuation information received from connected smartphones within the building and the building sensor network. However, even if an evacuee does not have a smartphone available, she could still receive information on relevant evacuation directions, for example, through LED displays on the walls of a smart building. ERGA (Figure 8) consists of user agents (UAs) and a network of smart building (SB) agents. **User agents**. The user agent is associated with the application on a smartphone of an evacuee. It manages and stores all the information that is related to a specific evacuee in the building. Here, we assume that people that enter the building own a smartphone with the evacuation app installed, or they have been provided with some smartphone-like device that runs the app when they start to evacuate. The user agent contains three modules: (i) user preferences and constraints, (ii) user situation awareness module, and (iii) route guidance module. The _user preferences and constraints_ module allows defining constraints such as disabilities (e.g., the use of wheelchair or vision impairment), as well as evacuation-related behavioural disorders (e.g., agoraphobia, social phobia, etc. ), while the preferences include the affiliate ties with other users of the building. The _user situation awareness_ module exploits sensor data (from the smartphone and building) and reasons about the behaviour and location of the user. The presence of an evacuee, together with the information derived from the situation awareness module and the individual preferences and constraints, are passed to the closest SB agent. In order to assure privacy, only certain basic data about the user's situation should be forwarded to the SB agent (e.g., location, running  
Figure 8: Situation-aware real-time distributed evacuation route guidance architecture (ERGA). User agents 1, 2, and m are located in the physical space of smart building (SB) Agent 1 so that they are given route recommendations by SB Agent 1.  
events). In case of an emergency evacuation, the _user interface_ provides the user with personalised navigation guidelines for evacuation. **Smart building agents**. Situation awareness and decision making are distributed in the network of SB agents such that each agent is responsible for the semantic reasoning concerning the safety of its assigned physical space, as well as the evacuation route computation for the evacuees positioned in its physical space. We assumed that each SB agent has at its disposal the information regarding the evacuation network's layout, topology, and safety. A single SB agent controls only its own physical space. The number and location of SB agents is defined when the system is installed. Each SB agent has a corresponding region (Voronoi cell) consisting of all user agents closer to that SB agent than to any other SB agent. Each SB agent contains a _local space situation awareness_ module that perceives the safety conditions of the physical space it controls through combining and analysing the events provided by the sensors and individual user agents located within the smart space it controls. Moreover, each SB agent communicates with its neighbouring SB agents and with the user agents present within its physical space. The _local space situation awareness_ module functions in cycles. At the first phase, the local building sensor data is fused with the data from the locally present user agents. Then, the safety value is deduced. This data is sent to a blackboard or similar globally shared data structure containing the overall network safety values and is visible to all agents. When an SB agent detects an emergency situation, it sends the updated safety value of its physical space to the shared blackboard.