Abstract

This paper presents an algorithm for solving a minimum cost flow (MCF) problem with a dual approach. The algorithm holds the complementary slackness at each iteration and finds an augmenting path by updating node potential iteratively. Then, 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. The 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.

1. Introduction

The 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. Thus, 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. These 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]. They 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 [1418] 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. The 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.

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

2. Optimality Conditions

Let be a directed network with a node set , an arc set , a cost set , and a capacity set . Furthermore, a cost and a nonnegative capacity associated with each arc . And we associate with each node a number which indicates its supply or demand depending on whether or . Let node and node be the source node and sink node, respectively. And we assume that The MCF problem can be stated as follows:

The dual problem of MCF iswhere and are the dual variables of the MCF problem. And we refer to and as the potential of node and arc , respectively.

Let and be a feasible solution of MCF and DMCF, respectively. If feasible solution and are optimal solutions, according to theorem of commentary slackness, the following conditions will be satisfied:

Since is free , let , then we have . Therefore, we can find a feasible solution of DMCF where the value of is defined above . Thus, the complementary slackness conditions (3) and (4) are equal to the following conditions:

Therefore, if feasible solution is an optimal solution of MCF, then will satisfy conditions (5) and (6). On the contrary, for the arc satisfying , we have . In other words, we can find an augmenting path where each arc on the path such that when the value of flow is not the maximum flow in a network. We refer to arc satisfying as the admissible arc, and let be an admissible network satisfying that .

3. An Iterative Algorithm for Solving MCF

It is clear that 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 be a number of given amount of flow. We now describe formally our algorithm for solving the MCF problem (Algorithm 1).

Initialization: initialize node potential . Let , be an initial optimal solution with a flow valued 0. Label source node . Set .
While or cannot be found
While
  For
   
  End
   
   
  If then
   
  End
  If then
   For
    If and
     Label node with a label , where ,.
    End
    If and then
     Label node with a label , where .
    End
   End
  
  End
End
End

Next, we will give the validity of the proposed algorithm.

4. Validity of the Proposed Algorithm

The 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. Therefore, we have for some forward arc or for some backward arc . Otherwise, node will be labeled and according to the presented algorithm. Then, we can find and update node potential by Algorithm 1. Thus, at least one new admissible forward arc or backward arc will be found.

Theorem 1. The proposed algorithm finds an augmenting path in a finite iteration when the current flow is not the maximal flow.

Proof. Let be the number of nodes in a network , and there are at most arcs on a path from the source node to sink node. According to Lemma 1, the presented algorithm can find an augmenting path in iterations, which implies Theorem 1.

Theorem 2. After augmenting a flow of value by our algorithm, then the new feasible flow valued is the minimum cost flow valued .

Proof:. the algorithm begins a feasible flow , and feasible flow is the minimum cost flow valued 0. Furthermore,the proposed algorithm holds the complementary slackness condition (5) and (6) at each iteration. Therefore, augmented flow updated by Algorithm 1 is the optimal solution of a minimum cost flow valued , which gives Theorem 2.

5. Numerical Experiment

In this section, the computational experimental results are presented in order to verify the performance of the presented algorithm. The presented algorithm has been coded with Matlab and run on PC with Intel® Core™ i5-7300HQ CPU (2.5 GHz) and RAM 8 GB. The 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 and are connected with probability , where is the maximal link probability, is a parameter to control length of the arcs, is the Euclidean distance between node and , and is the maximal distance between any two nodes. For the network generated by the Waxman generator, we randomly give a and for each arc . The computational experiments are performed on a network with different scales ( varied from 10 to 200). Let be the number of nodes (arcs) of the generated network. And for a fixed and , 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 , our algorithm and SSPA are performed on a network with different number of arcs and . For the sake of simplicity, the algorithm proposed in [9] is named as Algorithm A1 and the algorithm proposed in this paper as A2. The numerical experiment results are reported in Table 1. The column titled “AVER.” in Table 1 provides an average CPU time out of 10 runs in the execution.

The 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 “” varies from 10 to 200 with . For a larger interval of , A2 takes more CPU time compared with a smaller interval of . 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. Therefore, we may find several admissible arcs after updating the node potential in an iteration for a smaller interval of , which implies that we find augmenting path(s) more efficiently compared with a larger interval of .

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. Therefore, for a larger number of nodes (great than 200) and a great interval of in a network, A2 will take more CPU time compared to A1 for solving the MCF problem.

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

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

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this article.

Acknowledgments

This work was supported by the Hubei Superior and Distinctive Discipline Group of “Mechatronics and Automobiles” under grant XKQ2019005, the Youth Project of Humanities and Social Sciences financed by the Ministry of Education under grant 17YJC630084, and the Starting Research Fund from the Hubei University of Arts and Science. The authors sincerely appreciate all the supports.