Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

Emergency evacuation is the process of movement of people away from the threat or actual occurrence of hazards such as natural disasters, terrorist attacks, fires and bombs. In this paper, we focus on evacuation from a building, though the ideas can be applied to city and region evacuation. We are motivated by the evacuation drill that regularly happens in our company Tata Consultancy Services. We are developing a system SmartEvacTrak [1] for people counting and coarse-level localization for evacuation of large buildings. Safe evacuation of thousands of employees in a timely manner, so that no one is left behind, is a major challenge for the building administrators. Time is the main parameter in our model. The travel time between different areas of the building is part of the input and the evacuation time is the output. In the following discussion, we use {graph, network}, {node, vertex}, {edge, arc}, and {path, route} interchangeably.

We have a building along with its floor plan. Employees are present in some portions (rooms) of the building. There are some exits on the floor. Every corridor has a capacity, which is the number of employees that can pass through the corridor per unit time. Every corridor also has a travel time, which is the time required to move from the start of the corridor to the end. The goal is to suggest a feasible route for each employee so that he can be guided to an exit. It must be ensured that at any time the number of employees passing through a corridor does not exceed it’s capacity.

A complex building does not provide its occupants with all the information required to find the optimal route. In an emergency, people tend to panic and do not always follow the paths suggested by the algorithm. They are not given enough time to establish a cognitive map of the building. To address this issue, we need to model the behavior of people in emergency situations. We have proposed a simple randomized behavior model and analyzed it. The expected evacuation time comes out to be quite good. None of the previous works considered any behavior model of people.

2 Related Work

In this section, we give a summary of different algorithms for the evacuation route planning problem. Skutella [12] has a good survey on the network flows over time problem. The monograph by Hamacher and Tjandra [4] surveys the state of the art on the mathematical modeling of evacuation problems. Both these papers give a good introduction and comprehensive treatment to this topic.

The LP based polynomial time algorithm for evacuation problem by Hoppe and Tardos [5] uses the ellipsoid method and runs in \(O(n^{6}T^{6})\) time, where n is the number of nodes in the graph and T is the evacuation egress time for the given network. It uses time-expanded graphs for the network, where there are \(T+1\) copies of each node. The expression for time complexity shows that it is not scalable even for mid-sized networks. Another disadvantage is that it requires the evacuation egress time (T) apriori, which is not easy to estimate. As the time complexity is a function of T, it is not a fully polynomial time algorithm.

One of the earliest algorithms by Lu et al. [8] is Capacity Constrained Route Planner (CCRP). CCRP uses Dijkstra’s generalized shortest path algorithm to find shortest paths from any source to any sink, provided that there is enough capacity available on all nodes and edges of the path. An important feature of CCRP is that instead of a single value which does not vary with time, edge capacities and node capacities are modeled as time series (function of time). Here, we need to update edge and node capacities for each time period. The running time of CCRP is \(O(p(m + n \log n))\), (\(O(pn \log n)\) for sparse graphs, where \(m = O(n)\)) and space complexity is \(O((m + n)T)\) (O(nT) for sparse graphs). Here m and n denotes the number of edges and the number of vertices of the graph respectively, p denotes the number of evacuees, and T denotes the evacuation egress time. As space complexity is always at most the time complexity, the running time of CCRP is implicitly dependent on T. For sparse graphs, \(nT \le pn \log n\), i.e., \(T \le p \log n\). So, for sparse graphs the evacuation egress time is at most \(O(p \log n)\). The space complexity of O(nT) and unnecessary expansion of source nodes in each iteration are two main disadvantages of CCRP.

To overcome the unnecessary expansion in each iteration, Yin et al. [14] introduced the CCRP++ algorithm. The main advantage of CCRP++ is that it runs faster than CCRP. But the quality of solution is not good, because availability along a path may change between the times when paths are reserved and when they are actually used.

Min and Neupane [11] introduced the concept of combined evacuation time (CET) and quickest paths, which considers both transit time and capacity on each path and provides a fair balance between them. Let there be k edge-disjoint paths \(\{P_{1},P_{2},\ldots ,P_{k}\}\) from source node s to sink node t. Then, the combined evacuation time is given by,

$$\begin{aligned} CET(\{P_{1},P_{2},\ldots , P_{k}\}) = \left\lceil { \dfrac{p + \sum _{i = 1}^{k}C_{i}T_{i}}{\sum _{i = 1}^{k}C_{i}}}\right\rceil -1 \end{aligned}$$
(1)

where \(C_{i}\) and \(T_{i}\) denotes the capacity and transit time of path \(P_{i}\) respectively, and p denotes the number of evacuees. Time required to evacuate p people via a path P having transit time T and capacity C is \(T + \left\lceil \frac{p}{C} \right\rceil - 1\). So, \(P_{i}\) is said to be the quickest path if and only if \(T_{i} + \left\lceil \frac{p}{C_{i}} \right\rceil -1 \le T_{j} + \left\lceil \frac{p}{C_{j}} \right\rceil -1\), for all \(j \in \{1, \ldots , k\} \setminus \{i\}\).

The formula for combined evacuation time not only gives an exact expression for the evacuation time, but it also gives the number of people that will be evacuated on each path. The intuition behind the concept of CET is that paths having lesser arrival time will evacuate more groups. This algorithm is known as QPER (Quickest Path Evacuation Routing). The algorithm finds all edge-disjoint paths between a single source and a single sink and orders them according to the quickest evacuation time (calculated using CET) and adds them one by one. The algorithm is fairly simple. It does not use time-expanded graphs and there is no need to store availability information at each time stamp, as only edge-disjoint paths are considered. But their algorithm is limited to single source and single sink evacuation problems. Besides these, the addition of paths is not consistent, i.e., a path added at some point of time may be removed by the algorithm at a latter point of time, in case removal makes the solution better.

The solutions produced by CCRP++ and QPER do not follow semantics of CCRP, i.e., the solution quality is not better than that of CCRP. Recently Gupta and Sarda [3] have given an algorithm called CCRP*, where evacuation plan is same as that of CCRP and it runs faster in practice. Instead of running Dijkstra’s algorithm from scratch in each iteration, they resume it from the previous iteration.

Kim et al. [6] studied the contraflow network configuration problem to minimize the evacuation time. In the contraflow problem, the goal is to find a reconfigured network identifying the ideal direction for each edge to minimize the evacuation time, by reallocating the available capacity. They proved that this problem is NP-complete. They designed a greedy heuristic to produce high-quality solutions with significant performance. They also developed a bottleneck relief heuristic to deal with large numbers of evacuees. They evaluated the proposed approaches both analytically and experimentally using real-world data sets. Min and Lee [10] build on this idea to design a maximum throughput flow-based contraflow evacuation routing algorithm.

Min [9] proposed the idea of synchronized flow based evacuation route planning. Synchronized flows replace the use of time-expanded graphs and provides higher scalability in terms of the evacuation time or the number of people evacuated. The computation time only depends on the number of source nodes and the size of the graph.

Dressler et al. [2] uses a network flow based approach to solve this problem. They use two algorithms: one is based on minimum cost transshipment and the other is based on earliest arrival transshipment. They evaluate these two approaches using a cellular automaton model to simulate the behavior of the evacuees. The minimum cost approach does not consider the distances between evacuees and exits. It may fail if there are exits very far away. Problems also arise if a lot of exits share the same bottleneck edges. The earliest arrival approach uses an optimal flow over time and thus does not suffer from these problems. But the exit assignment computed by the earliest arrival approach may not be optimal.

There are some previous works which considered the behavior of people in an emergency. Løvs [7] proposed different models of finding escape routes in an emergency. Song et al. [13] collect big and heterogeneous data to capture and analyze human emergency mobility following different disasters in Japan. They develop a general model of human emergency mobility using a Hidden Markov Model (HMM) for generating or simulating large amount of human emergency movements following disasters.

Fig. 1.
figure 1

A building graph, where vertices represented as squares denote exits. The vertex name and capacity are written inside a vertex. The edge capacity and travel time are written beside an edge. Persons residing on a vertex are specified beside that vertex.

3 Problem Definition and Model

The building floor plan can be represented as a graph \(G=(V,E)\), where V and E are the set of vertices and edges respectively. The number of vertices and edges are n and m respectively. Nodes represent rooms, lobbies and intersection points and arcs represent corridors, hallways and staircases. Some nodes in the building having significant number of people are modeled as source nodes. The exits of a building are represented as sink nodes. Each node has a capacity, which is the maximum number of people that can stay at that location at any given time and an occupancy, which is the number of people currently occupying the location. Here, p is the total number of people who needs to be evacuated.

Each edge has a capacity, which is the maximum number of people that can traverse the edge per unit time and a travel time, which is the time needed to travel from one node to another along that edge.

Figure 1 shows a building graph that consists of 10 vertices and 15 edges. For each vertex v, it’s name and the capacity are specified by a pair of the form (vc(v)). A vertex representing an exit is drawn as a square, while the others are drawn as circles. For each edge e, the capacity and the travel time are specified on the edge by the pair (c(e), d(e)). The goal is to find the exit and the path (route) for each employee, subject to the constraint that the number of source-sink paths passing through an edge does not exceed the capacity of the edge at any unit time interval. The objective function we want to minimize is the total time of evacuation, that is the time at which the last employee is evacuated. Let’s define this as the evacuation time. In the quickest flow problem, we are given a flow value f. We want to minimize the time T in which a feasible flow of value at least f can be sent from sources to sinks.

4 The Single Source Single Sink Problem

In this section, we focus on the single source single sink evacuation (SSEP) problem. In real life, single source single sink evacuation problem has many applications. For example, if all the people are in an auditorium, and there is only one exit in the building, we want to evacuate people as soon as possible, when there is an emergency. Throughout the rest of this paper, s denotes the source and t denotes the sink. Before proceeding further let’s have some definitions.

Definition 1

Transit time of a path is the sum of the transit times of all the edges in P from s to t, and is denoted as T(P).

Definition 2

Destination arrival time of a path is the time required by a person to move from s to t using path P subject to prior reservations, and is denoted as DA(P). In other words, we can say that DA(P) is the sum of T(P) and any intermediate delay. Note that \(DA(P) \ge T(P)\).

Definition 3

Capacity of a path is the minimum of the capacities of all nodes and edges present in the path P, and is denoted by C(P).

Definition 4

A node (edge) on a path P is called saturated if the capacity of the node (edge) equals the capacity of P.

Definition 5

Two paths \(P_{1}\) and \(P_{2}\) are said to be distinct if \(V_{1} \ne V_{2}\) or \(E_{1} \ne E_{2}\), where \(V_{1},V_{2}\) are the set of vertices and \(E_{1},E_{2}\) are the set of edges on the paths \(P_{1}\) and \(P_{2}\) respectively.

4.1 Limitation of QPER Algorithm for SSEP

Using the concept of combined evacuation time, Min et al. [11] gave an algorithm QPER for the single source single sink evacuation problem. Their algorithm works well when we have already discovered k edge-disjoint paths. In QPER, paths from s to t are added one by one in ascending order of quickest paths, and new CET is calculated after each path addition. But after addition of a path, the new CET may be less than the transit time of a previously added path. In that case, we have to delete those paths which have higher transit time than the current CET. This in turn increases the running time, since the addition of paths is not consistent.

We overcome the above limitations of the algorithm by adding paths in increasing order of transit time in each iteration till the transit time of the currently discovered path exceeds the CET of the previously added set of paths. Note that, we need not discover all possible paths from source to sink, since unlike QPER, if a path is added in any iteration, it will remain till the end. The CET after each iteration will be monotonically non-increasing.

4.2 Modified Algorithm for SSEP When We Are Given k Edge-Disjoint Paths

Let \(P_{1}, P_{2},\ldots , P_{k}\) be k edge-disjoint paths from s to t in ascending order of their transit time, i.e., \(T_{1} \le T_{2} \le \ldots \le T_{k}\). We define, \(S_i = \{P_1, \ldots , P_i\}\). We add paths to our set of routes (\(\mathcal R\)) in the following fashion.

  1. 1.

    \(\mathcal{R} = \{P_{1}\}\).

  2. 2.

    \(CET = CET(S_{1})\).

  3. 3.

    Start with \(i = 1\) Execute step 4 and 5 till \(i \le k\) and \(T_{i + 1} \le CET\).

  4. 4.

    Add path \(P_{i + 1}\) to R.

  5. 5.

    \(CET = CET(S_{i + 1})\) and \(i\leftarrow i + 1\).

  6. 6.

    Return \(\mathcal{R}\).

Lemma 1

If \(S_{j} = \{P_{1}, P_{2},\ldots , P_{j}\}\), \(j \le k\) is returned as \(\mathcal{R}\) by the above algorithm then

  1. 1.

    \(T_{l + 1} \le CET(S_{l}), 1 \le l < j\)

  2. 2.

    \(CET(S_{1}) \ge CET(S_{2}) \ge \ldots \ge CET(S_{j})\)

  3. 3.

    \(CET(S_{j}) \le CET(S_{l}), j < l \le k\).

Proof

Directly follows from the algorithm.

Lemma 2

If \(S_{j} = \{P_{1}, P_{2},\ldots , P_{j}\}\), \(j \le k\) is returned as \(\mathcal{R}\) by above algorithm then \(T_{1} \le T_{2} \le \ldots \le T_{j} \le CET(S_{j}) \le CET(S_{j - 1}) \le \ldots \le CET(S_{1}) \)

Proof

Here \(T_{1} \le T_{2} \le \ldots \le T_{j}\) and by Lemma 1 \(CET(S_{j}) \le CET(S_{j - 1}) \le \ldots \le CET(S_{1})\). So, the only thing remains to prove is \(T_{j} \le CET(S_{j})\). Let by contrary assume that \(T_{j} > CET(S_{j})\). By putting formula for \(CET(S_{j-1})\) from Eq. (1) and then solving we get \(T_{j} > CET(S_{j - 1})\). By Lemma 1, \(T_{j} \le CET(S_{j - 1})\). This is a contradiction.

Lemma 3

If \(S_{j} = \{P_{1}, P_{2},\ldots , P_{j}\}\), \(j \le k\) is returned as \(\mathcal{R}\) by above algorithm then \(CET(S_{j}) \le CET(S_{j} \setminus \{P_i\}),\) \( 2 \le i \le j\).

Proof

We will prove this statement by contradiction. Let \(CET(S_{j}) > CET(S_{j} \setminus \{P_i\})\), which implies \(T_{i} > CET(S_{j})\) by putting formula for CET from equation-1. It is not possible by Lemma 2. Hence the claim holds.

Remark 1

The addition of paths by the above algorithm is consistent, i.e. if a path is added then it will remain till the end of the algorithm execution.

Fig. 2.
figure 2

An example to show that parallel flows can be sent on non edge-disjoint paths.

4.3 An Important Observation

In Fig. 2, ordered pair (CT) denotes capacity and transit time of an edge. There are two paths \(P_{1}\) and \(P_{2}\) between s and t.

  • \(P_{1} : s-B-C-E-G-t\), \(C(P_{1}) = 4\), \(T(P_{1}) = 19\).

  • \(P_{2} : s-A-C-E-F-t\), \(C(P_{2}) = 6\), \(T(P_{2}) = 23\).

\(P_{1}\) and \(P_{2}\) are not edge-disjoint, but common edge CE has capacity of 10 i.e. \(C(P_{1}) + C(P_{2}) = C(CE)\). So, flow can be sent through \(P_{1}\) and \(P_{2}\) in parallel and we may think like we have two copies of edge CE one having capacity 4, dedicated for \(P_{1}\) and other one having capacity 6, dedicated for \(P_{2}\). We name such set of paths as “virtually edge disjoint”. Now it is easy to observe that to apply the formula of combined evacuation time on a set of paths, defined in Eq. (1), the necessary condition is they should be virtually edge disjoint rather than edge disjoint.

4.4 Our Algorithm for SSEP

The main idea of the algorithm is to find set of virtually edge disjoint paths one by one and calculate CET as in Sect. 4.2 after each path addition till it satisfies a required condition.

We discover paths one by one in the order of their transit time as follows. We find path \(P_{1}\) along with its capacity \(C_{1}\) having minimum transit time and decrease capacities of each node and path of \(P_{1}\) by its capacity \(C_{1}\) permanently and delete saturated nodes and edges. Let’s say we have already added paths \(\{P_{1},~P_{2},\ldots ,~P_{i}\}\), \(i \ge 1\), and updated the capacities of nodes and edges along with deletion of required saturated nodes and edges. Note that \(P_{1},~P_{2},\ldots ,~P_{i}\) are virtually edge disjoint. Hence formula of CET can be applied. In next iteration we discover a path \(P_{i+1}\) in residual graph iff t is reachable from s and \(i < p\)(see line number-4 in Algorithm 1). We add the discovered path \(P_{i+1}\) iff \(T_{i+1} \le CET(S_{i})\)(see line number-6 in Algorithm 1). As we delete saturated nodes and edges in each iteration when a path is added we discover paths in maximum of \(m+n\) iterations i.e. at max \(m+n\) paths and we are not going to discover more than p paths as each path can evacuate atleast one people. So, our algorithm restricts finding exponential number of possible paths from s to t. More clearly we discover at most \(min(m+n, p)\) paths.

Here one may think of we are adding paths only based on transit time without considering capacity. Note that selection of a path for addition is based on transit time, addition of selected path is done if its transit time less than or equal to previously calculated CET, which is function of both capacities and transit times of previously added paths. So, our addition of paths to the solution is based on both transit time and capacities of paths implicitly.

figure a

4.5 Running Time Analysis of SSEP

From the above discussion it is clear that at most \(min(m+n, p)\) paths will be discovered and equivalently our algorithm runs for at most \(min(m+n, p)\) iterations. As each path discovery can be done in \(O((m + n \log n)\) time, using well known Dijkstra algorithm for shortest path, our entire algorithm requires \(O(\min (m + n, p)(m + n \log n)\) time. Assuming \(m = O(n)\), this becomes \(O(\min (n, p) \cdot n \log n)\), which is always at most \(O(p n \log n)\). Recall that the time-complexity of CCRP is \(O(p n \log n)\). Hence, SSEP always performs faster than CCRP. In real life, the number of evacuees is much larger than the number of vertices, so SSEP runs much faster than CCRP.

4.6 CCRP Algorithm for SSEP and Some Observations

CCRP [8] is an industry standard algorithm. Many studies have shown that the quality of solution produced by CCRP is better than most heuristic algorithms. We present the CCRP algorithm in simplified form, when there is a single source and a single sink.

  1. 1.

    s is added to the priority queue. The nodes in priority queue are ordered based on the distance calculated from s during algorithm execution.

  2. 2.

    While there are evacuees in s, find the path P having minimum destination arrival time from s to t taking the capacity of the various nodes and edges into consideration.

  3. 3.

    Find capacity of P and reserve capacity along the path for a group of size equal to the minimum capacity.

  4. 4.

    If there are evacuees left at s, go to step 2.

Definition 6

(Group Size of a Path). In each iteration of CCRP one path (say \(P_{i}\)) from s to t is discovered along with maximum number of people that can be evacuated through that path. This is defined as the group size of \(P_{i} \) for this iteration.

For the below sections we denote \(T_{i}\), \(C_{i}\) as transit time and group size of path \(P_{i}\) respectively.

Observation 1

Let’s consider execution of single source(s) single sink(t) evacuation network by CCRP algorithm. Let \(P_{1}, P_{2}, \ldots , P_{k}\) be distinct paths(not necessarily edge-disjoint) from s to t discovered by CCRP such that \(T_{1} \le T_{2} \le \ldots \le T_{k}\). Here \(A_{i}(T)\) is any permutation of \(P_{1}(T), P_{2}(T), \ldots , P_{i}(T)\) and \(P_{j}(T)\) is the path \(P_{j}\) with destination arrival time T.

Phase 1: \(A_{1}(T_{1}), A_{1}(T_{1} + 1),\ldots , A_{1}(T_{2} - 1)\)

\(\ldots \)

Phase i: \(A_{i}(T_{i}), A_{i}(T_{i} + 1),\ldots ,A_{i}(T_{i + 1} - 1), i < k\)

\(\ldots \)

Phase k: \(A_{k}(T_{k}), A_{k}(T_{k} + 1),\ldots ,A_{k}(T_{k} + \epsilon - 2),A_{k}(T_{k} + \epsilon - 1) \).

Here \(\epsilon \) is the maximum number of times any path is discovered in phase k. Note that \(\epsilon \ge 1\) as \(P_{k}\) is discovered at least once.

Number of times any path discovered in phase-k is either \(\epsilon \) or \(\epsilon -1\). It is because of the following argument. By definition of \(\epsilon \) there exists a path (say \(P_{m}\)) discovered \(\epsilon \) number of times. Let \(P_{l}\) is a path discovered less than \(\epsilon - 1\) number of times. In this case CCRP algorithm would have returned \(P_{l}\) instead of \(P_{m}\), because using path \(P_{l}\) some people can reach destination before or at time \(T_{k} + \epsilon - 2\) and \(P_{m}\) has earliest destination arrival time of \(T_{k}+\epsilon -1\).

Consider the point when all k paths have been returned \(\epsilon - 1\) times in phase k. Now we may not have enough evacuees such that CCRP will return each path once. We can add some virtual evacuees such that we will use all the paths exactly \(\epsilon \) times in phase-k and for simplicity we can say \(\epsilon \) is the number of times path \(P_{k}\) is returned by CCRP.

Here it is easy to note that evacuation egress time \(T_{Evac}^{CCRP} = T_{k} + \epsilon -1\) and it is independent of permutation of paths in any \(A_{i}(T)\). So, fix a permutation i.e. \(A_{i}(T) = P_{1}(T), P_{2}(T), \ldots , P_{i}(T)\). Fixing up this permutation doesn’t affect the solution, but it will make the analysis easier.

Observation 2

Let \(P_{1}, P_{2}, \ldots , P_{k}\) be distinct paths(not necessarily edge- disjoint) from s to t discovered by CCRP such that \(T_{1} \le T_{2} \le \ldots \le T_{k}.\) Here \(P_{i}\) is the shortest path discovered after deletion of saturated nodes/edges of \(P_{1}, P_{2},\ldots ,P_{i - 1}\).

Remark 2

Algorithm 1 finds a path even after we have deleted saturated nodes and edges of all previously discovered path, if it satisfies the conditions given on line numbers 4 and 6.

Observation 3

Let’s consider the sequence of paths as in Observation 1 with the fixed permutation of each \(A_{i}(T)\) as explained. A path \(P_{i}\) may be returned in many iterations of CCRP. Group size returned in all iterations are equal possibly except last time when \(P_{i}\) is discovered(in phase k) in case we don’t have enough evacuees left at s. This type of situation might happen only once as we are dealing with single source single destination network and it can happen in phase k after or while discovery of \(P_{k}\) for the first time. In such cases we can add some virtual evacuees to s so that group size of a path remains same in all iterations. It will not affect evacuation egress time but it will make the analysis easier.

Remark 3

We can represent each path discovered by CCRP as an ordered pair of path and its group size. Algorithm 1 returns a path with maximum number of people who can travel by that path at any time. As each path is discovered only once, we can represent each path along with the capacity as an ordered pair.

4.7 Analysis of Algorithm 1

Lemma 4

Let \((P_{1}, C_{1}), (P_{2},C_{2}), \ldots , (P_{k}, C_{k})\) be distinct paths (not necessarily edge-disjoint) from s to t in order of their transit time discovered by CCRP.

  1. 1.

    Number of iterations that will return path \(P_{i} \) is \(T_{k} - T_{i} + \epsilon \), \(1 \le i \le k \), where \(\epsilon \) denotes number of iterations that returns path \(P_{k}.\)

  2. 2.

    Number of iterations that will return path \(P_{i}\) before phase j is \(T_{j} - T_{i}\), where \(i \le j \le k\).

  3. 3.

    The same paths will be returned by Algorithm 1, and \(T_{1} \le T_{2} \le \ldots \le T_{k}\).

Proof

Parts (1) and (2) directly follows from Observation 1. For part (3), by induction we can prove that algorithm 1 finds each path \(P_{j}, 1 \le j \le k\) with available capacity \(C_{j}\).

Base Case: \(j = 1\) i.e. \((P_{1},C_{1})\) is added by Algorithm 1. This is obvious.

Inductive Step: Suppose paths \((P_{1},C_{1}),\ldots ,(P_{j},C_{j}), 1 \le j < k\) have been added by Algorithm 1. We have to prove that Algorithm 1 will also add \((P_{j+1}, C_{j+1})\).

Part 1: From Observation 2, \(P_{j +1 }\) is the shortest path from s to t in residual graph i.e. if we delete saturated node(s) and/or edge(s) of the paths \(P_{1},P_{2},\ldots ,P_{j}\). Algorithm 1 also adds paths one by one after deleting saturated node(s) and/or edges(s) of previously discovered paths. So, structure of the graph remains same after addition of these j paths both in CCRP and Algorithm 1. So, \(P_{j + 1}\) is also the best path w.r.t. transit time in residual graph according to Algorithm 1. As \(P_{j + 1}\) is the best path in residual network either no paths will be added or \(P_{j + 1}\) will be added to set of routes in Algorithm 1.

Let by contrary assume that Algorithm 1 doesn’t add path \(P_{j + 1}\) i.e. Algorithm 1 does not add any path. Clearly it may happen due to one of the two reasons i.e. either t is not reachable from s or number of paths discovered \(= p\)(line number-4 in Algorithm 1) or \(T_{j + 1} > CET(S_{j})\)(line number-6 in Algorithm 1).

Case 1(a): (t is not reachable from s)

As CCRP is able to find path \(P_{j + 1}\), t is reachable from s. Contradiction!

Case 1(b): (Number of paths discovered \(=p\))

It is clear from CCRP Algorithm given in Sect. 4.6 that it does not discover more than p paths as in each path at least one people will be evacuated. As CCRP finds path \(P_{j+1}\), number of paths discovered before discovery of \(P_{j+1}\) by Algorithm 1 can’t be more than \(p-1\).

Case 2: ( \(T_{j + 1} > CET(S_{j})\))

Just come back to the point when CCRP adds path \((P_{j + 1}, C_{j + 1})\) for the first time. It can happen only in phase \(j + 1\). From Lemma 4 \(P_{i}\) is returned in \(T_{j + 1}-T_{i} , 1 \le i \le j < k\), iterations before phase \(j + 1\). As \(P_{j + 1}\) discovered in phase \(j + 1\) for the first time total number of people evacuated through \(P_{i}\) before discovery of \(P_{j + 1}\) is at least \(T_{j + 1}-T_{i}\). As group size of path \(P_{i}\) is \(C_{i}\), total number of people evacuated before discovery of \(P_{j + 1}\) is at least \(\sum _{i = 1}^{j}C_{i}(T_{j + 1} - T_{i})\). As CCRP adds the path \(P_{j + 1}\) we can say that still there are people to be evacuated. Also from Observation 3 virtual evacuees are added while or after addition of path \(P_{k}\). So, total number of people evacuated before discovery of \(P_{j + 1}\) is strictly less than p. Mathematically \(\sum _{i = 1}^{j}C_{i}(T_{j + 1} - T_{i}) < p\), which implies \(T_{j + 1} \le CET(S_{j}) \). Contradiction!

Part 2: Now one thing remains to prove is available capacity of the path \(P_{j + 1}\) returned by Algorithm 1 is also \(C_{j + 1}\). If \(P_{j + 1}\) doesn’t share any node or edge with previously discovered path we are done. So, assume that there is some node or edge x which is common to both \(P_{j + 1}\) and some \(P_{i}\), \(1 \le i \le j\). Here we argue considering x as a node and argument for x as an edge is same. Let \(t_{n}^{k}\) denotes time required to travel from s(source) to node n via path \(P_{k}\) with out intermediate delay. Observe that \(t_{x}^{j+1} \ge t_{x}^{i}\). From observation 1 \(P_{j + 1}\) is discovered in phase \(j + 1\) for the first time by CCRP algorithm. In phase \(j + 1\) consider \(A_{j+1}(T_{j + 1})\). \(P_{i}\) has been discovered once before discovery of \(P_{j + 1}\) with its destination arrival time \(T_{j + 1}\) i.e. it has made a reservation of \(C_{i}\) at x for the time instance \(t_{x}^{j+1}\) at node x. Now arrival time of evacuees via \(P_{j + 1}\) to x is also \(t_{x}^{j + 1}\). At \(t_{x}^{j+1}\) we can not use that capacity of \(C_{i}\) for evacuees routing via \(P_{j + 1}\). In other words as if node x has dedicated capacity of \(C_{i}\) at time \(t_{x}^{j + 1}\) for evacuees routing via \(P_{i}\) and that can’t be used by evacuees routing via \(P_{j + 1}\). Here we have not assumed anything on i and x. For each such i and x, \(P_{j + 1}\) can’t use the capacity of \(C_{i}\) at time \(t_{x}^{j+1}\) at node x. It is equivalent to permanently decrementing the capacity of such x’s by corresponding \(C_{i}\), because from observation 1 whenever \(P_{j + 1}\) is discovered prior to that a reservation of \(C_{i}\) must have been done at common node x(of \(P_{i}\) and \(P_{j + 1}\)) by path \(P_{i}\). Now come back to Algorithm 1. By induction each path \(P_{i}\), \(i \le j\) is returned with capacity \(C_{i}\). We find path \(P_{j + 1}\) by decrementing the capacity of each path by \(C_{i}\) permanently. So, just before addition of \(P_{j + 1}\) structure of the graph remains same w.r.t. capacity both in CCRP and Algorithm 1. From this discussion we can say that capacity of path \(P_{j + 1}\) returned by Algorithm 1 is \(C_{j + 1}\).

Theorem 1

The evacuation time of the solution given by Algorithm 1 is at most as that of the CCRP Algorithm for single source and single sink.

Proof

Let \((P_{1}, C_{1}), (P_{2}, C_{2}), \ldots , (P_{k}, C_{k})\) be distinct paths (not necessarily edge-disjoint) from s to t in order of their transit time (neglecting delays) discovered by CCRP. By Lemma 4, Algorithm 1 also returns the same set of paths. From Observation 1, we can say that evacuation time of CCRP is \(T_{Evac}^{CCRP} = T_{k} + \epsilon - 1\). Evacuation time of Algorithm 1 is \(CET(S_{k})\). Also from Lemma 4, number of people that are evacuated through \(P_{i}\) is \(C_{i}(T_{k}-T_{i} +\epsilon )\). As All people have been evacuated we can write \(\sum _{i = 1}^{k}{C_{i}(T_{k}-T_{i} + \epsilon )} \ge p\), which implies \(T_{Evac}^{CCRP} \ge CET(S_{k})\).

Theorem 2

Upper bound on the evacuation time given by CCRP (hence by Algorithm 1) for single source single sink network is \(\left\lfloor \frac{p}{k} \right\rfloor + (n - 1)\tau - 1\), where p is the number of evacuees, n is the number of nodes in the graph, \(\tau \) is the maximum transit time of any edge and k is the number of paths used by CCRP (and Algorithm 1).

Proof

From Lemma 4, number of iterations executed by CCRP is \(\sum _{i=1}^{k}(T_{k} - T_{i} + \epsilon ) \le p\), as in each iteration at least one person will be evacuated. Hence, \(T_{Evac}^{CCRP} \le \left\lfloor \frac{p}{k}\right\rfloor + (n-1)\tau - 1\).

5 Randomized Behavior Model of People

The idea of combined evacuation time [11] can be extended by considering probabilistic behavior of people. Suppose in an evacuation, people do not follow the paths suggested by Algorithm 1 (or CCRP). Let’s say with probability \(\alpha >0\) a person follows suggested path and with probability \(1-\alpha \) he follows the shortest path (to the nearest exit). In this situation, we have to redistribute people via various paths. If we suggest \(x_{i}\) persons via \(P_{i},i \ne 1\), then the number of persons who will follow \(P_{i}\) and \(P_{1}\) is \(\alpha x_{i}\) and \((1-\alpha )x_{i}\) respectively (in expectation). The total number of people following \(P_{1}\) and \(P_{i}\) are \(x_{1} + \sum _{i=2}^{k}(1-\alpha )x_{i}\) and \(\alpha x_{i},i\ne 1\) respectively. Expected time at which the last person will arrive at destination via \(P_{1}\) is \(T_{1} + \frac{ x_{1} +\sum _{i = 2}^{k}(1-\alpha )x_{i}}{C_{1}}-1 \). Expected time at which last person will arrive at destination via \(P_{i}\) is \(T_{i} + \frac{\alpha x_{i}}{C_{i}} -1, i\ne 1\)

Let the expected evacuation time in this scenario be E[T]. Now we can write,

$$\begin{aligned} E[T] = \max \left( T_{1} + \frac{(1-\alpha )n}{C_{1}}-1, \max _{2 \le i \le k}\left( T_{i} + \frac{\alpha x_{i}}{C_{i}} - 1\right) \right) . \end{aligned}$$

E[T] will be minimum when it satisfies the following equation,

$$\begin{aligned} E[T]&= T_{1} + \frac{x_{1}+\sum _{i = 2}^{k}(1-\alpha )x_{i}}{C_{1}}- 1 \nonumber \\&= T_{i} + \frac{\alpha x_{i}}{C_{i}} - 1, 2 \le i \le k . \end{aligned}$$
(2)

where \(\sum _{i = 1}^{k}x_{i} = n\) and \(x_{i} \ge 0, \forall i\). Solving the above equations we get,

$$\begin{aligned} E[T] = \frac{n + \sum _{i = 1}^{k}{C_{i}T_{i}}}{\sum _{i = 1}^{k}C_{i}} - 1 = CET(\{P_{1},P_{2},\ldots ,P_{k}\}) \end{aligned}$$
(3)

Expected evacuation time given by Eq. (3) doesn’t depend on \(\alpha \). This is true and solution is feasible as long as \(x_{1} \ge 0\). But it is not always the case, specifically when \((1 - \alpha )\sum _{i = 2}^{k}x_{i} > C_{1}(T - T_{1} + 1)\). So, implicitly evacuation time is dependent on \(\alpha \). In the following sections we give the algorithm that considers the randomized behavior of people along with analysis for expected evacuation time.

5.1 Lower Bound for Expected Evacuation Time

On expectation \(x_{1} + (1- \alpha ) \sum _{i = 2}^{k}x_{i} = \alpha x_{1} + (1-\alpha )n\) number of people will be evacuated via path \(P_{1}\). This is minimum when \(x_{1} = 0\) as \(x_{1} \ge 0\). So, lower bound for expected evacuation time is \(T_{1} + \frac{(1-\alpha )n}{C_{1}} - 1\).

5.2 Algorithm for Randomized Behavior of People

Algorithm 2

  1. 1.

    Run Algorithm 1. Find CET and \(x_{1},x_{2},\ldots ,x_{k}\) using Eq. (2).

  2. 2.

    If \(x_{1} \ge 0\) then quit; else go to step 3. In this case, the expected evacuation time = CET.

  3. 3.

    Assign \(x'_{1}\) to 0 and \(x'_{i} = \frac{nx_{i}}{\sum _{j = 2}^{k}x_{j}}, \forall i \ne 1\). In this case, the expected evacuation time = \(T_{1} + \frac{(1-\alpha )n}{C_{1}} - 1\).

Lemma 5

\(x'_{i} < x_{i}\), \(\forall i \ne 1\), and \(\sum _{i=2}^{k}x'_{i} = n\).

Proof

Directly follows from the algorithm.

Lemma 6

Above algorithm has a expected evacuation time of \(CET(\{P_{1},P_{2}, \ldots ,P_{k}\})\) when it quits from step-2.

Proof

In this case \(x_{1} \ge 0\). From the equation-4 also we can observe that \(x_{i} \ge 0, \forall i \ne 1\). Hence the solution is feasible. So, we can safely say that the expected evacuation time is CET.

Lemma 7

Above algorithm has a expected evacuation time of \(T_{1} + \frac{(1-\alpha )n}{C_{1}} - 1\) when it quits from step-3.

Fig. 3.
figure 3

Evacuation time vs number of nodes for SSEP and CCRP.

Fig. 4.
figure 4

Run time vs number of nodes for SSEP and CCRP.

Proof

In this case \(x_{1} < 0\) and by Lemma 5 \(x'_{i} < x_{i}, i \ne 1\). For \(i \ne 1\) \(x'_{i}\) number of people are suggested path \(P_{i}\). Hence \(T_{i} + \frac{px'_{i}}{C_{i}} -1 < T_{i} + \frac{px_{i}}{C_{i}} -1 < CET\) , \(i \ne 1\) and \(T_{1} + \frac{(1-\alpha )n}{C_{1}} - 1 > CET\).

Theorem 3

In a single source single sink evacuation problem, if people follow the path suggested by Algorithm 2 with probability \(\alpha \), then the expected evacuation time is \(\max (CET,T_{1} + \frac{(1-\alpha )n}{C_{1}}-1)\) and algorithm runs in \(O(\min (n, p) \cdot n \log n)\) time.

Table 1. Comparison of evacuation time and run time of SSEP and CCRP algorithms

6 Experimental Results

6.1 Details of the Experiments

We executed the SSEP and CCRP algorithms on a Dell Precision T7600 server having an Intel Xeon E5-2687W CPU running at 3.1 GHz with 8 cores (16 logical processors) and 128 GB RAM. The operating system is Microsoft Windows 7 Professional 64-bit edition. We used the C/C++ network analysis libraries igraph and LEMON to implement the algorithms. We used netgen to generate synthetic graphs. The number of vertices in the graph varies from 100 to 500,000. The number of people varies from 3,000 to 120,000. The results are shown in Table 1. The graphs are plotted on a log-log scale.

6.2 Results

We show the variation of evacuation time and run time with number of nodes for SSEP and CCRP algorithms in Figs. 3 and 4 respectively. From Fig. 3, we can see that the evacuation time of SSEP is at most that of CCRP. It is evident from Fig. 4 that the running time of SSEP is much lower than that of CCRP. Hence, for all these instances SSEP clearly outperforms CCRP with respect to both evacuation time and run time. The absolute and relative amount by which SSEP performs better than CCRP is shown in Table 1.

7 Conclusion and Future Work

In this paper, we have studied the evacuation route planning problem and given an improved algorithm for the single source single sink case. We theoretically showed that the SSEP algorithm performs better than the CCRP algorithm, both in terms of evacuation time and run time. This is also demonstrated by extensive experiments. We also analyzed a simple probabilistic behavior model of people. Here are some open problems which we would like to work in future.

  • Design a system for real time monitoring of evacuation in a building using our indoor localization app [1].

  • Extend this algorithm to the multiple source multiple sink case, and compare it’s performance with CCRP and other algorithms.

  • Develop a more sophisticated probabilistic behavior model of people for the case when they don’t follow the routes suggested by the algorithm.

  • Give good lower and upper bounds for the problem.