# Agreement Technologies for Coordination in Smart Cities
## 3 Applications
### Evacuation Coordination in Smart Building
#### 3.2.3 Personalised Route Recommendation  
Our aim is to safely evacuate all the evacuees (or at least as many as possible) within an allotted upper time limit. This limit is usually given by the authorities in charge of evacuation. Initially, we rely on the existence of a set of _predefined evacuation routes_. This set is independent of user constraints. The set of routes is analysed with the objective of generating _personalised efficient evacuation routes_, that is, sets of alternative routes for each particular user, considering the current situation of the building and user constraints (e.g., wheelchair, blind, kids, etc.). This is carried out in two steps. First, those routes that are not _time-efficient_ (e.g., their expected evacuation times are not within the time limit) are filtered out. Next, using a rule-based system, _safe personalised plans_ for each user are created. These routes only include traversing sections that are accessible for that particular user (e.g., avoiding paths through staircases if the person uses a wheelchair). Semantic rules and OWL reasoning are used in this task. For example, the following Jena ([[http://jena.apache.org](http://jena.apache.org)]([http://jena.apache.org](http://jena.apache.org))) rule identifies staircase sections that are not accessible for people in a wheelchair:  
_(?user:hasDisability:Wheelchair)_  
_(?section rdf:type:Staircase)_  
_->_  
_(?section:notAccessibleFor?user)_  
The _personalised efficient evacuation routes_ need to be ranked so as to select one route for each person in the building. We represent the evacuation network by a directed graph \(G=(N,A)\), where \(N\) is a set of \(n\) nodes representing sections, and \(A\) is the set of \(m\) arcs \(a=(i,j)\), \(i,j\in N\) and \(i\
eq j\), representing walkways, doors, gateways, and passages connecting sections \(i\) and \(j\). Let \(O\subseteq N\) and \(D\subseteq N\) be a set of all evacuees' origins and safe exit destinations, respectively. We modelled the evacuation as a unified crowd flow, where each individual is seen as a unit element (particle) of that flow and the objective is to maximise the flow of demands (evacuation requests) with certain constraints. We considered travel time optimisation with path safety, envy-freeness (fairness), and agile paths. **Route safety**. Our objective is to safely evacuate as many evacuees as possible from all origins o \(\in\) O over the safest and the most efficient evacuation paths to any of the safe exits d \(\in\) D. Let us assume that safety status S\({}_{a}\) is given for each arc \(a\in A\) as a function of safety conditions that can be jeopardised by a hazard. Safety can be calculated from sensor data (e.g., temperature, smoke, etc. ), and using space propagation models and aggregation functions to combine different influences and variables measured. A thorough description of this field can be found in, for example [35; 36]. We normalised it to the range [0, 1], such that 1 represents perfect conditions while 0 represents conditions impossible for survival, with a critical level for survival 0 < \(S^{cr}\) < 1 depending on the combination of the previously mentioned parameters. If each constituent arc \(a\in k\) of a generic path \(k\) has safety \(S_{a\in k}\geq S^{cr}\), then path \(k\) is considered to be safe. On the contrary, a path is considered unsafe and its harmful effects may threaten the evacuees' lives. The proposed evacuation paths should all satisfy safety conditions \(S^{k}\geq S^{cr}\). However, when such a path is not available, a path with the maximal safety should be proposed where the travel time passed in the safety-jeopardised areas should be minimised. Since safety may vary throughout a path, here, we introduce a normalised path safety that balances the minimal and average arc safety values:  
\[S^{k}=\sqrt[||\epsilon|]{\prod_{a\in k}S_{a}},\;\forall k\in P_{o},\;o\in O\]  
where \(P_{o}\) is the set of simple paths from origin \(o\in O\) to an exit. **Fair route recommendation**.