Continuous Time Dynamic Contraflow Models and Algorithms

The research on evacuation planning problem is promoted by the very challenging emergency issues due to large scale natural or man-created disasters. It is the process of shifting the maximum number of evacuees from the disastrous areas to the safe destinations as quickly and efficiently as possible. Contraflow is a widely accepted model for good solution of evacuation planning problem. It increases the outbound road capacity by reversing the direction of roads towards the safe destination. The continuous dynamic contraflow problem sends the maximum number of flow as a flow rate from the source to the sink in every moment of time unit. We propose the mathematical model for the continuous dynamic contraflow problem. We present efficient algorithms to solve the maximum continuous dynamic contraflow and quickest continuous contraflow problems on single source single sink arbitrary networks and continuous earliest arrival contraflow problem on single source single sink series-parallel networks with undefined supply and demand.We also introduce an approximation solution for continuous earliest arrival contraflow problem on two-terminal arbitrary networks.


Introduction
In normal understanding, an evacuation planning problem is the procedure of shifting residents from disastrous zones to safety areas as successfully as possible with maximum reliability.For an evacuation network, contraflow is a widely accepted model for a good solution rather than an optimal one for practical cases.It increases the outbound road capacity by reversing the direction of arcs.It is a challenging problem of finding a network reconfiguration with ideal lane directions satisfying the given constraints that optimizes the given objective.With the aim of responding to different large scale disasters, many contraflow evacuation plans have been developed that seek to remove traffic jams and make the traffic systematic and smooth.In the literature, we find various mathematical models, heuristics, optimization, and simulation techniques with contraflow for the transportation networks, [1,2].
There are only some analytical optimization techniques in the literature handling discrete dynamic contraflow problems.The first analytical solution for two-terminal maximum dynamic contraflow (MDCF) problem has been presented in [2] with efficient algorithm.The MDCF problem on multiterminal networks is NP-hard in the strong sense even with two sources and one sink or vice versa.The proofs follow by reductions from the problems 3-SAT and PARTITION [1,2].Author in [2] also solved the quickest contraflow (QCF) problem on two-terminal networks polynomially.Its solution is based on parametric search algorithms of [3].They proved that the multiterminal QCF problems are harder than 3-SAT and PARTITION.An optimal solution to the - MDCF (and - EACF) problem on a two-terminal series-parallel graph (TTSP-graph) has been obtained in [4].Authors in [5] showed that the EACF problem for general graphs always exists with relaxation of arc reversal capability at a number of times when an EAF solution demands this property.For two-terminal network N, an approximate EACF solution has been presented in [6].For multiterminal networks with given supply and demand, lexicographically maximum dynamic contraflow (LMDCF) problem has been solved in polynomial time complexity [5].Moreover, the earliest arrival transshipment contraflow problem in different particular networks has been solved in [7].
In this paper, we introduce a continuous contraflow model and present some efficient algorithms to solve it.We 2 Advances in Operations Research mainly focus on the analytical solution for the problem.However, its importance from the practical point of view would also be interesting.
The organization of the paper is as follows.In Section 2, we study briefly the continuous network flow problems and explain the terminology used in the rest of the paper.A polynomial time algorithm with contraflow configuration is introduced for the maximum continuous dynamic contraflow problem in Section 3. In contrast to the maximum continuous dynamic contraflow, we solve the quickest continuous contraflow problem that finds minimal time required to shift given integral value of flow in Section 4. By sending the maximum amount of flow from the beginning of time, we solve the continuous earliest arrival contraflow problem presenting strongly polynomial time algorithm on two-terminal series-parallel networks in Section 5.1.Section 5.2 presents an approximate solution for the continuous earliest arrival contraflow problem on two-terminal arbitrary networks.Section 6 concludes the paper.

Basic Denotations and Models
A directed graph  = (, ) where || =  and || = , with a set of nodes  and a set of arcs , represents an evacuation scenario.We have considered the contraflow problem, so two-way network configuration is allowed.Let  ⊂  and  ⊂  be a set of source nodes, that is, initial location of evacuees, and a set of sink nodes, that is, safe location for evacuees with enough capacity, respectively.Nodes  and  represent the single source and single sink.Let   () on an arc  ∈  be an upper bound on the amount of flow actually on that arc.Let   () be the rate of flow that is the amount of flow entering the particular arc per time unit.It is bounded by arc capacity of that arc; that is,   () ≤   ().The time needed to transfer one unit of flow on arc  = (V, ) from node V to  is the transit time ().Here we consider the constant transit time; that is, if we send one unit of flow from node V at time  with flow rate one, then it will reach the node  at time +() with flow rate one.We assume that  out  =  in  = 0, where The group of evacuees is modeled as a flow which passes through the network over time.
With predetermined time , we represent the transportation network as the collection of all data N = (, ,   , , , , ).We assume a finite time horizon  that means everything must happen before a given stop time .Time can increase in discrete increments or continuously.In discrete time approach, we appear at the networks with a suitable time unit like at times  = 1, 2, . . .,  and all time related parameters are integers.But, in continuous approach,  can take any value in [0, ].By converting the continuous flow models into discrete ones, time can be discretized in practical models.The choice of time unit affects the problem directly; that is, if the time unit is shorter, then the problem is more complex.Let T be the domain of time that can be valid for both discrete and continuous approaches; that is, T = {0, 1, 2, . . ., } in a discrete model and T = [0, ] in a continuous model.
Let the reversal of an arc  = (V, ) be  −1 = (, V).For a contraflow configuration of a network N with symmetric transit times, the auxiliary network N = (, ,   , , , , ) consists of the modified arc capacities and transit times as where an edge  ∈  in N if  ∨  −1 ∈  in N. The remaining graph structure and data are unaltered.

Natural Transformation of Discrete into Continuous
Model.Let  stat () : T :→ R + and   () : T → R + be the amount of flow on an arc  and the rate of flow on an arc , respectively.Thus,  stat (, ) is the amount of flow on arc  at discrete time  and   (, ) is the amount of flow that enters arc  at continuous time .These two functions are closely related in continuous and discrete models, respectively [8]: The distinguish between the discrete time approach and continuous time approach depends upon the flow that entering an arc  at time  − () has already arrived at the head node by  or is still on the arc at that moment.In the discrete approach, we assume that such a flow is already at the head node at time .
Let   (, ) be a feasible discrete flow entering arc  ∈  at time  for  = 0, 1, . . .,  − 1 and set the continuous flow rate   (, ) to   (, ) for  ∈ [,  + 1).We assume that the arc capacities do not change.Then, from this natural transformation, we obtain a feasible continuous flow and the flow value in any integral interval [,  + ),  = 0, 1, . . .,  − 1,  ∈ , will be same for both   and   .Authors in [9] presented this natural transformation for many discrete dynamic flows based on chain decomposable flows to transform into continuous dynamic flows and proved its optimality.
Suppose that  stat is a static flow and it has a standard decomposition into a set of chains Γ = { 1 , . . .,   } with  ≤  that satisfies  stat = ∑  =1   where all chains in Γ start and end at the terminal nodes and use the arcs in the same direction as  stat does in discrete time approach.The lengths of all chains   satisfy (  ) ≤  for standard chain decomposition Γ.Then, Γ computes a feasible dynamic flow obtained by summing the dynamic flows induced by each chain flow.
For the integral time horizon , the natural transformation of chain decomposable flows is feasible.If  is not integral, then we have a discrete ⌈⌉ time.Due to the integral transit time, all the chain flows have integral length.This results in that the chain flows used with time horizon ⌈⌉ can also be used with time bound .A chain flow is not affected by the time it starts to use an arc.But it reduces the time when the chain flow uses the arc.Thus, a discrete ⌈⌉-horizon chain decomposable flow can be transformed naturally into a continuous -horizon flow and stop sending flow along each chain flow  at time  − () instead of time ⌈⌉ − ().In dynamic flow, a chain induces the same amount of flow at each chain flow.Hence if the discrete chain decomposable flow is feasible, then the continuous chain decomposable flow is also feasible.

Continuous Dynamic Flow Model.
The static flow  stat is defined on  that satisfies the capacity constraint 0 ≤  stat ≤   and flow conservation constraints: If a static flow satisfies the flow conservation constraints at terminals also, then it is a static circulation.The residual network N  of a static flow  stat with respect to capacity   is the same network with redefined residual capacities as   −  stat for forward arc and  stat > 0 for backward arc.
A discrete dynamic flow is a function  dyna that represents a flow to each arc at each time step  satisfying the capacity constraint 0 ≤  dyna (, ) ≤   (, ) for all time steps  and flow conservation constraints with allowing holdover at nodes: Let   be a continuous dynamic flow with the capacity constraints as flow rate constraint and the flow conservation constraints similar as for the discrete dynamic flow, with the sum over time replaced by an integral as follows: For a given time , the maximum continuous dynamic flow (MCDF) problem maximizes val(  , ) in ( 7) satisfying the constraints ( 5) and ( 6): The continuous earliest arrival flow (CEAF) problem maximizes val(  , ) in ( 8) satisfying the constraints ( 5) and ( 6) for all  ∈ [0, ]:

Maximum Continuous Dynamic Contraflow
In this section, we discuss the maximum continuous dynamic contraflow (MCDCF) problem.Recall that the maximum dynamic flow (MDF) problem was solved in [10] by solving a minimum cost flow (MCF) problem with the arc costs as travel times on arcs.A MDF has been obtained by the temporally repeated flows (TRFs).The static optimal flow is decomposed into paths which are TRF over time , yielding the MDF.With a static flow  stat and a chain decomposition Γ, authors in [10,11] calculated the MDF value associated with a TRF for given time horizon  as in (9).The sum on the right depends on only the static flow and not on the particular Γ: The temporally repeated flow expressed in (9) can be extended to continuous time.For the networks with fixed arc capacities, authors in [12] showed that the maximum continuous dynamic flow in time  has been obtained with the temporally repeated flow as in Theorem 1.
Theorem 1 (see [12]).The MCDF in time  in a network N has value V(  )−∑ ∈ ()  where   is a minimum cost circulation flow (MCCF) in the network with an additional (, ) arc with cost − and infinite capacity.
In this section, we first study the single source and single sink MCDCF problem.We assume that the arc is reversed at time zero without any processing cost.That means, if we choose to reverse an arc, it remains reversed from time 0 to .We assume that the network is allowed to be asymmetric with respect to the arc capacities.However, if both directions of an arc are included in the network, then transit time of these two arcs must be the same.Thus, reversing an arc only changes the capacity of the arc but does not alter its transit time.
Problem 2. Given a dynamic network N = (, ,  , , , , ), the MCDCF problem is to find a maximum continuous flow by maximizing Objective (7) with respect to constraints (5) and ( 6) that can be sent from  to  in time , if the direction of arcs can be reversed at time zero.
Recall that authors in [2] solved the maximum dynamic contraflow (MDCF) problem in discrete time .The philosophy of the MDCF solution is that every MDCF solution in original network N is equivalent to the MDF solution on corresponding auxiliary network N.In continuous dynamic contraflow model with arc reversal at time zero, the capacity of the reversed arc is obtained by adding two-way arcs capacities but the transit time remains the same.Thus, the flow rate on arc increases but does not exceed the reversed capacities.This proves that the optimal MCDF obtained on auxiliary network N with natural transformation of [9] is similar to a feasible MCDCF on original network N as in Lemma 3.

Lemma 3. Every MCDCF in original network N is equivalent to the MCDF on the corresponding auxiliary network N.
To solve the MCDCF problem, first we adopt the discrete MDCF algorithm of [2] on two-terminal network N. By reversing the direction of arcs towards the sinks, we compute an auxiliary network N.Then, apply the MCF algorithm for continuous time as presented in [9] that obtains the MCDF on the auxiliary network.The obtained MCDF is decomposed into paths and removable cycles.An arc (, V) ∈  is reversed if and only if the flow on (V, ) is greater than   (V, ) or if there is a nonnegative flow along (V, ) ∉ .
(4) Perform flow decomposition into chain and cycle flows of the maximum flow resulting from Step (3) and the cycle flow is removed.
(5) Arc (, V) ∈  is reversed, if and only if the flow along arc (V, ) is greater than   (V, ) or if there is a nonnegative flow along arc (V, ) ∉  and the resulting flow is MCDF with the arc reversals for the network N.
To show the feasibility of Algorithm 4, it is enough to show that only Step ( 5) is well defined.The flow is decomposed into paths and cycles with positive flows in Step (4).The positive flow along all cycles is canceled and there is no flow along any cycle.Therefore, there is a flow along either arc(V, ) or (, V) but never in both arcs.This proves that the flow is not greater than the reversed capacities on all the arcs at all time units.This proves that the flow is bounded by the capacities on all reversed arcs at all time units.

Theorem 5. Algorithm 4 solves the MCDCF problem on twoterminal network optimally.
Proof.By reversing the direction of arcs in linear time, we obtain the auxiliary network N. On N we run the continuous dynamic temporally repeated flow algorithm of [9] that gives the MCDF solution by using Theorem 1.The obtained continuous flow is decomposed into chains and cycles.The cycles are removed.The flow obtained in Step (3) of the algorithm does not change in Steps ( 4) and ( 5).Thus, this flow is optimal in auxiliary network N.Moreover, any optimal flow in auxiliary networks is equivalent to the optimal contraflow in original networks (cf.Lemma 3).That is, the MCDF in N is equivalent to the MCDCF in N. Corollary 6.The MCDCF solution can be obtained in (ℎ 1 (, ) + ℎ 2 (, )), where ℎ 1 (, ) = () and ℎ 2 (, ) = ( 2  3 log ) are the time required to solve the flow decomposition and the minimum cost flow problem, respectively.Proof.By the natural transformation, the MDF obtained by solving temporally repeated minimum cost flow (MCF) problem of [10] is a MCDF on N. Thus, the complexity to solve the MCDF problems remains the same as in discrete solution since the complexity of Algorithm 4 is dominated by Steps (3) and (4).

Quickest Continuous Contraflow
In contrast to the MCDCF problem, the quickest continuous contraflow (QCCF) problem shifts the given integral value ] of flow from source  to sink  in minimal time by reversing the direction of arcs towards the sink without any processing cost.
Problem 7. Given a dynamic network N = (, ,   , , , ), the QCCF problem is to find the minimum time min  = (]) satisfying the constraints ( 5) and ( 6) required to send a given integral flow value ] from  to  having arc reversal capability at time zero.
In discrete time setting, quickest contraflow problem has been polynomially solved in [2] on two-terminal networks.This solution has been based on the parametric search algorithms of [3].First an upper bound on the quickest time has been obtained in polynomial time by computing a path from source to sink.Then a binary search has been applied repeatedly to obtain MDCF along the path until all supply at the source is sent to the sink.
In continuous time setting, using the natural transformation of [9], the QCCF problem on two-terminal networks for given integral supply ] can be solved polynomially.First, we convert given network N = (, ,   , , , ) into its auxiliary network N = (, ,   , , , ).In auxiliary network, we solve the quickest continuous flow (QCF) problem using natural transformation of [9] in Step (3) of Algorithm 4. As in [9], for integral supply ] and integral transit times, the time of the quickest flow is a rational number with a denominator bounded by the size of a minimum cut in the network.This time can also be obtained by binary search algorithms of [3] as in discrete solution.By Lemma 3, the obtained QCF in N is a feasible QCCF in N. Theorem 8.For given two-terminal network N with integer supply ], the QCCF problem can be solved polynomially.
Notice that the construction of auxiliary network N = (, ,   , , , ) can be done in polynomial time.Moreover, the quickest continuous flow can be obtained in polynomial time using the methodology of [9].From Lemma 3, the obtained QCF solution in auxiliary network is equal to the QCCF solution in original network.As the QCF solution in auxiliary network can be computed in polynomial time, the overall complexity required to solve the QCCF problem is polynomial.

Continuous Earliest Arrival Contraflow
We initiate the continuous earliest arrival contraflow (CEACF) problem in this section.It is also known as universal continuous maximum contraflow (UCMCF) problem.It is an extension of the maximum continuous dynamic contraflow problem with an additional property: the cumulative amount of flow having reached the sink in every considered time and all preceding times of the considered one have to be maximal.This property is called the earliest arrival property.Problem 9. Let N = (, ,   , , , , ) be a two-terminal network.The CEACF problem is to find a feasible continuous dynamic flow from source  to sink  which is maximum for all times 0 ≤  ≤  by maximizing Objective (8) satisfying constraints ( 5) and ( 6) if the direction of arcs can be reversed at time zero.
In general there is no efficient solution in the literature for the two-terminal earliest arrival contraflow problem (EACF) with arbitrary supply and demand on the terminals even in discrete time approach.Authors in [4] studied the problem on two-terminal series-parallel graphs (TTSP-graphs) and presented strongly polynomial time algorithm to solve it.Their algorithm has been obtained by a modification of MDCF algorithm in [2] using the MCCF algorithm of [13].The main advantage in series-parallel networks is that every cycle in the residual networks has nonnegative cycle length.This solves the MCCF problem introduced in [11] for the MDF problem in the auxiliary network N. The temporally repeated flow thus obtained is an optimal solution to the - EACF problem on a two-terminal series-parallel graph in time ( +  log ).
A single arc  = (, ) is series-parallel with starting terminal  and end terminal .Let  1 and  2 be two seriesparallel graphs with starting terminals  1 and  2 and the end terminals  1 and  2 , respectively.Then, the graph ( 1 ,  2 ) obtained by identifying  1 as  2 in the series combination is a series-parallel graph with  1 and  2 as its terminals.The graph ( 1 ,  2 ) obtained by identifying  1 as  2 and also  1 as  2 in the parallel combination is a series-parallel graph with  1 (=  2 ) and  1 (=  2 ) as its terminals.
Moreover, authors in [6] studied the approximate solution for EACF on two-terminal arbitrary network N with undefined supply and demand.They also presented a fully polynomial time approximation algorithm that computes an approximate solution for EACF by reversing the direction of arcs at time zero.This solution is based on the MDCF algorithm in [2] and the approximate EAF algorithm in [14].
In special TTSP networks, we solve the CEACF problem in strongly polynomial time (cf.Section 5.1).We also establish a polynomial time algorithm that gives an approximate solution for the CEACF problem on two-terminal arbitrary networks within a factor of (1 − ) for any  > 0 (cf.Section 5.2).

Continuous Earliest Arrival
Flow on TTSP Networks.At first we reconsider Algorithm 4 in TTSP networks.It is modified by replacing Step (3) with the minimum cost circulation flow (MCCF) algorithm of [13].The MCCF algorithm solves the MCDF problem having earliest arrival property in strongly polynomial time.We use only forward arcs to make flow in TTSP networks.Thus, every cycle in the residual networks has nonnegative cycle length.This solves the MCCF problem introduced in [11] with natural transformation of [9] for the MCDF problem in the auxiliary network N.
(2) Obtain the continuous earliest arrival contraflow solution on TTSP networks.
The MCDCF solution obtained by Algorithm 4 does not have earliest arrival property.It is unable to find the CEACF solution with arc reversal capability.Because in the network given in Figure 1(b) there may be two orientations (, ) and (, ), it is hard to decide which is the best orientation in continuous time.But in series-parallel network as shown in Figure 1(a), there is not any orientation between the nodes  and .Hence, Algorithm 4 could not find the CEACF solution unless the network is series-parallel.A complication of the CEACF problem arises because of the flipping requirements of such intermediate arcs with respect to the time as in discrete solution of [4].
Algorithm 10 is feasible due to the feasibility of Algorithm 4. This algorithm computes the MCDCF solution in TTSP networks.Due to the minimum cost circulation flow algorithm of [13] with natural transformation of [9], the obtained MCDCF solution always has the earliest arrival flow property.
Proof.By creating auxiliary network N of given network N, we apply the MCCF algorithm of [13] that uses only forward arcs to send flow but not backward arcs.As the MCCF algorithm gives temporally repeated flow, by natural transformation of [9] as in Theorem 1, the obtained flow from Algorithm 10 is the MCDF in auxiliary network N having earliest arrival property.By Lemma 3, the MCDF in N is a feasible MCDCF in original network N with earliest arrival property.As a result, the CEACF is solved in TTSPgraph.Proof.The complexity of Algorithm 10 is dominated by MCCF algorithm of [13].The complexity of the MCCF algorithm is ( +  log ) in discrete time.By natural transformation of [9], this can be extended into continuous time that follows the result.

Approximate CEACF.
As there is not any polynomial time algorithm to solve the CEACF problem on two-terminal arbitrary networks with unknown supply and demand, we discuss its approximation solution in this section.Authors in [6] have presented an polynomial approximation algorithm that obtains a discrete time flow value within (1 − ) of the EACF problem on two-terminal arbitrary networks with unknown supply and demand.Recall that Algorithm 4 does not give the CEACF solution without any modification.Thus, we present a polynomial approximate solution for the CEACF on this network.
Problem 13.Let N = (, ,   , , , , ) be a two-terminal network.Let  > 0 be given.Then, the problem is to find an approximation solution for CEACF from source  to sink  within a factor of (1 − ), for  > 0 in time  if the direction of the arcs can be reversed at time zero without any cost.
We replace Step (3) of Algorithm 4 by fully polynomial time approximate algorithm of [14] in discrete time with natural transformation of [9] into continuous time.Other steps remain as they are.Set the initial flow  dyna = 0, Δ = 1,   (V, ) =   (V, ),  > 0, and Γ = .The algorithm of [14] combines capacity scaling with the shortest augmenting paths algorithm.In their dynamic networks, all capacities are evenly divisible by Δ = 1.Initially they obtained the static flow using shortest augmenting paths algorithm until the flow value exceeds / where the residual capacities are rounded down to the nearest even number (Δ = 2Δ).The flow computed from each augmentation is added to a set of chain flows Γ that will give the final dynamic flow.Thus, each successive phase uses the residual networks obtained from previous phase that is divisible by Δ, multiple of 2, augments flow along shortest paths until the flow value of the new augmentation exceeds Δ/, adds the augmenting chain flows on Γ, and finally rounds the residual capacities down so that they are evenly divisible by 2Δ.This process continues until there is no augmenting path of length less than or equal to .Algorithm 14 (approximate continuous earliest arrival contraflow).(1) In Step (3) of Algorithm 4, we solve the CEAF problem on N = (, ,   , , , , ) using fully polynomial time approximate algorithm of [14] with natural transformation of [9].
Due to the feasibility of Algorithm 4, our algorithm, Algorithm 14, is also feasible.Now we prove the correctness of the algorithm as follows.
Theorem 15.Algorithm 14 computes the approximation solution for the CEACF problem on two-terminal arbitrary networks efficiently.
Proof.Recall that we first convert the given network into auxiliary network at time zero without processing cost.On the auxiliary network, we solve the (1 − )-approximate continuous EAF problem.According to [9], the natural transformation of the approximate discrete EAF gives a continuous dynamic flow of value within (1 − ) of the CEAF for any interval.It is true for both integral  and real .Thus, obtained (1 − )-approximate CEAF on auxiliary networks is equivalent to the (1 − )-approximation for CEACF on original networks.
Proof.As the fully polynomial time approximation algorithm for EAF of [14] requires ( −1 ( +  log ) log ) time, the complexity of Algorithm 14 requires the similar complexity to compute the approximation of CEACF.

Conclusions
We studied the continuous dynamic flow and discrete dynamic contraflow problems.Then, we introduced continuous contraflow model for the MCDCF, QCCF, and CEACF problems with natural transformation.We presented polynomial time algorithms to solve the MCDCF and QCCF problems on two-terminal arbitrary networks with undefined supply and demand.In particular networks, that is, TTSP, we solved the CEACF problem with strongly polynomial time complexity.Moreover, in the arbitrary two-terminal networks, we presented an approximation solution for CEACF problem in polynomial time complexity.
We solved these problems with the same complexity as without contraflow but, according to discrete dynamic contraflow with natural transformation into continuous dynamic contraflow, the flow value may be doubled.In contraflow, we can transship the given flow value two times faster than without contraflow.
To the best of our knowledge, these problems we introduced are for the first time in the continuous network contraflow approach.Furthermore, we are interested to develop the continuous contraflow models and algorithms for the network flow problems in multiterminal networks with the flexibility of arc reversals at any time.Moreover, we are also interested in implementing the continuous contraflow techniques with a case study in our future work.