Abstract

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. The 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. The partial contraflow approach for the corresponding problems has also been discussed.

1. Introduction

The transportation network is represented as a dynamic network in which road segments represent the arcs and intersection between them are the nodes. The 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. The network may contain arcs in both directions with different capacities and asymmetric transit times or costs. The 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. The 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.

The 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. The empty lanes management plays vital role to reduce the traffic congestion. The 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. The 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. The capacities of both reversals are the same by adding both capacities.

Consider a network in Figure 1(a). The arc labels represent the capacity of the arc and travel time on the direction of the arc. For example, the capacity of is and its travel time is . That means a flow of units per unit time can be sent from to and takes unit of time to reach from to . For a time horizon of units, a maximum of units of flow ( along twice, along thrice, and along thrice) can be sent from to without allowing arc reversals.

If is reversed and the transit time is kept intact (Figure 1(b)), the maximum of units of flow ( along twice, along thrice, along (that contains original ) thrice, and along (that contains reversed) once) can be sent.

If the transit time depends on the orientation, when is reversed, its transit time becomes that of original (Figure 1(c)). In this case, there is a maximum of units of flow ( along twice, along thrice, and along thrice). In this case, we can add the capacities of and replace the two arcs by a single arc . If is reversed, however, the maximum flow value reduces to (Figure 1(d)).

Kim et al. [8] firstly model the contraflow problem as an integer programming problem, thereby proving its -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. They solve it in strongly polynomial time if the network is series-parallel. The continuous time solution is given in [7] and the solutions with similar objectives are given in [9, 10]. They 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. The costs for arc reversals as switching costs are studied in [12]. The 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. The results are extended with partial lane reversals as well. We analyze our solutions in both discrete and continuous time settings. The 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. These 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. The paper is concluded in Section 6.

2. Basic Concepts

A network is a directed graph consisting of a finite set of nodes and a finite set of arcs with . An arc is associated with a unique pair of nodes : one of them is called the head of and the other the tail. If has head and tail , then it is called directed from to . We consider something known as flow that moves from a set of nodes , called sources to (). The amount of flow is limited by a capacity function . A travel time is associated with the flow. We denote such a network by . If and , we denote the network by . We define the set of arcs incoming to node asand the set of arcs going out of it as

2.1. Static Flow

A static flow is a function which satisfies the following conditions:

The value of the static flow isA static flow is called a circulation if (3) is satisfied by all . A flow that maximizes is called a maximum static flow.

2.1.1. Flow Decomposition

Let denote the set of all simple paths from to , and let denote the set of all simple cycles in . Then every static flow has a flow decomposition such that and

2.1.2. Minimum Cost Flow

Given two functions , called supply, and , called cost with , a flow , satisfying (4) andis called a minimum cost flow if it minimizes . In various applications, the travel time is considered as cost.

2.1.3. Residual Network

A very important notion for various network flow calculations is a residual network. Given a static flow , the residual network has the same vertex set . The arc set consists of arcs constructed in the following way: For each directed from to , if , there is an arc in directed from to with residual capacity and cost . If , we have an arc in directed from to with residual capacity and cost .

For more details, we refer the reader to Ahuja et al. [14].

2.2. Dynamic Flow

A dynamic flow with time horizon consists of Lebesgue-integrable functions for each arc such that for . Here, can be realized as the rate of flow entering at time . The flow entering the tail of the arc at time reaches the head of at time . For each , we define the excess of node induced by at time as which is the net amount of flow that is stored at node up to time . In what follows, we assume for simplicity. A feasible dynamic flow satisfies

The value of the dynamic flow at time isand the total value of the dynamic flow is

For more details, refer to Skutella [15].

Given a time horizon , the dynamic flow that maximizes is called the maximum dynamic flow. Given a flow value , the dynamic flow with minimum time horizon such that is called the quickest flow, and the dynamic flow which maximizes for all is called the earliest arrival flow.

2.2.1. Temporally Repeated Flow

Given a static flow and a time horizon , a flow decomposition on gives a set of paths with flow for each . Flow is sent along at a constant rate from time to , where is the travel time on path , 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 in a path directed from to :

the portion of the path from to ,

the portion of the path from to ,

Now, the dynamic flow is defined by

2.2.2. Discrete Dynamic Flow

Discretizing the time intervals into the time steps , each corresponding to , we can replace the integral sign in (9) by a summation sign (removing ); 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.

3. Dynamic Contraflow Solutions

We consider the network with set of nodes , set of arcs , capacity , and travel time functions . For each , with the tail node and head node , or denotes the arc transit time from to and or denotes arc transit time from to . Without loss of generality, we make the following conventions:(1)There exist at most two arcs (with opposite orientations) between any two nodes and . We denote the arc with the tail and the head by .(2)Whenever , there is . This can be done, for our purpose, by assigning if such an arc does not exist.(3)Defining , we assume the existence of only one travel time function .

Remark 1. In case the above-mentioned conventions are not satisfied, we can use suitable network transformations to meet the requirements. For example, if , we can transform the network in Figure 2(a) to the network shown in Figure 2(b). Given the capacities and transit times , we replace arc in by two arcs with capacities and transit times and , respectively. The arc in is replaced by adding a node to the network to avoid parallel arcs. The capacities and travel times of are taken as and , respectively, and those of are taken as , and , respectively.

Definition 1. (Auxiliary network). For each , we define the auxiliary network as , in which(1)(2)(3)

Example 1. Consider a network as depicted in Figure 3(a). The arc labels represent the capacity and the transit time. The auxiliary network of is constructed in Figure 3(b). The 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 .

3.1. Maximum Dynamic Contraflow

Problem 1. (maximum dynamic contraflow problem with orientation-dependent transit times). Given a network with transit time depending on the orientation and a time horizon , 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 can take also the capacity of and vice versa. So, must not exceed . However, the removal of cycle flows does not change the value of the static flow and does not improve ; we can impose the condition that either or . 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. The 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 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.

Input: A network with orientation dependent transit time , and a time horizon
Output: Maximum dynamic flow with arc reversals
(1)Construct the auxiliary network according to Definition 1.
(2)Find a static flow corresponding to the temporally repeated dynamic flow in .
(3)Decompose into chain-flows and cycle-flows. Remove the cycle-flows and update .
(4)Reverse if and only if . Dynamic flow in reconfigured a temporally repeated flow corresponding to with the time horizon .

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 . But because the removal of cycle flows in Step 3 ensures either or to be zero, Step 4 is also well defined. Moreover, . This shows that is feasible in after necessary arc reversals.
Since the cycle flows do not contribute to the value of the flow, is optimal in even after removing the cycle flows in Step 3. Let be the value of such a dynamic flow. We claim that is optimal in (after arc reversals). If not so, there exists an instance of arc reversals, , of in which we can find a static flow , temporal repetition of which results in a dynamic flow with flow value more than . In , we can replace and by a single arc with transit time and capacity if has been reversed. Let be the set of paths corresponding to the path decomposition of . Corresponding to each path : in , we have a path : in . Each arc in has the same transit time and the capacity not less than that of the corresponding arc in . Let the collection of such paths be . Defining a flow for each , we can find a dynamic flow in with a flow value more than . This contradicts the optimality of in also.
Hence, Algorithm 1 computes the maximum dynamic flow in reversing appropriate arcs.

Theorem 2. Algorithm 1 runs in time where and is the running time of a temporally repeated maximum dynamic flow computation.

Proof. The construction of the auxiliary network in Step 1 requires time. The flow decomposition in Step 3 can be done in time (Ahuja et al.) [14]. Step 4 can be performed in time. Thus, if is the running time of Step 2, the algorithm runs in time. However, in general, this complexity could be considered as the complexity of MDF solution. □

Theorem 3. The maximum dynamic contraflow problem with orientation-dependent transit times can be solved in a strongly polynomial time.

Proof. From Theorem 2, the running time of Algorithm 1 is , where is the running time of a maximum dynamic flow calculation. In , and consequently in the auxiliary network , we can find the static flow corresponding to the maximum dynamic flow as follows [16]:(1)Add an arc with and to the auxiliary network to obtain a network .(2)Calculate the minimum cost circulation in .(3) the restriction of to .Using the enhanced capacity scaling algorithm mentioned by Orlin [18], the minimum cost circulation in can be calculated in time. This proves the assertion. □

3.2. Quickest Contraflow

Problem 2. (Quickest contraflow problem with orientation-dependent transit times). Given a network with transit time depending on the orientation and a supply at , find the dynamic flow with minimum time horizon allowing the arc reversals at time 0.

We construct Algorithm 2 to solve Problem 2.

Input: A network with orientation dependent transit time , and a supply at
Output: Quickest flow with the arc reversals
(1)Construct the auxiliary network according to Definition 1.
(2)Find a static flow corresponding to the temporally repeated quickest flow in , and the quickest time .
(3)Decompose into chain-flows and cycle-flows. Remove the cycle-flows and update .
(4)Reverse if and only if . Quickest flow in reconfigured a temporally repeated flow corresponding to with the time horizon .

Let be the value of the maximum dynamic flow with time horizon . One of the strategies to find the quickest flow with a supply at is to search for the minimum time horizon such that . Various search strategies are described in Burkard et al.’s work [19]. This requires solving the maximum dynamic flow problem repeatedly. Using this technique in Step 2, the feasibility and optimality arguments given in Theorem 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 is the complexity of solving the quickest flow problem in , we have the following.

Theorem 5. Algorithm 2 runs in time, where is the running time of a temporally repeated quickest flow problem.

Since there exist strongly polynomial algorithms for solving the quickest flow problem, we have the following.

Theorem 6. The quickest contraflow problem with orientation-dependent transit times can be solved in a strongly polynomial time.

Proof. Consider a network with a supply at the source . 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 time. Using the fact in Theorem 5, the complexity of Algorithm 2 is . This proves the assertion. □

3.3. Earliest Arrival Contraflow

Consider a network with orientation-dependent transit time . With a given time horizon , the earliest arrival flow problem seeks to find the flow that is maximum with each time horizon . Carrying over the idea of solving the maximum dynamic contraflow problem, we try to solve the earliest arrival flow problem on the auxiliary network . This can be carried out by implementing the successive shortest path algorithm in the residual network of ([21, 22]). The idea is to send the flow successively through shortest paths amounting the residual capacity of the path. Such a path, being in the residual network, may contain negative (cost) time arcs also. Sending flow through negative cost arcs sends the flow back in time. This may result in the arc used by the flow in some time interval, not used in the other time interval, and used again in some further time interval. So, an arc reversed to optimize the flow at one time does not remain reversed throughout the given whole-time interval. In other words, an arc may have to be flipped back and forth unlike in the cases of maximum dynamic contraflow and quickest contraflow, where an arc reversed at the beginning (time zero) remains reversed throughout.

Problem 3. Given a network with orientation-dependent transit time and a time horizon , find a dynamic flow which is maximum at every time horizon such that allowing arc reversals at time .

We propose Algorithm 3, which sends the flow along the successive shortest paths in the residual network of the auxiliary network.

Input: A network with orientation dependent transit time , and a time horizon
Output: Earliest arrival flow with the arc reversals
(1)Construct the auxiliary network according to Definition 1.
(2)Find the earliest arrival flow in .
(3)Reverse if at time . is the earliest arrival flow with arc reversals in .

The 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 . The generalized temporally repeated flow can be found in [15]. Such an algorithm runs in a pseudo-polynomial-time.

Theorem 7. Algorithm 3 solves the earliest arrival contraflow problem with orientation-dependent transit times in a pseudo-polynomial-time.

However, in a series-parallel network with a single source and single sink, the maximum dynamic flow has the earliest arrival property (Ruzika et al.) [23]. So, in case of a series-parallel network , Algorithm 1 solves Problem 3. Moreover, the maximum dynamic flow in the auxiliary network of a series parallel network with time horizon can be solved in time by sending the flow iteratively through the paths with the minimum time and removing the saturated arcs, considering only the paths with time not exceeding . So, we have the following.

Theorem 8. If is a series-parallel network, then the earliest arrival contraflow problem with orientation-dependent transit times can be solved in time.

4. Partial Contraflow Algorithm

The 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. The 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. The algorithm not only reverses the arcs up to the necessary capacity but also lists the unused capacities of the arcs of the network considered.

Input: Network with orientation dependent transit times
Output: Partial contraflow reconfiguration of with unused capacities .
(1)Find a cycle-free flow in the auxiliary network .
(2)Reverse proportional to the capacity if .
(3)For each , if is reversed, then and . If neither nor is reversed, .

The 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 between nodes and , it is evident that either only one of them is reversed or both of them are not reversed. If is reversed, it clearly indicates that ; there is no capacity of unused; that is, , and

If both arcs are not reversed, then meaning .

The flow 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 time, the overall complexities of the algorithms in case of partial contraflow are the same as those of the contraflow. Thus, we have the following.

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

5. 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 problem of evacuating people in Dasharath Stadium and surrounding area to outside of the Ring Road in case of auto-based-emergency evacuation.

The constructed directed network consists of 69 nodes and 232 arcs (see Table 1). The direction of arcs is taken as the direction of the usual flow of the traffic in the corresponding segments. The capacities of the road segments are taken from 2 to 4 units of flow per second according to the number of lanes. The 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). The considered data are taken only for the purpose of testing the algorithms. The 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  = 5 minutes, it is 44 without arc reversals and 88 with arc reversals. At 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. The 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.

6. 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. This 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. The computational performance of the algorithms for maximum dynamic contraflow and quickest contraflow taking a Kathmandu road network is also tested.

The 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

The authors declare that they have no conflicts of interest.

Acknowledgments

The first author acknowledges the support of UGC Nepal for Ph.D. fellowship, and the second author acknowledges the support of AvH Foundation for the return fellowship.