Maximum Multicommodity Flow with Intermediate Storage

. The multicommodity ﬂow problem deals with the transshipment of more than one commodity from respective sources to corresponding sinks without violating the capacity constraints. Due to the capacity constraints, ﬂows out from the sources may not reach their sinks, and so, the storage of excess ﬂows at intermediate nodes plays an important role in the maximization of ﬂow values. In this paper, we introduce the maximum static as well as maximum dynamic multicommodity ﬂow problems with intermediate storage. We present polynomial and pseudopolynomial time algorithms for the former and latter problems, respectively. We also present the solution procedures to these problems in contraﬂow network having symmetric as well as asymmetric arc transit times. We transform the solutions in continuous-time settings by using natural transformation.

evacuation planning, demand-supply chain of goods, water supply system, etc. Pyakurel and Dempe [10] introduced the concept of maximum static and maximum dynamic flow problems with intermediate storage and presented polynomial time algorithms to solve them. ey also presented polynomial time algorithm for dynamic contraflow problem with intermediate storage. In case of multisource multisink network, Pyakurel et al. [11] solved the prioritized maximum flow problem with intermediate storage and presented polynomial time algorithm to solve the problem, where priority is given to the farthest element from the source. Recently, Pyakurel and Dempe [12] presented efficient algorithms for universal maximum dynamic flow problem with intermediate storage in general as well as two-terminal series parallel networks.
In two-way network, contraflow (lane reversal) is one of the best techniques to increase the outbound capacities of arcs and minimize the overall time horizon, in which arcs are reversed towards the destination [13]. Rebennack et al. [14] provided the models and polynomial time algorithms for maximum and quickest flow problems in a two-terminal network by reverting the arcs at time zero and keeping them fixed afterward by using analytical approach for discretetime settings. In continuous-time settings, Pyakurel and Dhamala [15] introduced the dynamic contraflow model. By using the natural transformation of Fleischer and Tardos [16], they have presented efficient algorithms to solve the maximum, quickest, and earliest arrival flow problems with lane reversals.
Pyakurel et al. [17] introduced the concept of partial lane reversals, in which only necessary arc capacities are reversed to increase the flow value, and unused arc capacities are saved for other emergency proposes like logistic supports and facility locations. Dhamala et al. [18] presented approximation algorithms for quickest multicommodity flow over time problem with partial lane reversals using length bound flow and condensed time expanded network in discrete-time settings. Continuous-time solutions of these problems are found in [19]. Similarly, Pyakurel et al. [20] presented polynomial time algorithm for maximum static and pseudopolynomial algorithm for maximum dynamic multicommodity flow problems with partial lane reversals.
In this paper, we aim to find the solution of discrete-time maximum multicommodity flow problem with intermediate storage by integrating the concept of multicommodity flow problem and the maximum flow problem with intermediate storage. We present polynomial time algorithm for static multicommodity flow problem and pseudopolynomial time algorithm for dynamic multicommodity flow problem by allowing the storage of excess flow at intermediate nodes.
We extend the results for contraflow configuration with symmetric as well as asymmetric transit times and also in continuous-time settings.
Our models are designed with the following limitations: at each intermediate node, inflow must be greater or equal to the outflow. At each arc, flow must not exceed the capacity. e storage capacity of intermediate nodes must be at least the sum of incoming arc capacities. Every commodity must transship from respective sources to their corresponding sinks. Objects within a commodity group are homogeneous and between the commodity groups are heterogeneous.
We organize the paper as follows. Section 2 provides the basic terminologies used in the paper and the mathematical formulation of flow models. In Section 3, we present a polynomial time algorithm to solve the maximum static multicommodity flow problem with intermediate storage, and in Section 4, we solve the maximum dynamic multicommodity flow problem with intermediate storage in pseudopolynomial time complexity. For two-way multicommodity network, we present a solution procedure of these problems in Section 5 within the same time complexity. Similarly, in Section 6, we extend the results of dynamic flow problems in continuous-time settings by using natural transformation. e paper is concluded in Section 7.

Basic Terminologies and Mathematical Models
Consider a dynamic network N � (V, A, K, u, b, τ, d i , S, D, T), where V and A ⊆ V × V represent the sets of nodes and arcs with |V| � n and |A| � m, respectively. Let s i ∈ S ⊂ V and t i ∈ D ⊂ V be the source and sink nodes with respect to commodity i ∈ K � 1, 2, . . . , k { } and I � V∖ S, D { } the set of intermediate nodes. Here, d i represents the amount of supply from the source node s i for each commodity i ∈ K that is to be sent to the corresponding sink t i and the intermediate nodes I. Each arc a � (v, w) ∈ A with head (a) � w and tail (a) � v is equipped with a capacity function u: A ⟶ R + that restricts the flow of commodity and a nonnegative transit time function τ: A ⟶ R + that measures the time to transship the flow from node v to node w. Similarly, b: V ⟶ R + represents the storage capacity function of nodes that is used to hold the flow at sources and sinks, together with the storage of excess flow leaving from the source s i but not reaching the sink t i at intermediate nodes. Capacity of arcs (roads) and the storage capacity of nodes (shelters) are the controlling parameters of our model, which control the flow at arcs and nodes, respectively. Let δ out (v) and δ in (v) be the set of outgoing arcs from node v and incoming arcs to node v, respectively. e time period T given in advance is denoted by T � 0, 1, . . . , T { } in discretetime settings and T � [0, T + 1) in continuous-time settings. In static flow, the transit time is considered as the cost, and time parameter T is absent.
roughout the paper, we consider that the storage capacity of sources and sinks is sufficiently large, i.e., b s i � b t i ≤ ∞ and that of intermediate nodes is finite. If the sum of incoming arc capacities of an intermediate node v ∈ I is more than the sum of outgoing arc capacities, then the excess flow is used to store at v. Moreover, for the uniqueness of the solution, the storage capacity of v ∈ I should be b v ≥ a∈δ in (v) u a .

Static Multicommodity Flow Model.
e static multicommodity flow function g on the given network N � (V, A, K, c, u, b, d i , S, D) is the sum of nonnegative arc flow functions g i a : A ⟶ R + and the excess flow functions g i v : I ⟶ R + , for each i ∈ K, satisfying conditions (1)- (5). e linear programming formulation of static multicommodity flow with intermediate storage is as follows: such that Objective function in equation (1) is to maximize the total flow out from each source, for all i ∈ K, which is equal to the sum of inflow at the sink and the excess flow at intermediate nodes. Equation (2) represents the nonconservation of flow at intermediate nodes. e constraint in (3) represents the bundle constraint on each arc that is bounded by its capacity, and the constraints in (4) represent the excess flow at each intermediate node, which is bounded by the storage capacity. Similarly, the constraint in (5) represents that the storage capacity of intermediate node v ∈ I is at least the sum of incoming arc capacities to v. e cost of static flow g associated with arc a and commodity i with cost coefficient c i a is defined as

Dynamic Multicommodity Flow
Model. For a given dynamic network N with constant transit time τ on each arc a, the multicommodity flow over time function ψ is the sum of nonnegative arc flow functions ψ i : A × T ⟶ R + and the storage flow functions ψ i v : I × T ⟶ R + for each i ∈ K, satisfying constraints (7)- (11). e linear programming formulation of dynamic multicommodity flow with intermediate storage is as follows: such that Equation (7) is an objective function that maximizes the total flow out from the source in time horizon T, for each i ∈ K, which is equal to the sum of inflow at sink and the excess flow at intermediate nodes. Equation (8) represents the nonconservation of flow at intermediate nodes for each time step θ. In any instance of time θ, the bundle constraint in (9) is bounded by arc capacity, and the constraint in (10) represents that the excess flow at each intermediate node is bounded by the storage capacity. Similarly, the constraint in (11) represents the lower and upper bounds of the storage capacity of intermediate node v ∈ I. e cost of discrete dynamic flow ψ associated with arc a and commodity i with cost coefficient c i a is defined as

Maximum Static Multicommodity Flow
In this section, we introduce the maximum static multicommodity flow problem with intermediate storage and present a polynomial time algorithm to solve it.
As the solution strategy, we first reduce the multicommodity flow problem into k independent single commodity flow problems by reallocating the capacity of bundle arcs using the resource directive decomposition method. It reallocates the capacity of bundle arc for each commodity in such a way that the objective is optimal. e decomposition algorithm to minimal-cost multicommodity flow problem can be used for minimum cost flow problem, which was the motivation for the development of the original Dantzig-Wolfe decomposition method [21] (see Bazaraa et al. [22]). For each i ∈ K, we used to store the maximum flow at Mathematical Problems in Engineering 3 sink t i and the excess flow at intermediate nodes v ∈ I with priority order. As in Pyakurel and Dempe [10], we have a single sink for each commodity i ∈ K, which is considered as the most appropriate place to store the flow. So, the first priority is given to the sink to transship as much flow as possible. To store the excess flow at intermediate nodes, we set the priority order as follows: v] , for each i, by using algorithm of Dijkstra [23]. We consider the path with the minimum cost as the shortest path, and the priority is given to the farthest node among the nodes with shortest distance.
, then v 1 is higher in priority than v 2 and it is denoted by v 1 ≻ v 2 . It is to be noted that the nodes lying in the bundle arcs may have different priority ordering with respect to the commodity.
For each prioritized node v ∈ I, we create dummy port v i ′ (since the node v ∈ I lying in the bundle arc contains the flow of more than one commodity, so dummy ports are and c [v,v i ′ ] are the arc capacity and cost of dummy arc (v, v i ′ ), respectively. Every dummy port v i ′ with respect to commodity i has the same priority order as v has. Associated with each commodity i, the collection of dummy ports v i ′ together with the sink t i forms a modified network Proof. Before proving the optimality, we first prove the feasibility of the algorithm.
Step 1 is the use of decomposition algorithm to reduce the multicommodity flow problem to single commodity flow problem, and Step 2 calculates the shortest distances by using Dijkstra's algorithm, so both steps are feasible. Steps 3, 4, and 6 are prioritization of nodes, modification of network, and transformation of solution, which can be solved in linear time, and so they are feasible. Similarly, according to Pyakurel and Dempe [10], Step 5 provides feasible flow with intermediate storage for each commodity i ∈ K. us, the solution obtained from Algorithm 1 is feasible. e optimality of algorithm is assured by Step 5. For each commodity i ∈ K, lexicographic maximum static flow in prioritized sink D i ′ is obtained optimally as the single commodity flow problem solved by Pyakurel and Dempe [10]. So, the sum of optimal single commodity flows i d i is optimal multicommodity flow with intermediate storage. □ Example 1. Consider a two-commodity network with capacity and cost on each arc as shown in Figure 1(a), where the numbers aside the nodes represent the node capacities. Using Dijkstra's algorithm, we find the shortest distance of each intermediate node and fix the priority order with farther-in-distance-higher-in-priority. So, the priority orders are t 1 ≻ y ≻ x and t 2 ≻ x ≻ y for commodity 1 and commodity 2, respectively. After priority ordering, we denote D 1 ′ � t 1 , y 1 ′ , x 1 ′ and D 2 ′ � t 2 , x 2 ′ , y 2 ′ as the set of prioritized dummy ports for commodity 1 and commodity 2, respectively, which is presented in Figure 1

Maximum Dynamic Multicommodity Flow
is section deals with the maximum dynamic multicommodity flow problem, where storage of the excess flow at intermediate nodes is allowed. We present a pseudopolynomial time algorithm based on the time expanded network of Kappmeier [8] to solve the problem.
As in Section 3, we first reduce the multicommodity flow problem into k independent subproblems and fix the priority order of intermediate nodes. Static solution is obtained in the modified single source and multisink network for all i ∈ K, by using Algorithm 1. To obtain the dynamic solution, we use the static multicommodity flow on time expanded network as in Kappmeier [8].
For this, we construct a temporary sink t i with infinite capacity and join each dummy port v i is taken to assure that the flow while sending back from the dummy ports must be on respective nodes. Now, for each i ∈ K, the new network N i ′ is obtained by adding temporary sink and arcs in N i ′ so that it becomes a single source single sink network with prioritized intermediate nodes.
with single source s i and multiple sinks with dummy Compute the lexicographic maximum static flow in N i ′ with priority order of Step 3 according to [10]. (6) Transform the solution to the original network N by removing the dummy ports and the dummy arcs. Mathematical Problems in Engineering 5 Kappmeier [8] has shown that the static multicommodity flow on the time expanded network is equivalent to the dynamic multicommodity flow on the original network. We now present an algorithm to solve problem 2 by using time expanded network. Proof. At first, we prove the feasibility of Algorithm 2. As Step 1 is a reconfiguration of given network by using decomposition algorithm, and Step 2 is its modification including dummy ports and temporary sinks, so these steps provide the feasible solution. Due to eorem 3, construction of time expanded network in Step 3 is feasible, and the feasibility of Step 4 is obtained by Algorithm 1. e transformation of solution in original network is also feasible. e optimality of algorithm is assured by the optimality of Step 4, which is as similar to [8].
Next, we prove the computational time of Algorithm 2, which is dominated by the complexity of   For each commodity i � 1, 2, the problem is reduced to single source and multisink single commodity flow problem due to dummy ports (see Figure 1(b)). By adding temporary sink t i , it reduces to commodity-wise single source single sink (i.e., s i − t i ) problem, which is shown in Figure 2. We calculate the maximum static multicommodity flow with intermediate storage using Algorithm 1 and then repeat the procedure with intermediate storage in time expanded network as similar to Kappmeier [8]. Here, the maximum static flow is calculated from minimum cost flow by considering the transit time as cost. Figure 3 represents the time expanded network of Figure 2 with time horizon T � 5. At last, we obtain the maximum dynamic flow with intermediate storage by removing the dummy arcs and replacing the flow of dummy ports to their respective nodes.
For commodity 1, total amount of flow leaving the source s 1 within the time horizon T � 5 along the path s 1 − x − y − t 1 is 20 units, out of which 4, 8, and 8 units are transshipped with priority order at t 1 , y and x, respectively. For commodity 2, flows are sent through two paths s 2 − x − y − t 2 and s 2 − y − t 2 with priority order t 2 ≻ x ≻ y. It is to be noted that while sending flow from the path s 2 − x − y − t 2 , flow leaving s 2 at θ � 0 sends 2 units of flow at t 2 by storing 1 unit at x. After next iteration onward, flow cannot reach the sink, and so it is to be stored at x but not at y because x is higher in priority than y. Similarly, path s 2 − y − t 2 first sends 4 units of flow thrice at t 2 and then holds the flow at y for next two times. Total amount of flow leaving the source s 2 through two paths within T � 5 is 32 units, out of which 14, 10, and 8 units are transshipped at t 2 , x and y, respectively. e detailed information of the flow leaving from sources at different time steps θ, which are to be stored at sinks and the intermediate nodes, is presented in Table 1. Here

Multicommodity Contraflow Problems
In this section, we investigate the multicommodity flow problem with contraflow configuration, where the storage of excess flow at intermediate nodes is allowed. In a two-way network, contraflow means the reversal of oppositely directed arcs towards the destination node to improve the flow and reduce the overall time horizon. We discuss two different aspects of transit times (or cost for static), symmetric and asymmetric, between the pair of nodes with oppositely directed arcs.   For a given two-way multicommodity network N with symmetric transit times, the corresponding auxiliary network is denoted by N with network topology

Contraflow with Symmetric Transit Times. Let
}. e capacity of an arc in an auxiliary network is the sum of capacities of arcs a and a ← such that u a � u a + u a ← , where u a � 0 if a ∉ A. e transit time of an arc in an auxiliary network is otherwise.
All other parameters are the same as in N. Contrary to the general network, incoming arcs to the sources s i and outgoing arcs from the sinks t i may be present in the contraflow network for all i ∈ K.
We now present the maximum dynamic contraflow problem with intermediate storage herein.

Problem
3. For a given dynamic network N � (V, A, K, u, b, τ, d i , S, D, T), the maximum dynamic multicommodity contraflow problem with intermediate storage is to find the maximum flow leaving from each source s i , ∀i ∈ K, which is to be sent to their respective sinks t i via s i − t i paths by allowing the storage of maximum excess flow at intermediate nodes v ∈ I with storage capacity ∀a ∈ A within the given time horizon T by reverting the direction of arcs at time zero.
To solve the problem, we present an algorithm based on the time expanded network of an auxiliary network N as follows.
We first transform the given two-way network into an auxiliary network N. As in Section 3, we decompose the multicommodity flow problem to k single commodity flow problems and then fix the priority order of each intermediate node. On each cycle free path of auxiliary network N, we solve the maximum dynamic multicommodity flow problem, for each i ∈ K, as described in Section 4.

Contraflow with Orientation-Dependent Transit Times.
If the transit times on antiparallel arcs of a two-way network are not identical, then it is known as the network with asymmetric transit times. For a network with asymmetric transit times, if the transit times of arcs in an auxiliary network are taken as the orientation of the arcs, then it is known as orientation-dependent transit time. Nath et al. [24] considered the orientation-dependent asymmetric transit times of reversed lanes in general form and presented strongly polynomial time algorithms to solve the single source single sink maximum dynamic and quickest contraflow problems. Here, we discuss about the multicommodity contraflow problem with intermediate storage by taking orientation-dependent transit times.
Let N � (V, A, K, u, b, τ, d i , S, D, T) be a two-way dynamic network with asymmetric nonzero transit times τ on arcs, so that τ a ≠ τ a ← . We construct an auxiliary network N � (V, A, K, u, b, τ, d i , S, D, T), where A is obtained by reverting the direction of arcs a ← at time zero. e arc capacity u and transit time τ a can be obtained as follows: