Advances in Operations Research

Volume 2016 (2016), Article ID 7902460, 7 pages

http://dx.doi.org/10.1155/2016/7902460

## Continuous Time Dynamic Contraflow Models and Algorithms

Central Department of Mathematics, Tribhuvan University, P.O. Box 13143, Kathmandu, Nepal

Received 10 September 2015; Accepted 6 March 2016

Academic Editor: Konstantina Skouri

Copyright © 2016 Urmila Pyakurel and Tanka Nath Dhamala. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

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.

#### 1. 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 , 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 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.

#### 2. Basic Denotations and Models

A directed graph where and , with a set of nodes and a set of , 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 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 from node to is the transit time . Here we consider the constant transit time; that is, if we send one unit of flow from node at time with flow rate one, then it will reach the node at time with flow rate one. We assume that , where and for the node . 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 . 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 and all time related parameters are integers. But, in continuous approach, can take any value in . 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 be the domain of time that can be valid for both discrete and continuous approaches; that is, in a discrete model and in a continuous model.

Let the reversal of an be . For a contraflow configuration of a network with symmetric transit times, the auxiliary network consists of the modified arc capacities and transit times as where an edge in if in . The remaining graph structure and data are unaltered.

##### 2.1. Natural Transformation of Discrete into Continuous Model

Let and be the amount of flow on an and the rate of flow on an , respectively. Thus, is the amount of flow on at discrete time and is the amount of flow that enters 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 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 at time for and set the continuous flow rate to for . 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 , , , 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 is a static flow and it has a standard decomposition into a set of chains with that satisfies where all chains in start and end at the terminal nodes and use the arcs in the same direction as 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.

##### 2.2. Continuous Dynamic Flow Model

The static flow is defined on that satisfies the capacity constraint 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 of a static flow with respect to capacity is the same network with redefined residual capacities as for forward arc and for backward arc.

A discrete dynamic flow is a function that represents a flow to each arc at each time step satisfying the capacity constraint 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 in (7) satisfying the constraints (5) and (6):The continuous earliest arrival flow (CEAF) problem maximizes in (8) satisfying the constraints (5) and (6) for all :

#### 3. 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 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 has value 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 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 , 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 is equivalent to the MDF solution on corresponding auxiliary network . 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 with natural transformation of [9] is similar to a feasible MCDCF on original network as in Lemma 3.

Lemma 3. *Every MCDCF in original network is equivalent to the MCDF on the corresponding auxiliary network .*

To solve the MCDCF problem, first we adopt the discrete MDCF algorithm of [2] on two-terminal network . By reversing the direction of arcs towards the sinks, we compute an auxiliary network . 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 is reversed if and only if the flow on is greater than or if there is a nonnegative flow along .

*Algorithm 4 (maximum continuous dynamic contraflow (MCDCF)). *(1) Given a network .

(2) Obtain the auxiliary network .

(3) On network , we apply MCF algorithm of [9] with flow rate , capacity , and transit time .

(4) Perform flow decomposition into chain and cycle flows of the maximum flow resulting from Step (3) and the cycle flow is removed.

(5) is reversed, if and only if the flow along is greater than or if there is a nonnegative flow along and the resulting flow is MCDF with the arc reversals for the network .

(6) Obtain the maximum continuous dynamic contraflow solution.

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 or 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 two-terminal network optimally.*

*Proof. *By reversing the direction of arcs in linear time, we obtain the auxiliary network . On 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 . Moreover, any optimal flow in auxiliary networks is equivalent to the optimal contraflow in original networks (cf. Lemma 3). That is, the MCDF in is equivalent to the MCDCF in .

Corollary 6. *The MCDCF solution can be obtained in , where and 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 . 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).

#### 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 , the QCCF problem is to find the minimum time 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 into its auxiliary network . 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 is a feasible QCCF in .

Theorem 8. *For given two-terminal network with integer supply , the QCCF problem can be solved polynomially.*

Notice that the construction of auxiliary network 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.

#### 5. 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 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 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 . The temporally repeated flow thus obtained is an optimal solution to the EACF problem on a two-terminal series-parallel graph in time .

A single is series-parallel with starting terminal and end terminal . Let and be two series-parallel graphs with starting terminals and and the end terminals and , respectively. Then, the graph obtained by identifying as in the series combination is a series-parallel graph with and as its terminals. The graph obtained by identifying as and also as in the parallel combination is a series-parallel graph with and as its terminals.

Moreover, authors in [6] studied the approximate solution for EACF on two-terminal arbitrary network 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 for any (cf. Section 5.2).

##### 5.1. 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 .

*Algorithm 10 (continuous time EACF on TTSP networks). *(1) In Step (3) of Algorithm 4, we run the minimum cost circulation flow algorithm of [13] with natural transformation of [9] having flow rate , capacity , and transit time .

(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].