# Continuous Time Dynamic Contraflow Models and Algorithms

Authors: Urmila Pyakurel; Tanka Nath Dhamala
Journal: Advances in Operations Research
 (2016)

---

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


---

## Body

## 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 s
-
d MDCF (and s
-
d 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 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 Section2, 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 graphG
=
(
V
,
A
) where V
=
n and A
=
m, with a set of nodes V and a set of arcs
A, represents an evacuation scenario. We have considered the contraflow problem, so two-way network configuration is allowed. Let S
⊂
V and D
⊂
V 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 s and d represent the single source and single sink. Let b
A
(
e
) on an arc
e
∈
A be an upper bound on the amount of flow actually on that arc. Let x
r
(
e
) 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, x
r
(
e
)
≤
b
A
(
e
). The time needed to transfer one unit of flow on arc
e
=
(
v
,
w
) from node v to w is the transit time τ
(
e
). Here we consider the constant transit time; that is, if we send one unit of flow from node v at time t with flow rate one, then it will reach the node w at time t
+
τ
(
e
) with flow rate one. We assume that A
d
out
=
A
s
in
=
∅, where A
v
out
=
v
,
w
∈
A and A
v
in
=
w
,
v
∈
A for the node v
∈
V. The group of evacuees is modeled as a flow which passes through the network over time.With predetermined timeT, we represent the transportation network as the collection of all data N
=
(
V
,
A
,
b
A
,
τ
,
S
,
D
,
T
). We assume a finite time horizon T that means everything must happen before a given stop time T. 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 t
=
1,2
,
…
,
T and all time related parameters are integers. But, in continuous approach, t can take any value in [
0
,
T
]. 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
,
…
,
T in a discrete model and T
=
[
0
,
T
] in a continuous model.Let the reversal of anarc
e
=
(
v
,
w
) be e
-
1
=
(
w
,
v
). For a contraflow configuration of a network N with symmetric transit times, the auxiliary network N
¯
=
(
V
,
E
,
b
E
,
τ
,
S
,
D
,
T
) consists of the modified arc capacities and transit times as (1)
b
E
e
¯
=
b
A
e
+
b
A
e
-
1
,
τ
e
¯
=
τ
e
if
e
∈
A
τ
e
-
1
otherwise
,where an edge e
¯
∈
E in N
¯ if e
∨
e
-
1
∈
A in N. The remaining graph structure and data are unaltered.


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

Letx
stat
(
e
)
:
T
:
→
R
+ and x
r
(
e
)
:
T
→
R
+ be the amount of flow on an arc
e and the rate of flow on an arc
e, respectively. Thus, x
stat
(
e
,
t
) is the amount of flow on arc
e at discrete time t and x
r
(
e
,
t
) is the amount of flow that enters arc
e at continuous time t. These two functions are closely related in continuous and discrete models, respectively [8]:(2)
x
stat
e
,
t
=
∫
0
τ
e
x
r
t
-
θ
d
θ
,
x
stat
e
,
t
=
∑
θ
=
0
τ
e
-
1
x
r
t
-
θ
.The distinguish between the discrete time approach and continuous time approach depends upon the flow that entering anarc
e at time t
-
τ
(
e
) has already arrived at the head node by t 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 t.Letx
r
(
e
,
t
) be a feasible discrete flow entering arc
e
∈
A at time t for t
=
0,1
,
…
,
T
-
1 and set the continuous flow rate y
r
(
e
,
θ
) to x
r
(
e
,
t
) for θ
∈
[
t
,
t
+
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 [
t
,
t
+
i
), t
=
0,1
,
…
,
T
-
1, i
∈
N, will be same for both x
r and y
r. 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 thatx
stat is a static flow and it has a standard decomposition into a set of chains Γ
=
γ
1
,
…
,
γ
r with r
≤
m that satisfies x
stat
=
∑
k
=
1
r
‍
γ
k where all chains in Γ start and end at the terminal nodes and use the arcs in the same direction as x
stat does in discrete time approach. The lengths of all chains γ
k satisfy τ
(
γ
k
)
≤
T 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 horizonT, the natural transformation of chain decomposable flows is feasible. If T is not integral, then we have a discrete T 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 T can also be used with time bound T. 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 T-horizon chain decomposable flow can be transformed naturally into a continuous T-horizon flow and stop sending flow along each chain flow γ at time T
-
τ
(
γ
) instead of time T
-
τ
(
γ
). 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 flowx
stat is defined on A that satisfies the capacity constraint 0
≤
x
stat
≤
b
A and flow conservation constraints:(3)
∑
e
∈
A
v
in
x
stat
e
-
∑
e
∈
A
v
out
x
stat
e
=
0
∀
v
∈
V
∖
s
.If a static flow satisfies the flow conservation constraints at terminals also, then it is a static circulation. The residual network N
R of a static flow x
stat with respect to capacity b
A is the same network with redefined residual capacities as b
A
-
x
stat for forward arc and x
stat
>
0 for backward arc.A discrete dynamic flow is a functionx
dyna that represents a flow to each arc at each time step t satisfying the capacity constraint 0
≤
x
dyna
(
e
,
t
)
≤
b
A
(
e
,
t
) for all time steps t and flow conservation constraints with allowing holdover at nodes: (4)
∑
σ
=
τ
e
t
∑
e
∈
A
v
in
x
dyna
e
,
σ
-
τ
e
-
∑
σ
=
0
t
∑
e
∈
A
v
out
x
dyna
e
,
σ
≥
0
,
∀
v
∈
V
∖
s
,
d
,
t
∈
0,1
,
…
,
T
.Letx
r 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:(5)
∫
0
t
∑
e
∈
A
v
in
x
r
e
,
t
-
τ
e
d
t
-
∫
0
t
∑
e
∈
A
v
out
x
r
e
,
t
d
t
≥
0
,
∀
v
∈
V
∖
s
,
d
,
t
∈
0
,
T
(6)
0
≤
x
r
e
,
t
≤
b
A
e
,
t
,
∀
e
∈
A
,
t
∈
0
,
T
.For a given time T, the maximum continuous dynamic flow (MCDF) problem maximizes v
a
l
(
x
r
,
T
) in (7) satisfying the constraints (5) and (6):(7)
val
x
r
,
T
=
∫
0
T
∑
e
∈
A
s
out
x
r
e
,
t
d
t
=
∫
0
T
∑
e
∈
A
d
in
x
r
e
,
t
-
τ
e
d
t
.The continuous earliest arrival flow (CEAF) problem maximizes val
(
x
r
,
t
) in (8) satisfying the constraints (5) and (6) for all t
∈
[
0
,
T
]:(8)
val
x
r
,
t
=
∫
0
t
∑
e
∈
A
s
out
x
r
e
,
t
d
t
=
∫
0
t
∑
e
∈
A
d
in
x
r
e
,
t
-
τ
e
d
t
.


## 2.1. Natural Transformation of Discrete into Continuous Model

Letx
stat
(
e
)
:
T
:
→
R
+ and x
r
(
e
)
:
T
→
R
+ be the amount of flow on an arc
e and the rate of flow on an arc
e, respectively. Thus, x
stat
(
e
,
t
) is the amount of flow on arc
e at discrete time t and x
r
(
e
,
t
) is the amount of flow that enters arc
e at continuous time t. These two functions are closely related in continuous and discrete models, respectively [8]:(2)
x
stat
e
,
t
=
∫
0
τ
e
x
r
t
-
θ
d
θ
,
x
stat
e
,
t
=
∑
θ
=
0
τ
e
-
1
x
r
t
-
θ
.The distinguish between the discrete time approach and continuous time approach depends upon the flow that entering anarc
e at time t
-
τ
(
e
) has already arrived at the head node by t 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 t.Letx
r
(
e
,
t
) be a feasible discrete flow entering arc
e
∈
A at time t for t
=
0,1
,
…
,
T
-
1 and set the continuous flow rate y
r
(
e
,
θ
) to x
r
(
e
,
t
) for θ
∈
[
t
,
t
+
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 [
t
,
t
+
i
), t
=
0,1
,
…
,
T
-
1, i
∈
N, will be same for both x
r and y
r. 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 thatx
stat is a static flow and it has a standard decomposition into a set of chains Γ
=
γ
1
,
…
,
γ
r with r
≤
m that satisfies x
stat
=
∑
k
=
1
r
‍
γ
k where all chains in Γ start and end at the terminal nodes and use the arcs in the same direction as x
stat does in discrete time approach. The lengths of all chains γ
k satisfy τ
(
γ
k
)
≤
T 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 horizonT, the natural transformation of chain decomposable flows is feasible. If T is not integral, then we have a discrete T 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 T can also be used with time bound T. 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 T-horizon chain decomposable flow can be transformed naturally into a continuous T-horizon flow and stop sending flow along each chain flow γ at time T
-
τ
(
γ
) instead of time T
-
τ
(
γ
). 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 flowx
stat is defined on A that satisfies the capacity constraint 0
≤
x
stat
≤
b
A and flow conservation constraints:(3)
∑
e
∈
A
v
in
x
stat
e
-
∑
e
∈
A
v
out
x
stat
e
=
0
∀
v
∈
V
∖
s
.If a static flow satisfies the flow conservation constraints at terminals also, then it is a static circulation. The residual network N
R of a static flow x
stat with respect to capacity b
A is the same network with redefined residual capacities as b
A
-
x
stat for forward arc and x
stat
>
0 for backward arc.A discrete dynamic flow is a functionx
dyna that represents a flow to each arc at each time step t satisfying the capacity constraint 0
≤
x
dyna
(
e
,
t
)
≤
b
A
(
e
,
t
) for all time steps t and flow conservation constraints with allowing holdover at nodes: (4)
∑
σ
=
τ
e
t
∑
e
∈
A
v
in
x
dyna
e
,
σ
-
τ
e
-
∑
σ
=
0
t
∑
e
∈
A
v
out
x
dyna
e
,
σ
≥
0
,
∀
v
∈
V
∖
s
,
d
,
t
∈
0,1
,
…
,
T
.Letx
r 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:(5)
∫
0
t
∑
e
∈
A
v
in
x
r
e
,
t
-
τ
e
d
t
-
∫
0
t
∑
e
∈
A
v
out
x
r
e
,
t
d
t
≥
0
,
∀
v
∈
V
∖
s
,
d
,
t
∈
0
,
T
(6)
0
≤
x
r
e
,
t
≤
b
A
e
,
t
,
∀
e
∈
A
,
t
∈
0
,
T
.For a given time T, the maximum continuous dynamic flow (MCDF) problem maximizes v
a
l
(
x
r
,
T
) in (7) satisfying the constraints (5) and (6):(7)
val
x
r
,
T
=
∫
0
T
∑
e
∈
A
s
out
x
r
e
,
t
d
t
=
∫
0
T
∑
e
∈
A
d
in
x
r
e
,
t
-
τ
e
d
t
.The continuous earliest arrival flow (CEAF) problem maximizes val
(
x
r
,
t
) in (8) satisfying the constraints (5) and (6) for all t
∈
[
0
,
T
]:(8)
val
x
r
,
t
=
∫
0
t
∑
e
∈
A
s
out
x
r
e
,
t
d
t
=
∫
0
t
∑
e
∈
A
d
in
x
r
e
,
t
-
τ
e
d
t
.


## 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 T, yielding the MDF. With a static flow x
stat and a chain decomposition Γ, authors in [10, 11] calculated the MDF value associated with a TRF for given time horizon T as in (9). The sum on the right depends on only the static flow and not on the particular Γ:(9)
val
x
dyna
,
T
=
∑
γ
k
∈
Γ
T
-
τ
γ
k
+
1
val
x
stat
γ
k
=
T
+
1
val
x
stat
-
∑
e
∈
A
τ
e
x
stat
e
.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 T has been obtained with the temporally repeated flow as in Theorem 1.Theorem 1 (see [12]).
The MCDF in timeT in a network N has value T
v
a
l
(
x
s
t
a
t
)
-
∑
e
∈
A
‍
τ
(
e
)
x
s
t
a
t where x
s
t
a
t is a minimum cost circulation flow (MCCF) in the network with an additional (
d
,
s
) arc with cost -
T 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 time0 to T. 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 networkN
=
(
V
,
A
,
b
A
,
τ
,
s
,
d
,
T
), 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 s to d in time T, 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 T. 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 networkN 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
(
w
,
v
)
∈
A is reversed if and only if the flow on (
v
,
w
) is greater than b
A
(
v
,
w
) or if there is a nonnegative flow along (
v
,
w
)
∉
A.Algorithm 4 (maximum continuous dynamic contraflow (MCDCF)).
(1) Given a networkN
=
(
V
,
A
,
b
A
,
τ
,
s
,
d
,
T
).
(2) Obtain the auxiliary networkN
¯
=
(
V
,
E
,
b
E
,
τ
,
s
,
d
,
T
).
(3) On networkN
¯, we apply MCF algorithm of [9] with flow rate x
r
(
e
¯
), capacity b
E
(
e
¯
), and transit time τ
(
e
¯
).
(4) Perform flow decomposition into chain and cycle flows of the maximum flow resulting from Step (3) and the cycle flow is removed.
(5)A
r
c
(
w
,
v
)
∈
A is reversed, if and only if the flow along arc
(
v
,
w
) is greater than b
A
(
v
,
w
) or if there is a nonnegative flow along arc
(
v
,
w
)
∉
A and the resulting flow is MCDF with the arc reversals for the network N.
(6) Obtain the maximum continuous dynamic contraflow solution.To show the feasibility of Algorithm4, 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 a
r
c
(
v
,
w
) or (
w
,
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.
Algorithm4 solves the MCDCF problem on two-terminal network optimally.Proof.
By reversing the direction of arcs in linear time, we obtain the auxiliary networkN
¯. 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 inO
(
h
1
(
n
,
m
)
+
h
2
(
n
,
m
)
), where h
1
n
,
m
=
O
(
n
m
) and h
2
(
n
,
m
)
=
O
(
n
2
m
3
log
⁡
n
) 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).


## 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 s to sink d in minimal time by reversing the direction of arcs towards the sink without any processing cost.Problem 7.
Given a dynamic networkN
=
(
V
,
A
,
b
A
,
τ
,
s
,
d
), the QCCF problem is to find the minimum time min
⁡
T
=
T
(
ν
) satisfying the constraints (5) and (6) required to send a given integral flow value ν from s to d 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
=
(
V
,
A
,
b
A
,
τ
,
s
,
d
) into its auxiliary network N
¯
=
(
V
,
E
,
b
E
,
τ
,
s
,
d
). 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 networkN with integer supply ν, the QCCF problem can be solved polynomially.Notice that the construction of auxiliary networkN
¯
=
(
V
,
E
,
b
E
,
τ
,
s
,
d
) 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.
LetN
=
(
V
,
A
,
b
A
,
τ
,
s
,
d
,
T
) be a two-terminal network. The CEACF problem is to find a feasible continuous dynamic flow from source s to sink d which is maximum for all times 0
≤
t
≤
T 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 s
-
d EACF problem on a two-terminal series-parallel graph in time O
(
n
m
+
m
log
⁡
m
).A singlearc
e
=
(
s
,
d
) is series-parallel with starting terminal s and end terminal d. Let G
1 and G
2 be two series-parallel graphs with starting terminals s
1 and s
2 and the end terminals d
1 and d
2, respectively. Then, the graph S
(
G
1
,
G
2
) obtained by identifying d
1 as s
2 in the series combination is a series-parallel graph with s
1 and d
2 as its terminals. The graph P
(
G
1
,
G
2
) obtained by identifying s
1 as s
2 and also d
1 as d
2 in the parallel combination is a series-parallel graph with s
1
(
=
s
2
) and d
1
(
=
d
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. Section5.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).


### 5.1. Continuous Earliest Arrival Flow on TTSP Networks

At first we reconsider Algorithm4 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
¯.Algorithm 10 (continuous time EACF on TTSP networks).
(1) In Step (3) of Algorithm4, we run the minimum cost circulation flow algorithm of [13] with natural transformation of [9] having flow rate x
r
(
e
¯
), capacity b
E
(
e
¯
), and transit time τ
(
e
¯
).
(2) Obtain the continuous earliest arrival contraflow solution on TTSP networks.The MCDCF solution obtained by Algorithm4 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 (
X
,
Y
) and (
Y
,
X
), 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 X and Y. 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].Figure 1
(a) Series-parallel network. (b) Arbitrary network.
(a)
(b)Algorithm10 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.Theorem 11.
Algorithm10 solves the CEACF in TTSP networks optimally.Proof.
By creating auxiliary networkN
¯ 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 TTSP-graph.Corollary 12.
The CEACF problem on TTSP networks can be solved inO
(
n
m
+
m
log
⁡
m
) time complexity.Proof.
The complexity of Algorithm10 is dominated by MCCF algorithm of [13]. The complexity of the MCCF algorithm is O
(
n
m
+
m
log
⁡
m
) in discrete time. By natural transformation of [9], this can be extended into continuous time that follows the result.


### 5.2. 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.
LetN
=
(
V
,
A
,
b
A
,
τ
,
s
,
d
,
T
) be a two-terminal network. Let ϵ
>
0 be given. Then, the problem is to find an approximation solution for CEACF from source s to sink d within a factor of (
1
-
ϵ
), for ϵ
>
0 in time T if the direction of the arcs can be reversed at time zero without any cost.We replace Step (3) of Algorithm4 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 x
dyna
=
0, Δ
=
1, b
¯
A
(
v
,
w
)
=
b
A
(
v
,
w
), ϵ
>
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 m
/
ϵ 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 Δ
m
/
ϵ, 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 T.Algorithm 14 (approximate continuous earliest arrival contraflow).
(1) In Step (3) of Algorithm4, we solve the CEAF problem on N
¯
=
(
V
,
E
,
b
E
,
τ
,
s
,
d
,
T
) using fully polynomial time approximate algorithm of [14] with natural transformation of [9].
(2) Obtain(
1
-
ϵ
)-approximation solution of CEACF problem for the network N.Due to the feasibility of Algorithm4, our algorithm, Algorithm 14, is also feasible. Now we prove the correctness of the algorithm as follows.Theorem 15.
Algorithm14 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 T and real T. Thus, obtained (
1
-
ϵ
)-approximate CEAF on auxiliary networks is equivalent to the (
1
-
ϵ
)-approximation for CEACF on original networks.Corollary 16.
Algorithm14 computes (
1
-
ϵ
)-approximation for CEACF in O
(
m
ϵ
-
1
m
+
n
log
⁡
n
log
⁡
U
) time.Proof.
As the fully polynomial time approximation algorithm for EAF of [14] requires O
(
m
ϵ
-
1
m
+
n
log
⁡
n
log
⁡
U
) time, the complexity of Algorithm 14 requires the similar complexity to compute the approximation of CEACF.


## 5.1. Continuous Earliest Arrival Flow on TTSP Networks

At first we reconsider Algorithm4 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
¯.Algorithm 10 (continuous time EACF on TTSP networks).
(1) In Step (3) of Algorithm4, we run the minimum cost circulation flow algorithm of [13] with natural transformation of [9] having flow rate x
r
(
e
¯
), capacity b
E
(
e
¯
), and transit time τ
(
e
¯
).
(2) Obtain the continuous earliest arrival contraflow solution on TTSP networks.The MCDCF solution obtained by Algorithm4 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 (
X
,
Y
) and (
Y
,
X
), 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 X and Y. 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].Figure 1
(a) Series-parallel network. (b) Arbitrary network.
(a)
(b)Algorithm10 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.Theorem 11.
Algorithm10 solves the CEACF in TTSP networks optimally.Proof.
By creating auxiliary networkN
¯ 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 TTSP-graph.Corollary 12.
The CEACF problem on TTSP networks can be solved inO
(
n
m
+
m
log
⁡
m
) time complexity.Proof.
The complexity of Algorithm10 is dominated by MCCF algorithm of [13]. The complexity of the MCCF algorithm is O
(
n
m
+
m
log
⁡
m
) in discrete time. By natural transformation of [9], this can be extended into continuous time that follows the result.


## 5.2. 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.
LetN
=
(
V
,
A
,
b
A
,
τ
,
s
,
d
,
T
) be a two-terminal network. Let ϵ
>
0 be given. Then, the problem is to find an approximation solution for CEACF from source s to sink d within a factor of (
1
-
ϵ
), for ϵ
>
0 in time T if the direction of the arcs can be reversed at time zero without any cost.We replace Step (3) of Algorithm4 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 x
dyna
=
0, Δ
=
1, b
¯
A
(
v
,
w
)
=
b
A
(
v
,
w
), ϵ
>
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 m
/
ϵ 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 Δ
m
/
ϵ, 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 T.Algorithm 14 (approximate continuous earliest arrival contraflow).
(1) In Step (3) of Algorithm4, we solve the CEAF problem on N
¯
=
(
V
,
E
,
b
E
,
τ
,
s
,
d
,
T
) using fully polynomial time approximate algorithm of [14] with natural transformation of [9].
(2) Obtain(
1
-
ϵ
)-approximation solution of CEACF problem for the network N.Due to the feasibility of Algorithm4, our algorithm, Algorithm 14, is also feasible. Now we prove the correctness of the algorithm as follows.Theorem 15.
Algorithm14 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 T and real T. Thus, obtained (
1
-
ϵ
)-approximate CEAF on auxiliary networks is equivalent to the (
1
-
ϵ
)-approximation for CEACF on original networks.Corollary 16.
Algorithm14 computes (
1
-
ϵ
)-approximation for CEACF in O
(
m
ϵ
-
1
m
+
n
log
⁡
n
log
⁡
U
) time.Proof.
As the fully polynomial time approximation algorithm for EAF of [14] requires O
(
m
ϵ
-
1
m
+
n
log
⁡
n
log
⁡
U
) time, the complexity of Algorithm 14 requires the similar complexity to compute the approximation of CEACF.


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



---

*Source: 7902460-2016-03-28.xml*