Network Reconfiguration with Orientation-Dependent Transit Times

Motivated by applications in evacuation planning, we consider a problem of optimizing flow with arc reversals in which the transit time depends on the orientation of the arc. In the considered problems, the transit time on an arc may change when it is reversed, contrary to the problems considered in the existing literature. Extending the existing idea of auxiliary network construction to allow asymmetric transit time on arcs, we present strongly polynomial time algorithms for solving single-source-single-sink maximum dynamic contraflow problem and quickest contraflow problem. +e results are substantiated by a computational experiment in a Kathmandu road network. An algorithm to solve the corresponding earliest arrival contraflow problem with a pseudo-polynomial-time complexity is also presented. +e partial contraflow approach for the corresponding problems has also been discussed.


Introduction
e transportation network is represented as a dynamic network in which road segments represent the arcs and intersection between them are the nodes. e unsafe locations of network are the sources and the locations at safe regions are the sinks. Each node and arc of the network are bounded by finite capacities. Each arc has a transit time or a cost function that determines the amount of time or cost needed to travel it. e network may contain arcs in both directions with different capacities and asymmetric transit times or costs. e computational complexities for the transportation planning are heavily dependent upon the number of sources, sinks, parameters on the arcs, and nodes, like constant, time-dependent, or flow-dependent capacities or transit times as well as additional constraints. e time we consider mostly is discrete, which approximates the computationally heavy continuous models at the cost of solution approximations. Also, the constant time is probably approximated by free flow speeds or certain queuing rules and constant capacity settings that reduce the problem to be linear, at least more tractable, in contrast to the more general and realistic flow-dependent traffic flow scenarios. For extensive explanation on diversified theories and applications, we recommend Dhamala et al. [1] and Kotsireas et al. [2] and the citations therein. e transportation network, during or after disastrous situations, becomes more congested due to large number of people and vehicles towards the safer areas on the streets. Moreover, the movement towards risk areas from safer places is discouraged because of which the corresponding road lanes are almost empty. e empty lanes management plays vital role to reduce the traffic congestion. e optimal lane reversal strategy makes the traffic systematic and smooth by removing the traffic jams caused in different large-scale natural and man-made disasters, busy office hours, special events, and street demonstrations. e contraflow reconfiguration, by means of various operations research models, heuristics, optimization, and simulation techniques, reverses the usual direction of empty lanes towards the sinks satisfying the given constraints that increase the flow value and decrease the average evacuation time [3,4].
Although the capacity of lanes is assumed to be constant, the transit times may vary. If we consider the inflow-dependent or load-dependent transit times, the empty lanes may have likely zero time contrary to the congested segments where the transit times increase with the flow density. In reality, the transit time of incoming lanes towards the sources may not be equal to the outgoing lanes. It may be the cases depending on the network topology as well. In such cases, the free flow transit time has been considered for the reversed lanes [4]. Recently, the authors in [5] have considered the asymmetric transit times on the lanes but those lanes are individual and reversal decisions are made with their own transit times, that is, symmetric transit times such as in [3,6,7].
In this paper, we consider the asymmetric transit times of reversed lanes in general form and show their impact on optimal lane reversals; that is, our transit time is dependent on the orientation of the lanes which applies asymmetric times. e capacities of both reversals are the same by adding both capacities.
Consider a network in Figure 1(a). e arc labels represent the capacity of the arc and travel time on the direction of the arc. For example, the capacity of (s, a) is 4 and its travel time is 1. at means a flow of 4 units per unit time can be sent from s to a and takes 1 unit of time to reach from s to a. For a time horizon of 6 units, a maximum of 8 units of flow (1 along s-a-d twice, 1 along s-b-d thrice, and 1 along s-a-b-d thrice) can be sent from s to d without allowing arc reversals.
If (b, a) is reversed and the transit time is kept intact (Figure 1(b)), the maximum of 10 units of flow (1 along s-a-d twice, 1 along s-b-d thrice, 1 along s-a-b-d (that contains original (a, b)) thrice, and 2 along s-a-b-d (that contains (b, a) reversed) once) can be sent.
If the transit time depends on the orientation, when (b, a) is reversed, its transit time becomes that of original (a, b) (Figure 1(c)). In this case, there is a maximum of 14 units of flow (1 along s-a-d twice, 1 along s-b-d thrice, and 3 along s-a-b-d thrice). In this case, we can add the capacities of (a, b), (b, a) and replace the two arcs by a single arc (a, b). If (a, b) is reversed, however, the maximum flow value reduces to 5 ( Figure 1(d)).
Kim et al. [8] firstly model the contraflow problem as an integer programming problem, thereby proving its NP-hardness. As finding exact mathematical solutions for general contraflow techniques is costly, they present two greedy and bottleneck heuristics for possible numerical approximate solutions to the quickest contraflow problem. With computational experiments, it has been shown that at least 40% evacuation time can be reduced by reverting at most 30% arcs. Rebennack et al. [3] solve the two-terminal maximum and quickest contraflow problems optimally in strongly polynomial times. Pyakurel and Dhamala [6] solve the earliest arrival contraflow problem on a two-terminal network in pseudo-polynomial-time. ey solve it in strongly polynomial time if the network is series-parallel. e continuous time solution is given in [7] and the solutions with similar objectives are given in [9,10]. ey show that if the minimum cut arcs have symmetric capacities, then the flow is double with the contraflow. Pyakurel et al. [11] give the first temporally repeated flow algorithm to solve the quickest contraflow problem, within a complexity of solving a min-cost flow problem.
e costs for arc reversals as switching costs are studied in [12]. e contraflow models with intermediate storage are introduced in [13].
In this paper, we introduce the maximum dynamic contraflow, earliest arrival, and quickest contraflow problems on asymmetric transit time network and present efficient algorithms to solve these problems in two-terminal networks. Modifying the network transformation suggested by Rebennack et al. [3] in case of symmetric travel time cases, we show that the approach works equally well in the asymmetric travel time settings.
e results are extended with partial lane reversals as well. We analyze our solutions in both discrete and continuous time settings. e novelty of this work is to optimize network topology with unequal transit times on reversal arcs to improve congestion by increasing the flow value and decreasing the evacuation time.
We organize the paper as follows. Section 2 presents mathematical formulations and models of the problems allowing asymmetric transit times on arcs. We investigate the maximum dynamic, earliest arrival, and quickest flow problems in Section 3. ese results are extended with partial lane reversals in Section 4. In Section 5, some computational results, taking a part of Kathmandu road network as an example network, are presented. e paper is concluded in Section 6.

Basic Concepts
A network N is a directed graph consisting of a finite set of nodes V and a finite set of arcs A with |V| � n, |A| � m. An arc e ∈ A is associated with a unique pair of nodes i, j: one of them is called the head of e and the other the tail. If e has head i and tail j, then it is called directed from i to j. We consider something known as flow that moves from a set of nodes S ⊂ V, called sources to D ⊂ V (S ≠ D). e amount of flow is limited by a capacity function u: A ⟶ R ≥0 . A travel time τ: A ⟶ R ≥0 is associated with the flow. We denote such a network by N � (V, A, u, τ, S, D).
We define the set of arcs incoming to node i as and the set of arcs going out of it as

Static Flow.
A static flow is a function x: A ⟶ R ≥0 which satisfies the following conditions: x(e) ≤ u(e) ∀e ∈ A.
A static flow x is called a circulation if (3) is satisfied by all i ∈ V. A flow x that maximizes v(x) is called a maximum static flow.

Flow Decomposition.
Let P denote the set of all simple paths from S to D, and let C denote the set of all simple cycles in N. en every static flow x has a flow decomposition

Minimum Cost Flow.
Given two functions b: V ⟶ R, called supply, and c: A ⟶ R, called cost with i∈V b(i) � 0, a flow x, satisfying (4) and is called a minimum cost flow if it minimizes e∈A c(e)x(e).
In various applications, the travel time τ is considered as cost.

Residual Network.
A very important notion for various network flow calculations is a residual network. Given a static flow x, the residual network N x has the same vertex set V. e arc set A x consists of arcs constructed in the following way: For each e ∈ A directed from i to j, if x(e) < u(e), there is an arc in A x directed from i to j with residual capacity u(e) − x(e) and cost c(e). If x(e) > 0, we have an arc in A x directed from j to i with residual capacity x(e) and cost − c(e).
For more details, we refer the reader to Ahuja et al. [14].

Dynamic Flow. A dynamic flow
Here, Φ e (θ) can be realized as the rate of flow entering e at time θ. e flow entering the tail i of the arc e � (i, j) at time θ reaches the head j of e at time θ + τ e . For each i ∈ V, we define the excess of node i induced by Φ at time θ as which is the net amount of flow that is stored at node i up to time θ. In what follows, we assume S � s and the total value of the dynamic flow Φ is For more details, refer to Skutella [15]. Given a time horizon T, the dynamic flow Φ that maximizes v T (Φ) is called the maximum dynamic flow. Given a flow value Q, the dynamic flow with minimum time horizon T * such that v T * (Φ) � Q is called the quickest flow, and the dynamic flow Φ which maximizes v θ (Φ) for all θ ∈ [0, T] is called the earliest arrival flow.

Temporally Repeated Flow.
Given a static flow x and a time horizon T, a flow decomposition on x gives a set of paths P with flow x P for each P ∈ P. Flow is sent along P at a constant rate x P from time 0 to max T − τ(P), 0 { }, where τ(P) � e∈P τ(e) is the travel time on path P, to define a dynamic flow known as the temporally repeated flow. To give an explicit expression for the dynamic flow, we define the following for e in a path P directed from i to j: P si � the portion of the path P from s to i, P j d � the portion of the path P from j to d, Now, the dynamic flow Φ is defined by

Discrete Dynamic Flow. Discretizing the time intervals
[0, T) into the time steps 0, 1, . . . , T − 1, each corresponding to [0, 1), [1,2), · · · [T − 1, T), we can replace the integral sign in (9) by a summation sign (removing dσ); the corresponding flow is known as discrete dynamic flow. Using the concept of natural transformations, Fleischer and Tardos [16] show the equivalence between the two problems so that the solution procedures of a problem in continuous time version can be carried to the solution procedure of the corresponding problem in the discrete version, and vice versa.

Dynamic Contraflow Solutions
We consider the network N with set of nodes V, set of arcs A, capacity u: A ⟶ R ≥0 , and travel time functions For each e ∈ A, with the tail node i and head node j, τ(e) or τ e denotes the arc transit time from i to j and τ ← (e) or τ ← e denotes arc transit time from j to i. Without loss of generality, we make the following conventions: (1) ere exist at most two arcs (with opposite orientations) between any two nodes i and j. We denote the arc ewith the tail i and the head j by (i, j).
, (j, i) with capacities and transit times u ij , α 1 and 0, α 2 , respectively. e arc (j, i) in N 0 is replaced by (i, k), (k, j), (j, k), (k, i) adding a node k to the network to avoid parallel arcs. e capacities and travel times of (j, k), (k, i) are taken as u ji , 0 and u ji , β 1 , respectively, and those of (i, k), (k, j) are taken as 0, β 2 , and 0, 0, respectively.
Example 1. Consider a network N as depicted in Figure 3(a). e arc labels represent the capacity and the transit time. e auxiliary network N ′ of N is constructed in Figure 3(b). e capacity of each arc is the sum of its capacity and the opposite arc and the transit time is the same as that of the corresponding arc in N.

Maximum Dynamic Contraflow
Problem 1 (maximum dynamic contraflow problem with orientation-dependent transit times). Given a network N � (V, A, u, τ, s, d) with transit time τ depending on the orientation and a time horizon T, find the maximum dynamic flow allowing the arc reversals at time 0.
According to Ford and Fulkerson [17], the problem of finding the static flow corresponding to the temporally repeated maximum dynamic flow can be formulated as Problem 1 is to find the maximum dynamic flow so that an arc (i, j) can take also the capacity of (j, i) and vice versa. So, x(i, j) + x(j, i)) must not exceed u(i, j) + u(j, i). However, the removal of cycle flows does not change the value of the static flow v and does not improve − Tv + (i,j)∈A τ (i, j)x (i, j); we can impose the condition that either x(i, j) � 0 or x(j, i) � 0. So, the problem to find the static flow corresponding temporally repeated maximum dynamic flow can be stated as See also [17] for the similar formulation of maximizing the static flow in undirected and mixed networks. e problem in (17)-(19) is a linear programming problem and (20) can be satisfied by the removal of cycle flows in the solution. Since a linear programming problem is polynomial solvable and using flow decomposition, removal of cycle flows also can be done in polynomial time (see [14]); we can find the static flow corresponding to the temporally repeated maximum dynamic flow allowing arc reversals in a 4 International Journal of Mathematics and Mathematical Sciences polynomial time. If the static flow in an arc exceeds its capacity, the opposite arc has to be reversed at time zero.
In Algorithm 1, we present a procudure to solve Problem 1.

Theorem 1. Algorithm 1 solves the maximum dynamic contraflow problem with orientation-dependent transit times correctly.
Proof. It is easy to see that steps 1-3 are well defined. Step 4 may be ill defined if for some (i, j) ∈ A ′ , x(i, j), x(j, i) > 0. But because the removal of cycle flows in Step 3 ensures either x(i, j) or x(j, i) to be zero, Step 4 is also well defined.
is shows that x is feasible in N after necessary arc reversals.
Since the cycle flows do not contribute to the value of the flow, x is optimal in N ′ even after removing the cycle flows in Step 3. Let v x be the value of such a dynamic flow. We claim that x is optimal in N (after arc reversals). If not so, there exists an instance of arc reversals, N y , of N in which we can find a static flow y, temporal repetition of which results in a dynamic flow with flow value more than v x . In N y , we can replace (i, j) and (j, i) by a single arc (i, j) with transit time τ(i, j) and capacity u(i, j) + u(j, i) if (i, j) has been reversed. Let P be the set of paths corresponding to the path decomposition of y. Corresponding to each path P: s-i 1 -i 2 -· · ·-i k -d in P, we have a path P ′ : s-i 1 -i 2 -· · ·-i k -d in N ′ . Each arc in P ′ has the same transit time and the capacity not less than that of the corresponding arc in P. Let the collection of such paths P ′ be P ′ . Defining a flow y ′ (i, j) � y(i, j) for each (i, j) ∈ P ′ , we can find a dynamic flow in N ′ with a flow value more than v x . is contradicts the optimality of x in N ′ also.
Hence, Algorithm 1 computes the maximum dynamic flow in N reversing appropriate arcs.  In  N � (V, A, u, τ, s, d), and consequently in the auxiliary network N ′ , we can find the static flow x corresponding to the maximum dynamic flow as follows [16]: Using the enhanced capacity scaling algorithm mentioned by Orlin [18], the minimum cost circulation in N ″ can be calculated in O(m log n(m + n log n)) time.
is proves the assertion. □ We construct Algorithm 2 to solve Problem 2.
Let v(T) be the value of the maximum dynamic flow with time horizon T. One of the strategies to find the quickest flow with a supply Q at s is to search for the minimum time horizon T * such that Q ≤ v(T * ). Various search strategies are described in Burkard et al.'s work [19].
is requires solving the maximum dynamic flow problem repeatedly. Using this technique in Step 2, the feasibility and optimality arguments given in eorem 1 are valid in Algorithm 2 as well. Hence, we have the following result.

Theorem 4. Algorithm 2 solves the quickest contraflow problem with orientation-dependent transit times correctly.
Analogous to the case of solving the maximum dynamic contraflow problem, if QF is the complexity of solving the quickest flow problem in N, we have the following. Since there exist strongly polynomial algorithms for solving the quickest flow problem, we have the following.

Theorem 6.
e quickest contraflow problem with orientation-dependent transit times can be solved in a strongly polynomial time.
Proof. Consider a network N � (V, A, u, τ, s, d) with a supply Q at the source s. We show that the complexity of Algorithm 2 is strongly polynomial to reach the conclusion. Using the cancel-and-tighten algorithm described in the work of Saho and Shigeno [20], to solve the quickest flow problem Step 2 takes O (nm 2 log 2 n) time. Using the fact in eorem 5, the complexity of Algorithm 2 is O(nm 2 log 2 n). is proves the assertion. □ We propose Algorithm 3, which sends the flow along the successive shortest paths in the residual network of the auxiliary network. e earliest arrival flow in Step 2 can be found by sending the flow equal to the residual capacity along the shortest paths in the residual network of N′. e generalized temporally repeated flow can be found in [15]. Such an algorithm runs in a pseudo-polynomial-time.

Partial Contraflow Algorithm
e approach described in Section 3 either reverses an arc or does not reverse it. In various applications, for example, evacuation planning, an arc refers to a collection of lanes in a particular direction; it is beneficial if we reverse the lanes required by the flow. e unused lanes may be used for other facilities [24]. Realizing the need of arc reversals up to the required capacity only, the authors in [4] introduce the concept of partial arc reversals. We extend the procedure in case of orientation-dependent transit times on arcs.
Algorithm 4 describes the generic procedure to solve the corresponding problems described in Section 3. e algorithm not only reverses the arcs up to the necessary capacity but also lists the unused capacities of the arcs of the network considered. e correctness of Algorithm 4 can easily be realized from the correctness of the corresponding algorithm with full arc reversal and the following fact. For the arcs (i, j), (j, i) between nodes i and j, it is evident that either only one of them is reversed or both of them are not reversed. If (i, j) is reversed, it clearly indicates that x(j, i) > u(j, i); there is no capacity of (j, i) unused; that is, r(j, i) � 0, and If both arcs are not reversed, then x ij ≤ u(i, j) meaning e flow x in Step 1 of Algorithm 4 has to be considered as the corresponding static flow in case of the maximum dynamic contraflow (Section 3.1) and quickest flow (Section 3.2) and the dynamic flow in case of the earliest arrival flow (Section 3.3).
Step 2 has to be implemented at time zero and at time θ accordingly.
As the extra procedure of listing the unused capacities in Step 3 takes only O(m) time, the overall complexities of the algorithms in case of partial contraflow are the same as those of the contraflow. us, we have the following.

Theorem 9.
e worst-case complexity of a partial contraflow problem with orientation-dependent transit times is the same as that of the corresponding contraflow problem.

Computational Experiment
For testing the computational performance of the maximum dynamic contraflow algorithm (Algorithm 1) and the quickest contraflow algorithm (Algorithm 2), we consider Kathmandu road network inside Ring Road with major road segments as an example network (Figure 4). We consider a

International Journal of Mathematics and Mathematical Sciences
Input: Network N � (V, A, u, τ, s, d) with orientation dependent transit times Output: Partial contraflow reconfiguration of N with unused capacities r.
ALGORITHM 4: Generic partial contraflow algorithm.  e capacities of the road segments are taken from 2 to 4 units of flow per second according to the number of lanes. e travel time (in seconds) in one of the arcs between any two nodes is considered according to the length and that in the opposite arc is chosen differing from it by 0 to 30 seconds (chosen randomly). e considered data are taken only for the purpose of testing the algorithms. e accuracy of capacity and travel time demands complex technical examinations.
We calculate the maximum dynamic flow with and without contraflow taking time horizons from as low as 5 minutes to as high as 1 hour. At each time horizon considered, we find that the value of the flow after allowing arc reversals is almost the double of that without arc reversals ( Figure 5(a)). At T � 5 minutes, it is 44 without arc reversals and 88 with arc reversals. At T � 60 minutes, the corresponding values are 29,312 and 58,502.
Given a flow value at the source, the calculation of quickest flow shows that the decrease in the quickest time increases with the increase in the flow value. With the flow value as low as 500, the quickest time decreases only by 7%, which is 47% for the flow value 50,000.
With growing time horizon and growing flow value, as well as the number of arcs, the flow occupies more and more arcs and, consequently, the number of arcs reversed increases. However, it remains fixed after some value of time or the flow value (Figure 6(a) for maximum dynamic flows calculations and Figure 6(b) for quickest flows).
Among the considered instances, the running time of a maximum contraflow calculation is at most 0.013 seconds, and that of a quickest contraflow calculation is at most 0.067 seconds. e coding is done in Python programming language and run in MacOS 11.1 with 1.8 GHz Dual-Core Intel Core i5 processor, and 8 GB RAM.

Conclusion
In this work, we introduce the contraflow problem in which the transit time on an arc depends on the direction of the arc; that is, the transit time on an arc may change after its reversal. is extends the notion, in the existing literature, that the transit time on arcs remains the same before and after the arc reversal to the cases where the time on arcs depends on its orientation. Presenting a method of constructing an auxiliary network, strongly polynomial time algorithms for maximum dynamic contraflow problem and quickest contraflow problem with orientation-dependent transit times are presented for a single-source-single-sink network. In the similar settings, for the earliest arrival contraflow problem, a pseudo-polynomial-time algorithm is also presented. e computational performance of the algorithms for maximum dynamic contraflow and quickest contraflow taking a Kathmandu road network is also tested. e presented approach is useful, particularly, in transportation planning, where the transit time depends on the direction of the traffic flow because of various reasons, for example, topography of the road. When the direction of the traffic flow in a road segment is reversed, if the capacity permits, it is beneficial to reverse only the necessary lanes. To address such an issue, we present corresponding algorithms in the partial contraflow setting as well. Analyzing impressive results from this research, its further extensions to flow-dependent scenarios would be interesting problems.

Data Availability
No data were used to support this study.

Conflicts of Interest
e authors declare that they have no conflicts of interest.