Efficient Dynamic Flow Algorithms for Evacuation Planning Problems with Partial Lane Reversal

Contraflow technique has gained a considerable focus in evacuation planning research over the past several years. In this work, we design efficient algorithms to solve the maximum, lex-maximum, earliest arrival, and quickest dynamic flow problems having constant attributes and their generalizations with partial contraflow reconfiguration in the context of evacuation planning. The partial static contraflow problems, that are foundations to the dynamic flows, are also studied. Moreover, the contraflow model with inflow-dependent transit time on arcs is introduced. A strongly polynomial time algorithm to compute approximate solution of the quickest partial contraflow problem on two terminal networks is presented, which is substantiated by numerical computations considering Kathmandu road network as an evacuation network. Our results show that the quickest time to evacuate a flow of value 100,000 units is reduced by more than 42% using the partial contraflow technique, and the difference is more with the increase in the flow value. Moreover, the technique keeps the record of the portions of the road network not used by the evacuees.


Introduction
Because of the significant occurrences of many predictable and unpredictable large-scale disasters worldwide, regardless of various discoveries and urbanization, an efficient, implementable, and reliable evacuation planning is indispensable for saving life and supporting humanitarian relief with optimal use and equitable distribution of available resources. Among prevalent disasters, e.g., earthquakes, volcanic eruptions, landslides, floods, tsunamis, hurricanes, typhoons, chemical explosions, and terrorist attacks, the most remarkable losses are noted in earthquakes in Nepal (April 2015), Japan The threat of disasters always persists, e.g., there is a prediction of earthquakes of more than 8.4 in Richter scale around the capital of Nepal in the near future (Pyakurel et al. [1]). Therefore, there is always a need for an effective emergency plan to cope with disasters worldwide, including Nepal.
Evacuating people from disastrous areas to safe places is one of the important aspect of emergency planning. Among the diversified fields (e.g., traffic simulation, fluid dynamics, control theory, variational inequalities, and network flow) of mathematical research in evacuation planning, network flow methodologies are the most efficient [2]. An evacuation optimizer looks after a plan on evacuation The optimal lane reversal strategy makes the traffic systematic and smooth by removing the traffic jams caused, not only in different natural and human-created disasters of large scale, but also in busy office hours, special events and street demonstrations. The contraflow reconfiguration, by means of various operations research models (cf. Section 2), heuristics, optimization techniques and simulation, reverses the usual direction of empty lanes towards sinks satisfying the given constraints that increase the value of the flow, and decrease the average time of evacuation. However, an efficient and universally acceptable solution approach that meets the macroscopic and microscopic behavioral characteristics of the evacuees (e.g., threat conditions, community context, and preparedness) is still lacking (see [4,26]). Because of the large size of the problem (a large number of variables and parameters involved), designing algorithms to calculate optimal solution within a desired time is challenging. Heuristics and approximation methods provide solutions within an acceptable time but the optimality of the solution is not guaranteed. A trade-off between computational costs and solution quality should always be desired when designing solution algorithms.
As the computational costs of the exact mathematical solutions for general contraflow techniques are quite high, a series of heuristic procedures are approached in literature that are computationally manageable. Kim et al. [27] present two greedy and bottleneck heuristics for possible numerical approximate solutions to the quickest contraflow problem, and they show that at least 40% evacuation time can be reduced by reverting at most 30% arcs in their case study. They model the problem of lane reversals mathematically as an integer programming problem by means of flows on network and also prove that it is N P-hard. All contraflow evacuation problems are at least harder than the corresponding problems without contraflow. We recommend Dhamala et al. [11] and the references therein for different approaches of contraflow heuristics.
Though comparatively less, recent interest also includes analytical techniques, after Rebennack et al. [28] solved the two-terminal maximum contraflow and quickest contraflow problems optimally in polynomial times. The earliest arrival and the maximum contraflow problems are solved with the temporally repeated solutions in Dhamala and Pyakurel [29]. Its solution with continuous time is obtained in [30]. The authors of [31] solve the earliest arrival contraflow on two-terminal network in pseudo-polynomial time. They also introduce the lex-maximum dynamic contraflow problem in which flow is maximized in given priority ordering and solved with polynomial time complexity. These problems are also solved in continuous time setting by using natural transformation (cf. Section 2.2) of flow in discrete times to continuous time intervals in [24,30]. With the given supplies at the sources and demands of the sink, the earliest arrival transshipment contraflow problem is modeled in discrete time [32] and solved on multisource network with polynomial algorithm. The problem with zero transit time on arcs is also solved on multi-sink network with a polynomial time complexity. For the multiterminal network, they present approximation algorithms to solve the earliest arrival transshipment contraflow problem. The discrete solutions are extended into continuous time in [1,24]. The problems with similar objectives, in what is known as an abstract network, are solved in [33].
In the present work, we propose algorithms to reverse the road segments up to the necessary capacity only, to record segments with unused capacities so that they can be used for other purposes of facilitating evacuation. Our proposed algorithms also summarize the earlier results on contraflow in compact form. To the best of our knowledge, this is the first attempt to address the issues on different partial contraflow problems with constant transit times and inflow-dependent transit times associated to the arcs. These node-arc partial contraflow models contribute in saving the unnecessary arc reversals improving the complete contraflow approaches.
The organization of this paper is as follows. Section 2 presents the basic terminology necessary in the paper and different flow models. All the previously solved dynamic contraflow problems with constant transit time are extended in the partial contraflow configuration and solved with efficient algorithms in Section 4, after presenting the fundamental static partial contraflow solutions in Section 3. Section 5 introduces the partial contraflow approach to solve the quickest flow problem with inflow-dependent transit times presenting efficient algorithms. Section 6 presents numerical computations related to the quickest partial contraflow, with inflow-dependent transit times and taking a case of the Kathmandu road network. The paper is concluded in Section 7.

Basic Terminology
An evacuation network is represented by N = (V, A, b, τ, S, D, T), where V is the set of n nodes, A ⊆ V × V is the set of m arcs with a set of source nodes S and that of sink nodes D. For each v ∈ V, we define A v = {e : e = (v, u) ∈ A}, the set of arcs outgoing from v, and B v = {e : e = (u, v) ∈ A}, the set of arcs incoming to v. The network is assumed to be without parallel arcs between the nodes as they can be combined to a single arc with added capacity. It is connected with m arcs, so that n − 1 ≤ m, and therefore n + m = O(m). The nodes may be equipped with the initial occupancy o : V → R + . The predefined parameter T denotes a permissible time window within which the whole evacuation process has to be completed. It may be discretized into discrete time steps T = {0, 1, . . . , T} or can be considered a continuous one as T = [0, T].
On arcs, the upper capacity (bound) function b : A × T → R + limits the flow rate passing along the arcs for each point in time. The transit time function τ : A × T → R + measures the time the flow units take to travel along the arcs. We frame this work with constant and inflow-dependent transit times on arcs. Smith and Cruz [34] give various approaches of travel time estimation on arterial links, free and high ways. With inflow-dependent transit times, the transit time τ e (x e (θ)) is a function of inflow rate x e (θ) on the arc e at given time point θ, so that at a time flow units enter an arc with the uniform speed and remain with the uniform speed traveling through this arc.
The flow rate function is defined by x : A × T → R + , where x e (θ) denotes the flow rate on e at time θ. It may be taken as an inflow, outflow, and intermediate flow rate that measure the flow at entry, exit, and intermediate points on an arc, respectively. For θ ∈ {0, 1, . . . , T} and constant function τ, the amount of flow sent at time θ into e arrives to its end at time θ + τ e . Whereas, for continuous time θ ∈ [0, T] and constant function τ, the amount of flow per time unit enters at this rate e at time θ and proceed continuously.
One may introduce an additional parameter λ e ∈ R + on arc e, e.g., a gain factor, to model a generalized dynamic flow when only λ e units of flow leave from w at time θ + τ e , by entering a unit of flow on e = (v, w) at time θ. If the flow is not gained, practically, along any arc, then λ e ≤ 1 holds for each arc e ∈ A, and we call the network as a lossy network [35], which is denoted by N = (V, A, b, τ, λ, S, D, T).

Flow Models
For a source node, s, and a sink node, d, a static s-d flow with value val(y) is a function y : → R + satisfying The constraints in (2) are flow-conservation constraints and the constraints in (3) are capacity constraints. The maximum static flow problem seeks to maximize the objective (1), and we denote the value of the maximum static flow by val max (y). If the flow conservation constraints (2) are satisfied for each v ∈ V, then corresponding flow y is also known as a circulation. If we add an arc (d, s) with capacity val(y) and set y(d, s) = val(y), then the value of such a flow is zero, and the resulting flow is a circulation. Given a fixed flow value val(y) and the cost c e per unit of flow for each e ∈ A, the minimum cost static flow problem seeks to minimize the total cost ∑ e∈A c e y e of shifting val(y) from s to d. Adding an arc (d, s) with capacity val(y) and cost 0, the minimum cost static flow problem can be turned into a minimum cost circulation problem.
Let us assume that the arc transit times and capacities are constant over the time. With an amount of inflow x e (θ) on arc e at discrete time θ = 0, 1, . . . , T that may change over the planning horizon T, the generalized dynamic flow x : A × T → R + for given time T satisfies constraints (4)(5)(6).
The generalized earliest arrival flow problem is to find a generalized dynamic flow of value val max (x e , θ) for each time unit θ ∈ T defined by objective function (7). It is defined as a generalized maximum dynamic flow problem if the maximization is considered for θ = T only: Note that, besides the sink, no flow units remain in the dynamic network after time T. It is ensured by assuming that x e (θ) = 0 for all θ ≥ T − τ e .
For the following models we assume that gain factor λ = 1. Then, the generalized dynamic flow reduces to the dynamic flow and the generalized earliest arrival flow reduces to the earliest arrival flow with objective function (8).
Given a time horizon, T, and and a set of terminals with a given priority order, the lexicographic maximum (lex-maximum) dynamic flow problem seeks to identify a feasible dynamic flow that maximizes the amount leaving (entering) a terminal in the given order. For a given value Q 0 (number of flow units representing evacuees), the quickest flow problem minimizes T = T(Q 0 ) such that the value of the dynamic flow not less than Q 0 , satisfying the constraints (4)-(6) with equality in (5) and ) be a multiterminal network with source-supply and sink-demand vectors µ(s) and µ(d), respectively, such that µ(S ∪ D) = ∑ v∈S∪D µ(v) = 0. The multiterminal earliest arrival flow problem seeks to find the dynamic flow, so that the total supply µ(S) = ∑ s∈S µ(s) is sent from S to meet the total demand µ(D) = ∑ d∈D µ(d) in D with maximum value at each θ ≥ 0. If all demands are to be fulfilled with supplies by shifting them to the sinks within given time T, then the problem is known as a transshipment problem. The earliest arrival transshipment problem maximizes val(x, θ) in objective function (9) satisfying multiterminal constraints (4)-(6) for all time points θ ∈ {0, 1, . . . , T} with λ = 1.
If the transshipment from S to D is done in the minimum time min T = T(µ(S ∪ D)), then the problem is called quickest transshipment problem.
Let e = (w, v) be the reverse of an arc e = (v, w). The residual network N (y) for a static flow y is given by (V, A(y)), where A(y) = A F (y) ∪ A B (y) with A F (y) = {e ∈ A : y e < b e } and A B (y) = {e ∈ A : y e > 0} with arc length τ e for e ∈ A F (y) and −τ e for e ∈ A B (y). The residual capacity b(y) : A(y) → R + is defined as b e (y) = b e − y e for e ∈ A F (y) and b e (y) = y e for e ∈ A B (y).
Given a multiterminal S-D network, we construct an extended network by adding two extra nodes: s * (called super-source) and d * (called super-sink). For each s ∈ S, d ∈ D, we construct arcs (s * , s), (d, d * ) with zero transit time and problem-dependent capacities.

Natural Transformation
With the continuous time settings set as T = [0, T], all of the above models described in the above subsection can be remodeled by replacing the summation over time with respective integrals. The amount of flow entry, x e , on the arcs considered above in discrete models naturally transfer to the entry flow rates in this continuous approach.
Fleischer and Tardos [25] connect the continuous and discrete flow models by the following natural transformation, as defined in (10), that deals with the same computational complexity to both.
x c e (ψ) = x e (θ), for all θ and ψ with θ ≤ ψ < θ + 1 (10) where x e (θ) is the amount of discrete dynamic flow that enters arc e at time θ = 0, 1, . . . , T with constant capacities on the arcs. For static flow y e on arc e, the amount of discrete dynamic flow with transit time τ e on arc e is Notice that the flow entering an arc e = (v, w) at time θ − τ e arrives at w at time θ in discrete time, but at time [θ + 1) in continuous time. The flow x c is feasible and will be same for both settings at any interval [θ, θ + k), for θ = 0, 1, . . . , T, k ∈ N.
With standard chain decomposition, the static flow y is decomposed into a set of chain flows Γ = {γ 1 , . . . , γ r } with r ≤ m that satisfies y = ∑ r k=1 γ k . Each chain in Γ starts at a source node and ends at a sink node using arcs in the same direction as y does. The travel time on each chain γ k is such that τ(γ k ) ≤ T. The feasible dynamic flow can be obtained by summing the dynamic flows induced by each chain flow.
A nonstandard chain decomposition of feasible y, e.g., Γ = {γ 1 , . . . , γ r }, allows for an arc in the opposite direction also for the flow. If e = (v, w) has transit time τ e , then for its reverse arc e = (w, v), τ e = −τ e . A unit of flow starting from w at time θ + τ e and reaching v at time θ cancels the unit of flow starting from v at time θ and reaching w at time θ + τ e , and thus it is equivalent to sending a negative unit of flow from v at time θ to w at time θ + τ e .
Using the concept of natural transformation discussed above, Fleischer and Tardos [25] solved the continuous versions of maximum flow, universal dynamic flow, lexicographically maximum flow, quickest flow, and dynamic transshipment problems by solving their discrete counter parts with time-invariant attributes. The computational complexities for both approaches remain the same. The generalized dynamic cut capacity is defined to show the equivalent maximum flow solutions.

Models for Arc Reversals
Let N = (V, A, b, τ, S, D, T) be an evacuation network. For e = (v, w) ∈ A, we denote its reverse arc (w, v) by e . To solve a network flow problem with arc reversals, a common approach is to solve the corresponding problem in, what is known as, an auxiliary network. We denote the auxiliary network of N by N = (V, E, b, τ, S, D, T), in which b e = b e + b e , and τ e = τ e if e ∈ A τ e otherwise and an edge e ∈ E in auxiliary N if e ∈ A or e ∈ A. While working with the auxiliary network for reconfiguration, one is allowed to redirect the edge in any direction with the modified increased capacity and same transit time in either direction. The remaining graph topology and data structures in reconfigured network are unaltered. By discarding the time factor for flow passing through the network, a static contraflow configuration will be defined analogously.
The core idea behind contraflow reconfiguration technique is to increase outbound flow with reduced time on the evacuation network. Numerous dynamic contraflow heuristics have been presented and implemented during the past few years. However, recently many analytical approaches have been investigated, and polynomial time algorithms are also presented in a few cases, though the general multiterminal problem is still N P-hard because of a conflict with reverting intermediate arcs.
We recommend a complete survey [11] for details.

Example 1.
Let us consider a single-source single-sink evacuation network as shown in Figure 1(i), where s is the source node and d is the sink node. The arcs, for example, (x, y) and (y, x), represent the two-way road segments between nodes x and y. Each arc contains capacity and transit time (cost) associated to it. For example, arc (s, w) has capacity 2 and transit time 3, that means, assuming a time unit of 5 min and a flow unit of 10 cars, a maximum of 20 cars can reach w from s in 15 min. The auxiliary network for reconfiguration is as shown in Figure 1(ii), in which the capacity of each edgeē is obtained by adding the capacities of e, e and the transit time τ e = τ e = τ e .

Static Partial Contraflow
In this section, we introduce the maximum static partial contraflow problem (MSPCFP) (cf. Problem 1) and the lex-maximum static partial contraflow problem (LMSPCFP) (cf. Problem 2). Thereafter, polynomial time algorithms are presented to solve these problems. These algorithms work as a foundation of solving the dynamic versions of the corresponding problems in the subsequent sections.

Maximum Static Partial Contraflow
Problem 1. Given a static network N = (V, A, b, τ, S, D), the maximum static partial contraflow problem (MSPCFP) is to maximize a static S-D flow, saving the unused arc capacity, if the direction of arcs can be reversed partially.
Algorithm 1 is designed for a single-source single-sink static network.
Output: A maximum static partial contraflow (MSPCF) on N with saved capacities of arcs 1.
Construct the auxiliary network N = (V, E, b, s, d).

2.
Run the maximum static flow algorithm in N with capacity b, that is,b e for eachē ∈ E to compute the maximum static flow y.

3.
Decompose the flow into paths and cycles and remove the flow in cycles.

4.
Reverse e ∈ A up to the capacity y e − b e iff y e > b e , b e replaced by 0 whenever e / ∈ A.

5.
For each e ∈ A, if e is reversed, r(e) =bē − y e and r(e ) = 0. If neither e nor e is reversed, r(e) = b e − y e , where r(e) is the saved capacity of e.
Step 2 of Algorithm 1 relies on any of the best polynomial time maximum flow algorithms that have a long history but are still under study. Their optimal solutions are guaranteed by the fundamental max-flow min-cut theorem, which states that the maximum flow value equals to the minimum cut capacity. Following the flow augmenting path pseudo-polynomial, that is, O(nm log b max ) time, algorithm of Ford and Fulkerson [13], which ensures a maximum static flow y if and only if the corresponding residual network does not contain an augmenting path, there exist several advancements on its improvements. By scaling the capacities, the running time can be improved to O(m 2 log b max ), where b max represents the integer valued maximum arc capacity. Furthermore, the shortest augmenting path algorithm that uses the unit path length function, the blocking flow algorithm that augments along a maximal set of shortest paths with respect to a blocking flow, and the push-relabel algorithm that functions with nonconservation of flows, except at the source, and sink nodes turn into strongly polynomial time algorithms with complexity, O(nm 2 ), O(n 2 m) and O(nm log(n 2 /m)), respectively.
The flow decomposition of Step 3 into paths and cycle removal is less costly with O(nm) running time. In a few special case, like unit capacities, some of these algorithms can be implemented with nearly linear time bounds. Using advanced data structures and dynamic trees, though much theoretical, even more strongly polynomial time algorithms are developed, however, not much implementable in usual practice (see Goldberg and Tarjan [36] for a brief review). For example, with the dynamic-tree data structure, the binary blocking flow algorithm requires O(min(n 2/3 , √ m)m log(n 2 /m) log b max ) time within a factor log(n 2 /m) log b max of the best algorithm for the unit arc capacity problem without parallel arcs.
In Step 4 of Algorithm 1, reversal of traffic flow is allowed only in the necessary amount on the road segment, i.e, partial reversal of the arcs in evacuation network. Unlike in the previous investigations, the remaining capacity of the segment is not reversed, which can be used for other purposes, for example, facility location-allocation and emergency logistic supports.
Based on maximum static contraflow solution with complete contraflow configuration presented in [28], Step 2 of Algorithm 1, the maximum flow algorithm, computes the maximum static flow optimally on auxiliary network N and Step 5 comes as a direct consequence of it. This leads to: Lemma 1. Algorithm 1 computes the maximum static flow with partial arc reversal on N by saving capacities r(e) of arc e ∈ A correctly. Theorem 1. Algorithm 1 solves the MSPCFP in strongly polynomial time with partial arc reversal capability.
Using a maximum flow algorithm, Rebennack et al. [28] obtained a maximum contraflow solution in auxiliary network. However, their algorithm applies complete arc reversal strategy, such that an arc e ∈ A is reversed if and only y e > b e or y e > 0 for e ∈ A in the maximum static contraflow solution y. Here, we use partial lane reversal strategy, where the lanes of arcs not required by the contraflow solution are not reversed.

Example 2.
We illustrate Algorithm 1 on the network constructed in Example 1. First, we solve the maximum static flow problem on auxiliary network in Figure 1(ii). As shown in Figure 2 carry 3, 5, 1, 1, and 2 flow units, respectively. Thus, the obtained maximum static flow 12 units on N is equivalent to the maximum static contraflow on N with arc reversals. According to Algorithm 1, arcs (x, s), (y, s), (d, x), (d, y), (d, z) are reversed completely; arcs (w, s), (x, y), (y, w) are partially reversed each up to the capacity 1; each of the arcs (y, z), (w, z), (z, w), (y, w) has a saved capacity of one unit; and each of (z, y), (w, s) has that of two units, as shown in Figure 2

Lex-Maximum Static Partial Contraflow
Assume that, in a multiterminal evacuation network, the risk zones and the destination areas are prioritized subject to specific reasons such as risk levels of disastrous areas, disabilities or urgency of the evacuees, and service requirements to them. To meet these necessities, the sets of sources and sinks are categorized as priority sets.
Let S 1 ⊆ · · · ⊆ S q ⊆ S and D 1 ⊆ · · · ⊆ D r ⊆ D, respectively, be the priority sets of the sources and sinks, where X i gets higher priority to X j whenever X i ⊆ X j holds. Considered with a maximal flow, let the greatest number of units that can enter the sink D * be val m (D * ). Then, a maximal flow that delivers val m (D k ) units into each D k is a lexicographically (lex-) maximal static flow on the sinks. A maximal flow that sends maximum number of units, val m (S k ), out of each S k is a lexicographically (lex-) maximal flow on the sources. Problem 2. Let N = (V, A, b, S, D) be a given multiterminal network with ordered sets of sources and sinks. The lex-maximum static partial contraflow problem (LMSPCFP) at sources (sinks) is used to determine a feasible flow that lexicographically maximizes the amounts leaving (entering) the terminals in given priority orders, if the partial reversal of arcs is allowed.
To solve the lex-maximum static partial contraflow problem (LMSPCFP; Problem 2), we design Algorithm 2. An illustration is given in Figure 3.

2.
Run the lex-maximum static algorithm of [16] on N with capacityb to find the flow y.

3.
Decompose y into paths and cycles, and remove flows in cycles.

4.
Reverse e ∈ A up to the capacity y e − b e iff y e > b e , b e replaced by 0 whenever e / ∈ A.

5.
For each e ∈ A, if e is reversed, r(e) =bē − y e and r(e ) = 0. If neither e nor e is reversed, r(e) = b e − y e , where r(e) is the saved capacity of e.
The authors of [31] presented a polynomial time algorithm to find contraflow reconfiguration with complete arc reversals. We establish the following result that leaves the unused parts of arcs unturned, solving a lex-maximum partial contraflow problem in polynomial time.
Theorem 2. The LMSPCFP can be solved using Algorithm 2 in polynomial time with arc reversals partially.
Proof. For the given priority ordering of multiterminals, the maximum static flow problem is solved iteratively on auxiliary network N = (V, E, b, S, D) that gives an optimal solution to the lexicographically (lex-) maximum static flow problem, as in [16]. The obtained solution is equivalent to the lex-maximum static contraflow solution on N , [31].
Step 5 of Algorithm 2 saves all unused capacities of arcs in O(m) time, leading to the solution of LMSPCFP in polynomial time.
respectively, by saving arc unit capacity of arcs (x, y) and (d 2 , y).

Partial Lane Reversals for Time-Invariant Attributes
This section deals with the concepts of dynamic partial contraflow and contra-transshipment problems with constant transit times and capacities on arcs. Some efficient algorithms are presented for their solutions. As the evacuation issues with dynamic environment have been categorized into different problem types, such as maximum flow, quickest flow, lexicographically maximum flow, earliest arrival flow, quickest transshipment, and earliest arrival transshipment, each has to be dealt to separately with contraflow and, thereby, partial contraflow configuration techniques. The maximum dynamic, earliest arrival, lex-maximum dynamic and quickest, dynamic partial contra-transshipment problems are abbreviated by MDPCFP, EAPCFP, LMDPCFP, QPCFP, and DPCTP, respectively.

Dynamic Contraflow Problems
As there is no algorithm to find temporally repeated flows on general S-D dynamic networks, an exact optimal dynamic contraflow solution for them have not been found in polynomial time yet. In particular, on the networks, like two-terminal s-d; priority-based S-D; and transshipments S-d, s-D, and S-D with different constraints, the optimal static flow can be decomposed into chains (paths) that are temporally repeated over the time horizon, T, returning the temporally repeated dynamic flows in such cases. From the series of literature on analytical contraflow [1,24,28,[30][31][32]37], it is established that the optimal dynamic contraflow for the given network N = (V, E, b, τ, s, d, T) is equivalent to the optimal dynamic flow on corresponding reconfigured network N = (V, E, b, τ, s, d, T). The input network may be a super-source super-sink added extended network if one is considering a multiterminal network, whenever a temporally repeated solution is possible.
Previous contraflow approaches do not apply the remaining arc capacities, which result after contraflow reconfiguration. In this subsection, we redefine a series of partial contraflow problems with time-invariant attributes and present appropriate efficient algorithms to solve the corresponding problems saving the unnecessary arc capacities. Once a dynamic flow is obtained, it should be subtracted from reconfigured capacities of arcs to record the maximum unused arc capacities. These algorithms have great benefit as the remaining unused arc capacities can be used for emergency vehicles and logistics. The following problem is more general, addressing respective partial contraflow problems in a compact form. Problem 3 is stated in an abstract form for a general objective function G without its explicit nature. As per the requirement of the specific problem, we will state it explicitly in the subsequent sections.
Applying Step 2 of Algorithm 3, any technique that computes a temporally repeated flow on reconfigured network N is applicable to find an optimal solution to the corresponding contraflow for the original network N . During the computation of temporally repeated flows, Step 3 removes the cycle flows, if they exist, so that the simultaneous flows in both directions are not possible. Saving of the unused capacities are recorded in Step 5. Thus, a flow is either along arc e or arc e , and its value is not greater than the added arc capacities at all time units. Therefore, the condition of feasibility is satisfied by the algorithm. The optimality depends on the specific objective function. Use a temporally repeated flow algorithm to solve DPCFP(G) on reconfigured network N with capacity b e and transit timeτ e for eachē ∈ E.

3.
Decompose the flow y into paths and cycles and remove the flow in cycles.

4.
For each θ ∈ T, reverse e ∈ A up to the capacity y e − b e iff y e > b e , b e replaced by 0 whenever e / ∈ A.

5.
For each θ ∈ T and e ∈ A, if e is reversed, r(e) =bē − y e and r(e ) = 0. If neither e nor e is reversed, r(e) = b e − y e , where r(e) is the saved capacity of e.

Maximum Dynamic Contraflow
If the flow has to be maximized for given time period, T, without considering earlier periods, then Problem 3 with the arcs permissible to be reversible only at time zero is the MDPCF problem. The objective (8) is then max G = max val(x, T) for θ = T subject to constraints (4)- (6).
Polynomial time algorithms to solve the S-D MDCFP has not been investigated yet. However, it can be solved in pseudo-polynomial time by reducing it into extended s-d network of its time-expanded network. The s-d MDCFP is polynomially solvable in discrete time [28] and, in continuous time, [30] reverses an arc completely whenever it is to be reversed. Proof. Theorem 3 is proved in three steps. First, we show that the solution Algorithm 3 yields is feasible.
Step 2 uses maximum dynamic flow algorithm of [13]. After the removal of the positive flow in cycles in Step 3, there is a flow either along arc e or e but never in both arcs and the flow is not greater than the modified capacities in the auxiliary network on each arc at each time unit. Second, we show the optimality. We use the temporally repeated flow algorithm of [13] after we obtain the feasible flow that gives a maximum dynamic flow solution on reconfigured network N , which is equivalent to the maximum dynamic contraflow solution on N with the arcs reversed up to the necessary capacity in Step 4. In Step 5, we record the capacities of the arcs not used by the flow after necessary (partial) arc reversals, thereby obtaining a MDPCF solution.
The time complexity of the algorithm is dominated by the time complexity of the maximum dynamic flow algorithm of [13] in Step 2, which is equal to the complexity of a minimum cost flow computation, and that of flow decomposition in Step 3. This completes the proof.

Example 3.
We compute the maximum dynamic flow on auxiliary network (cf. Figure 1(ii)) of evacuation network in Figure 1(i)) having the aforementioned capacities and transit times on each arc with the repetition of path flows computed in Example 2 within given time horizon T = 6. Using the algorithm in [13], we get the static flow y corresponding to the temporally repeated dynamic flow, which is the same as that in Figure 2(i). The temporally repeated maximum dynamic flow after partial contraflow configuration is as given in Table 1. Table 1. Maximum dynamic flow computation after partial contraflow configuration (cf. Figure 1).

Total 42
The arc reversals and saved capacities are similar to those in Example 2.
We observe another algorithm for the partial contraflow configuration that is based on the minimum cut problem. The formation of reconfigured network is from weighted undirected network on which a minimum s-d cut can be obtained in O(n 2 log 3 n) time complexity that is independent with maximum flow computations (Karger and Stein [38]). The partial contraflow configuration can be achieved by reversing only the capacities of arcs that are equal to the minimum cut capacities. However, it is difficult to identify the used capacities of other arcs that are not contained on minimum cut set. We can say that maximum flow is equal to the minimum cut but there is not any technique developed to decompose the maximum flow value in different s-d paths in undirected network given a minimum cut solution. If any such technique exists, then solving partial contraflow configuration problem is not harder than finding the distribution of maximum flow value in different arcs and paths of the network.

Earliest Arrival Contraflow
The earliest arrival (also known as the universal maximum) partial contraflow problem (EAPCFP/UMPCFP) on the given dynamic network N = (V, A, b, τ, S, D, T) is to find a dynamic S-D flow that is maximum for all time steps θ = 0, 1, . . . , T with arc reversal capability partially. In Step 2 of Algorithm 3, the objective function (8) is then max G = max val(x, θ) for all θ ∈ T subject to constraints (4)- (6).
The earliest arrival contraflow problem for s-d series-parallel network is solved in polynomial time O(nm + m log m), being identical with maximum flow optimal solution in which arcs are reversed only at time zero [29,30]. The two solutions match for this case since each cycle in the residual network has nonnegative length [18]. However, for other general networks, as there does not exist any exact earliest arrival maximum flow solution with standard chain decomposition of [13], the nonstandard chain decomposition of [19] has to be applied in order to decide contraflow reconfiguration which demands arc reversals time to time, [24,31]. This results in a pseudo-polynomial time algorithm, using the successive shortest path algorithms as in [15,16]. A complication for the s-d earliest arrival contraflow solution arises because of the flipping requirements of intermediate arcs with respect to the time.
As the S-D maximum dynamic contraflow problem is N P-hard, the corresponding S-D earliest arrival contraflow problem is also N P-hard. However, the authors of [30] obtain an approximate contraflow solution within the factor (1 − ) of the optimal earliest arrival contraflow in polynomial time. For this they run, the fully polynomial time approximation algorithm of [17] and obtain the approximate s-d earliest arrival contraflow in O(m −1 (m + n log n) logb max ) time are used, wherē b max = max e∈Ebē .
The authors of [39] extend the results on earliest arrival contraflow problem to the partial lane reversal reconfiguration by saving unused arc capacity. Their algorithms have similar times complexities as without contraflow.

Generalization of Dynamic Contraflow
Given a generalized dynamic lossy network N = (V, A, b, τ, λ, S, D, T) with integer inputs, the generalized earliest arrival partial contraflow problem (GEAPCFP) is to find a generalized maximum flow max G = max val(x, θ) for all θ ∈ T defined in Equation (7), subject to the constraints (4)-(6) with partial arc reversal capability at time zero. If flow is maximized for a given time horizon T only, then the problem is a generalized maximum dynamic partial contraflow problem (GMDPCFP).
As the corresponding contraflow problems on general S-D network are N P-hard, an additional gain factor on each arc make the partial contraflow problems also N P-hard on general S-D lossy network, too. However, considering s-d lossy network, the contraflow problems can be solved computing corresponding generalized flows on the auxiliary network in pseudo-polynomial time complexity [40]. Moreover, with the same complexity, we can solve the partial contraflow problems using Algorithm 4 saving all unused arc capacities that can be used for other purposes.
There are different factors that make the flow to be lost during evacuation process. However, we consider a special case in which it is assumed that in each time unit the same percentage of the remaining flow value is lost. Thus, we consider a special case λ ≡ 2 c.τ for some constant c < 0.
In the reconfigured network, we compute a maximum flow by calculating flow along shortest s-d paths, augmenting this flow, and repeating the process successively until no s-d path exists in the residual network. Then, such a maximum flow constructs an optimal maximum dynamic flow in pseudo-polynomial time with the standard temporally repeated flow technique in time-expanded network.

Algorithm 4:
The generalized dynamic partial contraflow algorithm (GDPCFA). N = (V, A, b, τ, λ, s, d) with integer inputs Output: The resulting flow is GMDPCF and GEAPCF with the arc reversals by saving unused arc capacities 1.

Input: Given a lossy network
Compute the generalized maximum dynamic contraflow and generalized earliest arrival contraflow on N = (V, E, b, τ, λ, s, d) with respective b e and τ e calculated in Step 1 of Algorithm 3, and with additional gain factor λ e ≡ 2 c.τ e , c < 0 using algorithms of [40,41]. Let y be the corresponding flow.

2.
Reverse e ∈ A up to the capacity y e − b e iff y e > b e , b e replaced by 0 whenever e / ∈ A.

3.
For each e ∈ A, if e is reversed, r(e) =bē − y e and r(e ) = 0. If neither e nor e is reversed, r(e) = b e − y e , where r(e) is the saved capacity of e.

Lexicographically Maximum Dynamic Contraflow
With given priority ordering at terminals of the dynamic network N = (V, A, b, τ, S, D, T), the LMDPCFP is to find a lexicographically maximum dynamic flow at each priority terminal sets with arc reversal capability partially at any time point.
Fixing the supplies and demands at sources and sinks, the LMDPCFP problem has been solved with polynomial time complexity [24,31]. However, it is also solvable for unknown supplies and demands on terminals with the same complexity, because there is a priority ordering in terminals but not in supplies and demands. In the reconfigured network N = (V, E, b, τ, S, D, T) of Algorithm 3, if we calculate the minimum cost flow in Step 2 at each iteration as in [19], the LMDPCF solution is obtained after δ (number of terminals) iterations within time horizon T by saving unused arc capacities. However, it uses so-called nonstandard flow decomposition in which backward arcs are allowed. The consequence is Theorem 5.

Quickest Contraflow Problem
Problem 4. For a given dynamic network N = (V, A, b, τ, S, D, Q 0 ) with integer inputs and fixed flow value Q 0 , the quickest partial contraflow problem (QPCFP) is to find a minimum time T to transship the flow value Q 0 from the sources S to the sinks D with arc reversal capability partially.
The authors of [24,28,30,37] investigate the s-d network quickest contraflow problem and S-D network quickest contra-transshipment problem and present polynomial-time algorithms for their solution. On the S-D network, the quickest contraflow problem is not easier than 3-SAT and PARTITION [28]. However, for an s-d network, they present a strongly polynomial time algorithm with discrete T based on the parametric search technique of Megiddo [42] and Burkard et al. [20]). They find an upper bound for the quickest time by computing s-d paths in polynomial time and then use parametric search to find the minimum time before which given flow value is sent to the sink resulting in a strongly polynomial time complexity of O(m 2 (log n) 3 (m + n log n)). In same time complexity, the quickest contraflow problem is solved in continuous times in [30].
Pyakurel et al. [37] presented the first polynomial algorithm with a time-complexity of a minimum cost flow algorithm to solve the s-d quickest contraflow problem. The s-d quickest contraflow solution has been computed by solving the parametric minimum cost flow problem using the cost scaling algorithm of Lin and Jaillet [43]. It takes O(nm log(n 2 /m) log(nτ max )) time to solve this problem, where τ max is the maximum transit time over all arcs. All the algorithms are presented with complete contraflow configuration.
Replacing the cost scaling algorithm of Lin and Jaillet [43], if we use the cancel and tighten algorithm of Saho and Shigeno [44] in Step 2 of Algorithm 3 that computes the quickest flow by solving the parametric minimum cost flow problem in strongly polynomial time complexity, we get what is stated in Theorem 6 without detailed proof. With this, we not only improve the complexity of algorithm to solve the s-d quickest contraflow problem, but also reverse necessary parts of the road segments saving all unused arc capacities, obtaining the QPCF solution in strongly polynomial time.

Theorem 6.
The quickest contraflow problem on s-d network can be solved in O(nm 2 (log n) 2 ) time complexity with partial reversals of arc capacities.

Dynamic Contra-Transshipment Problems
Problem 5. Given a network N = (V, A, b, τ, S, D, µ(S), µ(D), T) with integer inputs, the dynamic partial contra-transshipment problem (DPCTP) with objective function (H) is to find a feasible dynamic S-D flow for (G) that fulfills the supply-demand shipments with partial arc reversals.
Problem 5 is stated in an abstract form for a general objective function G without its explicit nature. As per the requirement of the specific problem, we will state it explicitly in the subsequent sections.
If the fixed source-sink supply-demand amounts should be shifted within given time horizon T by maximizing G at every time point from the beginning with partial arc reversals, then the problem is earliest arrival partial contra-transshipment (EAPCTP).
The authors of [1,24,32] investigate the earliest arrival contra-transshipment problem and present polynomial time algorithms on multisource or multi-sink networks for specific arc transit times. Moreover, a pseudo-polynomial time algorithm has been presented and its approximation solution is computed for arbitrary transit times on each arc. If the transit time of each arc is zero, then the approximation solution is obtained in polynomial time. For an urban evacuation scenarios including life boats or pick-up bus stations, the concept of zero transit time is very important and applicable [45].
Based on the previous results from the literature, the EAPCTP can be solved in different conditions using Algorithm 5 in which all unused arc capacities are saved in contraflow configuration. However, this problem is not solved on general S-D network yet. For the S-d network N = (V, A, b, τ, S, d, µ(S), µ(d), T) with arbitrary arc transit times, a solution of the earliest arrival contra-transshipment problem can be found in polynomial time reversing the arc in the time intervals whenever necessary. Moreover, the algorithm records all unused arc capacities.
By constructing extended network of reconfigured S-d network, we can compute with super-source s * the s * -d minimum cost flow circulations according to [21] and can save arc capacity using Step 3 of Algorithm 5 as follows.
First, the S-d network N is converted into extended network s * -d network, making all nodes in S intermediate and the total of the supply µ(S) is assigned to s * . Moreover, node s * is connected from d with a dummy arc (d, s * ) having infinite capacity. On s * -d auxiliary network, we obtain a feasible dynamic flow by computing the minimum cost circulation to the dynamic flow on S-d auxiliary network, where µ(S) units of flow are being sent from the sources in S to d in time T. In this procedure, to overcome from the violation of individual supplies at the source nodes, an earliest arrival flow pattern p(θ), i.e., the maximum flow val S (x, θ) in which p(θ) ≤ val S (x, θ) for every θ ≥ 0, is defined on s * -d network. If p(θ) = val S (x, θ), for all θ ≥ 0, the process is complete. The pattern is obtained polynomially in the input size plus the number of breakpoints. For given pattern p(θ) with k breakpoints on the S-d network N , an earliest arrival transshipment can be obtained by computing a transshipment dynamic flow in s * -d network with k additional nodes and arcs. Thus, the obtained earliest arrival transshipment is equivalent to the earliest arrival contra-transshipment on S-d network N. Moreover, we can save all the unused arc capacities within the same complexity. Use a respective transshipment algorithm to solve DPCTP(G) on reconfigured network N with capacity b e and transit time τ e for eachē ∈ E. Let y be the corresponding flow.

3.
For each θ ∈ T and reverse e ∈ A up to the capacity y e − b e iff y e > b e , b e replaced by 0 whenever e / ∈ A.

4.
For each θ ∈ T and e ∈ A, if e is reversed, r(e) =bē − y e and r(e ) = 0. If neither e nor e is reversed, r(e) = b e − y e , where r(e) is the saved capacity of e.

Theorem 7.
On the S-d network, the EAPCTP can be solved in polynomial time in the input plus output size.
If the network is s-D with arbitrary transit times, its solution does not exist, because there is always conflict of which s-D path should be used first to make earliest possible flows. However, if transit times are assumed to be zero, every s-D path has same length yielding optimal earliest arrival contra-transshipment solution in polynomial time. Different networks can be categorized as in [45], wherein the s-D network EAPCTP can be solved polynomially using Algorithm 5 with reversing the partial capacities of arcs. Theorem 8. The EAPCTP problem can be solved polynomially on multi-sink networks with transit time zero on each arc, saving the unused arc capacities.
Even with the zero transit times, for the S-D network, an earliest arrival transshipment solution is not possible. Consider a network N with two sources, s 1 and s 2 ; two sinks, d 1 and d 2 ; and arcs (s 1 , d 1 ), (s 1 , d 2 ), and (s 2 , d 2 ). Each source and sink have supply 2 and demand 2, and each arc has unit capacity. If we use all paths at time zero, we can transship three units of flows. But leaving the path s 1 -d 2 empty, we can transship only two units of flow at time zero violating the maximality at every time point.
Thus, we investigate for an approximate solution for the S-D network earliest arrival partial contra-transshipment problem. For the solution, the reconfigured S-D transshipment network is transformed into time-expanded network. Then, the extended time-expanded network is constructed adding supper source s * and super sink d * with enough time bound, T, in which we can apply the algorithm of Gross et al. [23] that computes 2-value approximate earliest arrival transshipment solution. The optimal earliest arrival transshipment solution is bounded by 2 times the earliest arrival transshipment solution, called the 2-value approximate earliest arrival transshipment. It is equivalent to the 2-value approximate earliest arrival contra-transshipment on given network with arbitrary transit time on each arc. As it works on a time-expanded network, its time complexity is pseudo-polynomial. However, if the transit time is reduced to be zero, polynomial time 2-value approximation EAPCT can be obtained using the algorithm in [46] on Step 2 of Algorithm 5, thereby reversing the necessary parts of the segments and saving unused arc capacities in Steps 4 and 5.
Theorem 9. The 2-value approximated EAPCT on S-D network can be solved efficiently by saving all unused arc capacities of arcs.

Lane Reversals with Variable Attributes
We consider problems with variable transit times as a nonlinear function of probable congestion due to the current situation of flow in arcs. The transit times are flow dependent if they depend upon the density, speed and flow rate along the arcs. The inflow-dependent transit time τ e (x e (θ)) depends on inflow rate x e (θ) at given time point θ so that, at a time, the flow units enter an arc e with uniform speed which remains uniform throughout this arc.

Contraflow with Inflow Dependent Transit Times
To introduce the inflow-dependent quickest partial contraflow problem (IFDQPCFP), the function τ in Problem 4 is replaced by inflow-dependent transit time function τ(x), which comprises functions τ e (x e ), which denote the transit time on arc e if the inflow rate is x e , for each e ∈ A (see also [47]).
In what follows, we model the problem and present a strongly polynomial time algorithm for an approximate solution of IFDQPCFP.
In oder to model the inflow-dependent flow over time problem, assume that at any moment of time the transit time function on an arc is given as a piecewise constant, nondecreasing, left-continuous function of inflow rate, Köhler et al. [2]. Note that this function can be restricted to be only integral values as it can be easily relaxed to allow arbitrary rational values by scaling the time with a proper way. Moreover, any general non-negative, nondecreasing, left-continuous function has been approximated by a step function within arbitrary precision.
Along with the inflow rate, the transit time functions generally depend on the free flow transit time and capacity of the arc. If the capacity of an arc is increased, more flow can be sent along the arc and the units of flow take less time to travel the same arc. In a contraflow configuration, the auxiliary network is constructed by adding the capacities of the opposite arcs. Therefore the same amount of flow may take less time to reach from one end of the arc to the other end in comparison to the one without contraflow configuration. We assume that the free flow transit time in the two opposite arcs and the arc with which they are replaced with in the contraflow configuration are identical. The value of the transit time function on the arc in the auxiliary network is the result of the free flow transit time and the enhanced capacity. We assume that the transit time τ e on an arc e is a function of the inflow rate x e (θ), the free flow transit time τ 0 e , and the capacity b e . Our approach is to find the quickest flow in the form of a temporally repeated static flow y, we assume that τ e is given as a function of the static flow rate y e , τ 0 e , b e . Let τ e (y e ) = f (y e , τ 0 e , b e ).
Then, for some y e = ζ, assuming that the free flow transit times on the opposite arcs e and e are equal, we have, and on the auxiliary network We present Algorithm 6 to solve the single-source single-sink IFDQPCF Problem 6.
Problem 6. Given a network N = (V, A, b, τ, s, d, Q 0 ) with inflow-dependent τ, integer inputs, and fixed flow value Q 0 , the s-d inflow-dependent quickest partial contraflow problem (IFDQPCFP) is to find a minimum time T to transship the flow value Q 0 allowing partial arc reversals.

2.
Compute the static flow y corresponding to the quickest flow on N using algorithm of Köhler et al. [2]. 3.
Decompose y into paths and cycles and remove flows in cycles.

4.
Reverse e ∈ A up to the capacity y e − b e iff y e > b e , b e replaced by 0 whenever e / ∈ A.

5.
For each e ∈ A, if e is reversed, r(e) =bē − y e and r(e ) = 0. If neither e nor e is reversed, r(e) = b e − y e , where r(e) is the saved capacity of e.
Before we realize the correctness of Algorithm 6, we show that the temporally repeated flow with inflow-dependent transit times can be computed using a bow network in Step 2 as in Köhler et al. [2]. Let τ st be the step function representation of τ, such that for a particular arc e = (v, w) ∈ A, τ st e (z) = τ i , z ∈ (z i−1 , z i ], i = 1 · · · k, where 0 = z 0 < z 1 < · · · < z k = b e and z i , τ i are non-negative integers. To construct the bow graph, we introduce (i) regulating arcs ρ i (i = 1 · · · k) with capacity z i and transit time 0, such that the tail of ρ i is the head of ρ i+1 for i = 1 · · · k − 1 and tail of ρ k is v, and (ii) bow arcs β i (i = 1 · · · k) with infinite capacity and transit time τ i such that the tail of β i is the head of ρ i and the head of β i is w. Figure 4 shows the bow graph representation of e = (v, w) in which τ st e (z) = 2, z ∈ (0, We denote the bow network corresponding to the network N = (V, The best-known strongly polynomial algorithm so far is the cancel-and-tighten algorithm in [44]. Let T B be the quickest time to send a flow of value Q 0 from s to d. Thus, T B is a lower bound on the optimal time T * in N . The quickest flow computation, e.g., by cancel-and-tighten algorithm, yields a static flow y B on N B . Temporal repetition of y B over the time horizon T B yields a dynamic flow The dynamic flow x B in N B may not yield a feasible dynamic flow in N [2]. We overcome the difficulty by pushing the static flow from fast bow arcs to the slowest positive flow carrying bow arc (say, β e ) for each e ∈ E. This results into a modified static flowȳ B , with val(ȳ B ) = val(y B ), which induces a temporally repeated dynamic flowx B in N B with time horizon T ≥ T B . T can be calculated by using the equation One can show that and as val(x B ) is an increasing function of T, it can be realized that T ≤ 2T B . For any e ∈ E, asȳ B uses at most one bow arc β e , we can find a feasible dynamic flow x in N such that x e (θ) =x B β e (θ) ≤ȳ  Proof. First, the IFDQPCFPA algorithm (cf. Algorithm 6) is feasible, as all of its steps are feasible. On auxiliary network N , we can compute the temporally repeated flow with inflow-dependent transit times using the algorithm of Köhler et al. [2] that gives the approximate quickest flow as in Lemma 2 as well as we can save all the unused arc capacities. From the feasibility of our algorithm, we directly conclude that every feasible quickest flow solution on the reconfigured network N is equivalent to the quickest flow solution in the original network N as in constant transit times [28,30,32]. Thus, the obtained approximate quickest flow on N is the approximate quickest partial contraflow for network N with inflow-dependent transit times which can be obtained in polynomial time complexity.

Case Illustration
To illustrate some computational results, we consider Kathmandu road network containing major road sections (cf. Figure 5) as an evacuation network N with n = 44 and m = 124. The transit time (which we consider as the free flow transit time) in each road segment is as provided by Google Maps, and the integer capacity is assumed to be between 1 to 4 flow units per second according to the width of the segment. Related data are given in Appendix A (Tables A1 and A2). For the purpose of calculating inflow-dependent transit time on each arc e, we consider the following two functions given in [48] and present an analysis corresponding to each of them in parallel.
Given the number of flow units Q 0 to be evacuated, to find the quickest flow allowing (partial) arc reversal, we construct the auxiliary network of the evacuation network. To solve the problem with the transit time depending on the inflow on each arc, we construct the bow graph of the auxiliary network as described in Section 5.
To construct the bow graph, measuring y e , b e in flow units per second and t 0 e in seconds, we consider the transit time function as the step function where y e represents the least integer greater than or equal to y e and τ e (y e ) is the value of τ e (y e ) rounded to the nearest integer. As an example, the step function representation of a function on an arc with the free flow transit time 120 s and capacity four units of flow per second is given in Figure 6.  We find the static flow corresponding to the quickest flow in the bow graph, and we push the flow to the slowest arc (see Section 5) to find the approximate dynamic flow corresponding to the quickest flow. To compare the quickest time T * in the bow graph and its approximate value T approx , we consider Q 0 between 1 to 10,000 with a gap of 500. The results are shown in Figure 7. We find the maximum value of T approx T * to be 1.045 in case of BPR function and 1.098 in case of Davidson's function. We compare the quickest times before and after allowing partial arc reversal in Figure 8. For Q 0 as small as 500, the quickest time before allowing (partial) arc reversal using the BPR function is approximately 29.5 min; whereas, after allowing arc reversal, it is 27.6 min (i.e., approximately 93.5% of the time before allowing arc reversal). With the increase in the value of Q 0 , the gap increases. For Q 0 as large as 100,000, the value after allowing arc reversal is 141.7 min, 57.6% of the value before allowing arc reversal which is 246.1 min. The quickest times for some values of Q 0 before and after allowing arc reversal are listed in Table 2.
The number of arcs reversed (partially) for some values of Q 0 are given in Table 3. The observations show that increasing Q 0 beyond a sufficient large value does not increase the number of arcs reversed beyond some fixed value (e.g., 29 in this case).
We also compare the quickest times with inflow-dependent transit time on arcs against the quickest times with constant transit time on arcs. For the purpose, we consider three types of constant transit time τ e for each e ∈ A:  It is observed, in the network considered, that the quickest times corresponding to the constant time on each arc as the average of the corresponding step function are very close to the quickest time with inflow-dependent transit time (cf. Figure 10).

Conclusions
Highlighting the overall pros and cons of the complete contraflow models and algorithms, a new and more relevant approach-a partial lane reversal strategy-has been introduced in this paper. Using this approach, we can send maximum evacuees in minimum evacuation time recording all unused capacities of the lanes for other crucial emergency and logistic supports for the evacuees with partial reversals of lane capacities. The static partial contraflow problems and the dynamic partial contraflow problems including, the maximum dynamic, the earliest arrival, quickest, lex-maximum dynamic, generalized universally maximum, and partial contra-transshipment problems, have been solved with efficient algorithms. The maximum dynamic and earliest arrival contraflow problems are generalized on lossy networks with partial contraflow reconfiguration. Polynomial time algorithms to solve these problems with constant transit time on each arc have been proposed.
Moreover, the partial contraflow models with variable transit time on each arc have been introduced for the first time. For the inflow-dependent transit times on each arc, an algorithm with strongly polynomial time complexity has been presented that computes an approximate solution to the two terminal quickest contraflow problem with partial lane reversals, which is substantiated by numerical computations considering a case of Kathmandu road network as an evacuation network. The algorithms related to static flow are useful when one is interested to find the maximum rate of flow (evacuees) that can reach the sink(s). Within a specified time, if the maximum number of evacuees have to be evacuated, algorithms related to maximum dynamic flow are useful. The algorithms related to quickest flow are useful to identify the minimum time to evacuate a known number of evacuees.
To the best of our knowledge, the problems investigated in this work are conducted for the first time in the partial contraflow approach. Although these models provide information about the parts of the road segments not used by evacuees, they do not guarantee the existence of such a path between given nodes which may be required for movement of facilities from a node towards sources. As we have investigated only a single-source single-sink model with variable attributes to identify the quickest time, we are interested to extend these contraflow and partial contraflow models and algorithms to solve other network flow over time problems with variable attributes. In addition, we intend to implement the results for supporting logistics in emergencies using the partial contraflow techniques. LMDPCFP Lexicographic maximum dynamic partial contraflow problem LMSPCFA Lexicographic maximum static partial contraflow algorithm LMSPCFP Lexicographic maximum static partial contraflow problem MDPCFA Maximum dynamic partial contraflow algorithm MDPCFP Maximum dynamic partial contraflow problem MSPCFA Maximum static partial contraflow algorithm MSPCFP Maximum static partial contraflow problem QPCFA Quickest partial contraflow algorithm QPCFP Quickest partial contraflow problem UMPCFA Universal maximum partial contraflow algorithm UMPCFP Universal maximum partial contraflow problem Table A2. Network data considered in Section 6 (contd. . . ). e