An Efficient Algorithm for Solving Minimum Cost Flow Problem with Complementarity Slack Conditions

+is paper presents an algorithm for solving a minimum cost flow (MCF) problem with a dual approach. +e algorithm holds the complementary slackness at each iteration and finds an augmenting path by updating node potential iteratively. +en, flow can be augmented at the original network. In contrast to other popular algorithms, the presented algorithm does not find a residual network, nor find a shortest path. Furthermore, our algorithm holds information of node potential at each iteration, and we update node potential within finite iterations for expanding the admissible network. +e validity of our algorithm is given. Numerical experiments show that our algorithm is an efficient algorithm for the MCF problem, especially for the network with a small interval of cost of per unit flow.


Introduction
e minimum cost flow (MCF) problem is to find a minimal cost of a given amount flow from a set of supply nodes to a set of demand nodes in a directed network where each arc is assigned a cost and a capacity constraint. MCF problem plays a fundamental role in network optimization. On the one hand, many network flow problems, such as shortest path problem, maximal flow problem, and transportation problem, can be viewed as special cases of the MCF problem. On the other hand, the MCF problem has a remarkable wide range of applications [1] in the real word, for example, scheduling [2], agriculture [3], communications [4], health care [5,6], and transportation [7].
Since the MCF problem is a linear program, we can also find the optimal solution with linear programming methodologies. Indeed, many of various optimality conditions about the MCF problem and linear programming are derived by researchers. us, we can develop efficient algorithms for the MCF problem with theory of duality.
Several algorithms have been designed for solving the MCF problem over past decades both from theoretical and from practical aspects. Many algorithms combing ingredients of both shortest path and maximal flow are developed to solve the MCF problem. ese algorithms find an optimal solution by solving a sequence of the shortest path problem within maximum flow-like residual networks and augmenting path, such as the cycle-canceling algorithm [8], successive shortest path algorithm [9], and primal-dual and out-of-kilter algorithms [10]. ey are equivalent in the sense that these algorithms perform the same sequence of strategy, and the key step is defining the residual network iteratively. Moreover, both cost and capacity are to be considered for defining the residual network, and some more arcs are to be introduced with negative cost, which make the original problem much more difficult to solve. Although none of the algorithms mentioned above has been shown to be a well complexity, they usually behave much better in practice compared to their theoretical analysis. Edmonds and Karp [11] proposed the first polynomial algorithm. Currently, an efficient polynomial time algorithm for the MCF problem was proposed by Orlin [12] and Vygen [13]. Some theoretical results and algorithms are given in [14][15][16][17][18] for solving the MCF problem or its variants.
Recently, Vieira et al. [19] evaluated the practical performance of 4 algorithms on real networks. And Vernet et al. [20] used a success shortest path algorithm for dynamic graph. A recent survey on the MCF problem is given in [21].
Our purpose in this paper is to present a new algorithm for solving the MCF problem. We consider the dual problem of MCF problem and derive the optimality conditions. e algorithm can find an augmenting path directly in a directed network when some dual variables (nodes potentials) of the MCF problem are updated iteratively in finite steps. In contrast to other algorithms, we do not need to define any residual network.
is paper is organized as follows: Section 2 derives optimality conditions of MCF problem with duality theory. Section 3 gives an iterative algorithm for the MCF problem. Section 4 discusses validity of the presented algorithm. Numerical experiment results and analysis of computational experiments are reported in Section 5. Section 6 contains some concluding remarks on the proposed algorithm for solving the MCF problem.

Optimality Conditions
Let G � (N, A, C, U) be a directed network with a node set N, an arc set A, a cost set C, and a capacity set U. Furthermore, a cost c ij ∈ C and a nonnegative capacity u ij ∈ U associated with each arc (i, j) ∈ A, ∀i, j ∈ N. And we associate with each node i ∈ N a number b i which indicates its supply or demand depending on whether b i < 0 or b i > 0. Let node s and node t be the source node and sink node, respectively. And we assume that i∈N,i≠s,t b i � 0. e MCF problem can be stated as follows: where p i and p ij are the dual variables of the MCF problem. And we refer to p i and p ij as the potential of node i and arc (i, j), ∀i ∈ N, ∀(i, j) ∈ A, respectively. Let x � x ij and p � p i , p ij be a feasible solution of MCF and DMCF, respectively. If feasible solution x � x ij and p � p i , p ij are optimal solutions, according to theorem of commentary slackness, the following conditions will be satisfied: Since us, the complementary slackness conditions (3) and (4) are equal to the following conditions: erefore, if feasible solution x � x ij is an optimal solution of MCF, then x will satisfy conditions (5) and (6). On the contrary, for the arc In other words, we can find an augmenting path where each arc (i, j) ∈ A on the path such that p i − p j � c ij when the value of flow is not the maximum flow in a network. We refer to arc (i, j) ∈ A satisfying p i − p j � c ij as the admissible arc, and let

An Iterative Algorithm for Solving MCF
It is clear that x ij � 0, ∀(i, j) ∈ A is an optimal solution with a flow valued 0. In order to get an optimal solution of MCF with a given amount of flow, we iteratively augment flow holding the complementary slackness condition (5) and (6) at each iteration. And flow can be augmented after we find an augmenting path within the admissible network. Moreover, a new admissible network can be given by updating the potential of node when we cannot find an augmenting path and flow is not the maximal flow. Let V be a number of given amount of flow. We now describe formally our algorithm for solving the MCF problem (Algorithm 1).
Next, we will give the validity of the proposed algorithm.

Validity of the Proposed Algorithm
e validity of the above algorithm depends mainly from the following results: Lemma 1. When the current flow is not the maximal flow in a network, at least one admissible arc can be found after updating node potential.
Proof. It is clear that there is at least one augmenting path if current flow is not the maximal flow in a directed network. erefore, we have x ij < u ij for some forward arc (i, j) or x ji > 0 for some backward arc (j, i), ∀i ∈ S, j ∈ S. Otherwise, node j will be labeled and j ∈ S according to the presented algorithm. en, we can find θ and update node potential by Algorithm 1. us, at least one new admissible forward arc (i, j), p i − p j � c ij or backward arc (j, i), p j − p i � c ji will be found. Proof. Let n be the number of nodes in a network G � (N, A, C, U), and there are at most n − 1 arcs on a path μ from the source node to sink node. According to Lemma 1, the presented algorithm can find an augmenting path in n − 1 iterations, which implies eorem 1.

Numerical Experiment
In this section, the computational experimental results are presented in order to verify the performance of the presented algorithm.
e presented algorithm has been coded with Matlab and run on PC with Intel ® Core ™ i5-7300HQ CPU (2.5 GHz) and RAM 8 GB. e tested problem is generated by the well-known Waxman network topology generator with the method proposed by Waxman [22]. All nodes of the generated problem are a Poisson process in the plane with scaled. Nodes i and j are connected with probability p(i, j) � αe − d(i,j)/βL , where α is the maximal link probability, β is a parameter to control length of the arcs, d(i, j) is the Euclidean distance between node i and j, and L is the maximal distance between any two nodes. For the network generated by the Waxman generator, we randomly give a c ij and u ij for each arc (i, j) ∈ A. e computational experiments are performed on a network with different scales (n varied from 10 to 200). Let n(m) be the number of nodes (arcs) of the generated network. And for a fixed n and m, a set of 10 instances are solved by our proposed algorithm and the successive shortest path algorithm (SSPA) [9] in order to make computational comparison. Furthermore, for a fixed n, our algorithm and SSPA are performed on a network with different number of arcs and c ij , i, j � 1, 2, . . . , n. For the sake of simplicity, the algorithm proposed in [9] is named as Algorithm A1 and the algorithm Initialization: initialize node potential p i � 0, ∀i ∈ N. Let x ij � 0, (i, j) ∈ A, be an initial optimal solution with a flow valued 0. Label source node (0, +∞).
Mathematical Problems in Engineering 3 proposed in this paper as A2. e numerical experiment results are reported in Table 1. e column titled "AVER." in Table 1 provides an average CPU time out of 10 runs in the execution. e numerical experiments indicate the following observations. A2 outperforms A1 in terms of CPU time in all cases. A2 runs approximately 9-140 times faster than A1 as "n" varies from 10 to 200 with c ij ∈ [1, 10], ∀(i, j) ∈ A. For a larger interval of c ij ∈ [1, 1000], ∀(i, j) ∈ A, A2 takes more CPU time compared with a smaller interval of c ij ∈ [1, 10], ∀(i, j) ∈ A. As the proposed algorithm described, the proposed algorithm holds information of node potential at each iteration, and we update node potential for expanding the admissible network. erefore, we may find several admissible arcs after updating the node potential in an iteration for a smaller interval of c ij , which implies that we find augmenting path(s) more efficiently compared with a larger interval of c ij , ∀(i, j) ∈ A.
Furthermore, the numerical experiments show that the increased CPU time of A2 is greater than A1 when the number of nodes increased. And the largest number of nodes in the network generated by the Waxman generator on our PC is 200. erefore, for a larger number of nodes (great than 200) and a great interval of c ij ∈ [1, 1000], ∀(i, j) ∈ A in a network, A2 will take more CPU time compared to A1 for solving the MCF problem.

Conclusion
In this paper, we proposed an algorithm for solving the MCF problem with a dual approach which holds a complementary slackness conditions at each iteration. e key step of our algorithm is updating node potential, and flow can be augmented after updating node potentials in finite steps.
Unlike existing algorithms such as successive shortest path algorithm and primal-dual algorithm, our algorithm does not find the residual network, nor find the shortest path iteratively. We conduct a numerical experiment to investigate the performance of the proposed algorithm. e results of the numerical experiment show that our algorithm reduces CPU time greatly compared with SSPA.
In this paper, the cost of flow is fixed, and we plan to develop an algorithm for solving the MCF problem with fuzzy cost and constraints. In practice, it is worthwhile to study the case that we have a close-to-optimal solution for the MCF problem. It is fundamentally important to transform the multiobject assignment problem and multiobject transportation problem into the MCF problem, which could be our further study.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this article.