Solving Splitted Multi-Commodity Flow Problem by Efficient Linear Programming Algorithm
Liyun Dai, Hengjun Zhao, Zhiming Liu

TL;DR
This paper introduces two novel algorithms, locSolver and incSolver, that significantly improve the efficiency of solving linear equations in column generation for multi-commodity flow problems by exploiting sparsity and solution reuse.
Contribution
The paper presents new algorithms for solving sparse linear systems more efficiently within column generation, reducing computational time in multi-commodity flow problem solving.
Findings
incSolver is at least 37 times faster than LAPACK.
Algorithms effectively exploit sparsity and solution similarity.
Preliminary experiments demonstrate substantial speedups.
Abstract
Column generation is often used to solve multi-commodity flow problems. A program for column generation always includes a module that solves a linear equation. In this paper, we address three major issues in solving linear problem during column generation procedure which are (1) how to employ the sparse property of the coefficient matrix; (2) how to reduce the size of the coefficient matrix; and (3) how to reuse the solution to a similar equation. To this end, we first analyze the sparse property of coefficient matrix of linear equations and find that the matrices occurring in iteration are very sparse. Then, we present an algorithm locSolver (for localized system solver) for linear equations with sparse coefficient matrices and right-hand-sides. This algorithm can reduce the number of variables. After that, we present the algorithm incSolver (for incremental system solver) which…
| Case | Total time(s) | Shortest path computing time(s) | Linear equation solving time(s) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| incCG | kluCG | lapackCG | incCG | kluCG | lapackCG | incCG | kluCG | lapackCG | |
| 1538.51 | 1831.76 | 29438.10 | 178.65 | 177.50 | 188.56 | 721.23 | 1431.20 | 27392.50 | |
| 625.76 | 801.76 | 18970.80 | 171.21 | 176.44 | 184.13 | 225.17 | 503.32 | 17690.60 | |
| 258.90 | 301.54 | 5720.87 | 146.49 | 154.18 | 145.39 | 50.48 | 105.68 | 5219.57 | |
| 180.84 | 187.72 | 2157.97 | 150.84 | 153.10 | 153.97 | 12.17 | 22.26 | 1888.38 | |
| 158.91 | 161.67 | 609.58 | 151.81 | 152.48 | 152.80 | 2.14 | 4.56 | 425.30 | |
| 200.37 | 201.93 | 631.31 | 194.18 | 194.16 | 198.87 | 1.61 | 3.34 | 404.67 | |
| 219.11 | 217.10 | 606.23 | 213.44 | 210.16 | 231.69 | 1.31 | 2.73 | 350.03 | |
| 246.31 | 251.99 | 622.97 | 240.89 | 245.40 | 265.44 | 1.12 | 2.30 | 334.39 | |
| 266.82 | 278.51 | 618.77 | 261.25 | 271.96 | 287.63 | 1.02 | 2.03 | 309.15 | |
| 270.44 | 271.01 | 491.10 | 265.30 | 265.19 | 277.14 | 0.74 | 1.46 | 197.66 | |
| 315.24 | 314.90 | 590.03 | 309.22 | 308.13 | 324.42 | 0.84 | 1.65 | 246.35 | |
| 370.37 | 375.79 | 706.79 | 363.69 | 368.36 | 372.57 | 0.91 | 1.73 | 312.02 | |
| 366.81 | 374.80 | 604.03 | 360.39 | 367.75 | 350.00 | 0.76 | 1.46 | 235.44 | |
| 393.72 | 395.79 | 600.08 | 387.01 | 388.48 | 357.91 | 0.72 | 1.37 | 223.79 | |
| 383.42 | 386.20 | 544.56 | 377.12 | 379.47 | 386.96 | 0.55 | 1.05 | 142.73 | |
| 459.25 | 460.63 | 690.73 | 451.89 | 452.79 | 460.94 | 0.68 | 1.24 | 211.07 | |
| 484.89 | 484.76 | 701.85 | 477.21 | 476.70 | 488.44 | 0.64 | 1.16 | 195.01 | |
| 537.48 | 539.50 | 738.52 | 529.59 | 531.18 | 524.11 | 0.63 | 1.14 | 195.86 | |
| 560.34 | 588.66 | 758.42 | 552.50 | 580.30 | 563.80 | 0.58 | 1.05 | 177.01 | |
| 618.65 | 623.70 | 817.98 | 610.31 | 614.62 | 605.78 | 0.61 | 1.14 | 193.48 | |
| 692.31 | 701.09 | 886.41 | 683.28 | 691.64 | 644.37 | 0.64 | 1.11 | 221.87 | |
| 677.80 | 699.56 | 812.32 | 668.49 | 689.65 | 609.01 | 0.60 | 1.13 | 184.44 | |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsVehicle Routing Optimization Methods · Optimization and Search Problems · Smart Parking Systems Research
11institutetext: Liyun Dai(🖂) 22institutetext: RISE, Southwest University, Chongqing, China
22email: [email protected] 33institutetext: Hengjun Zhao 44institutetext: RISE, Southwest University, Chongqing, China
44email: [email protected] 55institutetext: Zhiming Liu 66institutetext: RISE, Southwest University, Chongqing, China
66email: [email protected]
Solving Splitted Multi-Commodity Flow Problem by Efficient Linear Programming Algorithm
Liyun Dai
Hengjun Zhao
Zhiming Liu
Abstract
Column generation is often used to solve multi-commodity flow problems. A program for column generation always includes a module that solves a linear equation. In this paper, we address three major issues in solving linear problem during column generation procedure which are (1) how to employ the sparse property of the coefficient matrix; (2) how to reduce the size of the coefficient matrix; and (3) how to reuse the solution to a similar equation. To this end, we first analyze the sparse property of coefficient matrix of linear equations and find that the matrices occurring in iteration are very sparse. Then, we present an algorithm locSolver (for localized system solver) for linear equations with sparse coefficient matrices and right-hand-sides. This algorithm can reduce the number of variables. After that, we present the algorithm incSolver (for incremental system solver) which utilizes similarity in the iterations of the program for a linear equation system. All three techniques can be used in column generation of multi-commodity problems. Preliminary numerical experiments show that the incSolver is significantly faster than the existing algorithms. For example, random test cases show that incSolver is at least 37 times and up to 341 times faster than popular solver LAPACK.
Keywords:
Multi-commodity flow problem, column generation, software defined network, vehicle routing problem
1 Introduction
The multi-commodity flow problem (MCF) is a network flow problem with multiple commodities (flow demands) between different source and target nodes. Solving this problem is to find an assignment to all the flow variables such that certain given constraints are satisfied ford2004a . Many application problems can be reduced to MCF. Examples of these applications include the vehicle routing problem (VRP) letchford2015stronger ; cattaruzza2014an ; moshrefjavadi2016the , the traveling salesman problem (TSP) hernandezperez2009the , and problems of routing and wavelength assignment (RWA) leesutthipornchai2010solving ; patel2012routing . While it is well known that offline network resource optimization and planing in traditional network is a typical MCF Ahuja:1993 ; ford2004a ; Jajszczyk2005 , online network resource optimization and planing, which are now widely regarded as software defined network (SDN), are also treated as MCF hong2013achieving ; guo2014traffic ; kandula2015calendaring .
Because of its importance, there have been a sizable body of work on MCF, e.g. mahey2001capacity ; DBLP:GargK07 ; holmberg2003a ; Huisman2005 ; ZHU2012164 ; barnhart1998branch-and-price: ; degraeve2007a ; holmberg2003a ; huisman2007a ; salmasi2010total ; Briant2008 , in which colummn generation is widely used. A survey on column generation is given in lubbecke2005selected . There, the algorithms are divided in two classes, which are called exact algorithms dantzig1967generalized ; mccallum1977a ; barnhart1994a ; mamer2000a ; holmberg2003a ; dinh2013combining and approximation algorithms goldberg1992a ; grigoriadis1994fast ; awerbuch1994improved ; Grigoriadis96 ; even1999fast ; fleischer1999approximating ; fleischer2002fast ; bienstock2006approximating ; karakostas2008faster , respectively. In this paper, we will focus on the exact algorithm for the splitted multi-commodity flow problem in which the flow demands can be splitted among multiple paths for one commodity.
Organization: After this introduction, we introduce MCF and three different models for it in Section 2. In Section 3, we give a summary on column generation for MCF. We show in Section 4 how we apply the result in dantzig1967generalized to MCF, and present a concrete block structure of the basic matrix of column generation. In Section 5, we present the properties of the coefficient matrix. The test results show that the number of nonzero elements in each row of the coefficient matrix is less than 5 even when the length of the row is greater than . Thus, the matrix is very sparse. We devote Section 6 to present the two algorithms that are our main contribution in this paper. The first algorithm, called locSolver, is a localized system solver. This algorithm can reduce the number of variables in solving a linear equation when both its coefficient matrix and right-hand-sides are sparse. The second algorithm, called incSolver, is an incremental system solver which utilizes similarity during the iterations in solving linear equations. We present our experiment test results in Section 7, and conclusions in Section 8.
2 Model for Multi-Commodity Flow Problem
In this section, we define the basic formulation of multi-commodity flow problem (Model 1 below). We then present two more models, which are called Node-Link Formulation and Link-Path Formulation of MCF respectively. Both are linear programming models with a large numbers of variables and constraints.
2.1 The Basic Model of MCF
Graphs are the most fundamental mathematical models for networks, and their edges and/or nodes are associated with numerical functions for quantity based network control and management. The basic graph model used to represent a MCF is a direct graph with capacities and weights assigned to its edges, which are used to represent factors and elements of “effectiveness” and “cost elements” of network resources, respectively.
A capacitated and weighted network is a triple , where
- •
is a directed graph with the set of nodes (or vertices) and the set of links (or edges). A link from node to node is denoted by , where .
- •
and are mappings from to non-negative real numbers. For each edge , function assigns with a capacity , and function assigns with a weight , respectively.
A commodity is a measure of the demand in a network. Formally, for capacitated and weighted network , a commodity (or demand) is a triple , where and are nodes of , and the bandwidth of non-negative value. The nodes and are called source and * target* of commodity , respectively. We are now ready to formulate the basic model of MCF below.
Model 1** (MCF)**
Given a capacitated and weighed network , let be a set of commodities, where on , and be a variable for each link of that takes values in the interval , for . The basic multi-commodity flow problem is to solve the following linear equation for the flow variables with four constraints:
[TABLE]
Notice that constraint (1) is an objective function. The basic MCF formulation, the flow variables of the commodities of represents the fraction of flow for commodity along edge . Thus, in the general case when the commodity can be split among the flows of multiple paths, and can only take one of the two possible valued otherwise (i.e. “single path routing”). In this paper, we focus on . Taking the capacities and weights and of the edges as the cost element, finding an assignment in the above linear equation problem is called the minimum cost multi-commodity flow problem (min-MCF), indicated by constraint (1).
2.2 Node-Link Formulation
In Model 1, constraint (4) requires that the demand of each commodity is fully delivered through the flows along the paths from the source to the target. However, in general, only a part of the demand of a commodity can be “successfully” delivered, which means that constraints (4) become
[TABLE]
where .
Then it is desirable to seek the maximum portion of the command of each commodity to be successfully delivered with minimum cost. This case of MCF is called the maximal multi-commodity flow problem (MMCF). The primary requirement of MMC is to try to deliver all the demand, and the secondary requirement is to minimize the total cost.
We use to denote the cardinality of set , and to denote the dimension of a square matrix .
Model 2** (Node-Link Formulation Jajszczyk2005 )**
The formal description of MMCF is defined as follows:
[TABLE]
where is a nonnegative real number that satisfies and .
is the penalty term in the objective function. Node-Link Formulation is a linear programming model with variables and constraints. It is easy to see that MCF is a special case of MMCF when , which means that all commodities are successfully delivered.
Example 1
In Fig. 1, we can choose as sum of all links’ weight, which is .
2.3 Link-Path Formulation
In the previous two models of linear equations, the variables are the accounts of flows of links. We now present a formulation based on the accounts of flows of paths. For a path , we denote the account of flow along path as a variable . For an arbitrary path and an edge , we define the following (characteristic) function
[TABLE]
For a precise formulation of MMCF, we introduce the following notations below for a given set of commodity.
- •
Let denote an enumeration of the set of paths from to without loops (called simple paths), for and .
- •
Given a path , let denote that edge is in path and path is along edge .
Model 3** (Link-Path Formulation Jajszczyk2005 )**
MMCF* can be described as a problem of finding an assignment to the variables for , satisfying the following constraints.*
[TABLE]
In this model, (5) is the objective function, are slack variables which represent the portion of demand for commodity that fails to be delivered, and is the penalty term to objective function. Link-Path Formulation is a linear programming model with constraints and variables. It is easy to see that might become very large even for a small network.
Example 2
Fig. 2 is the topology (a bidirectional graph) of one backbone network of USA. This topology has 18 nodes and 52 links. Even in this small topology there are 97 different simple paths that connect Hawaii and Hartford.
In summary, we can see
both Node-Link Formulation and Link-Path Formulation are linear programming model. 2. 2.
Node-Link Formulation has fewer variables than Link-Path Formulation, while Link-Path Formulation has fewer constraints than Node-Link. 3. 3.
In general, both models either too many variables or too many constraints in practice.
3 The Column Generation Algorithm for Multi-Commodity Flow Problem
In this section, we first review the classical column generation. We then introduce a transition system model for understanding and analysis of this algorithm and the improved algorithm that we propose later. Finally in this section, we present the matrix formulation of classical column generation.
3.1 The Algorithm of Column Generation
The variables in Model 3 are often too many to be dealt with explicitly. Luckily, column generation ford2004a treats non-basic variables implicitly. It replaces the traditional method for determining a vector to entering basic by finding a shortest path which connects commodity source and target. It has better performance than the simplex method for Link-Path Formulation because both the number of variables and constraints are reduced to during every iteration. The basic idea of the algorithm is as follows.
In order to design an algorithm for full deliver of each demand , we introduce a dummy path for for each commodity , denoted by . Let the capacity of be and , where is value defined in Model 2. We call the original network extended with the dummy paths , the augmenting network, and define to denote the set of all paths of the commodities of the augmenting network.
The algorithm iteratively updates the load flow for every path , where for the variables in Model 3, . . When it terminates, the values of path load flows for all give an optimal solution for linear programming problem in Model 3.
Definition 1
Let is the index of edge in . We introduce edge ’s basic vector for , as follows:
[TABLE]
* is the index of edge in . In addition, we introduce path ’s basic vector for , as follows:*
[TABLE]
We define as follows:
[TABLE]
Example 3
In Fig. 1, let , then . Let , then .
For an assignment of and , the value is called the remaining capacity of , denoted by . We say that ’s remaining capacity carries commodity if and only if and is less or equal to .
3.2 Transition System Model
To help the understanding and analysis of Algorithm SCG, we introduce a state transition system that models the state change by each iteration of the main loop of the algorithm, i.e. lines 1 - 1 of Algorithm SCG. To define the abstract states of the transition system, we need the invariant property of the algorithm in the following lemma.
Lemma 1
Constraint (6) in Model 3 is an invariant of the main loop in Algorithm SCG (lines 1 - 1).
Proof
The lemma holds because of the fact that the values of the variables are alway kept in their feasible area is an invariant of the simplex method.∎
Since , Lemma 1 implies that for each iteration, say the th iteration, there is at least one for such that . For the th iteration and commodity , a path which has positive flow can be selected as the primary path and the subset of paths which have non-zero flow as the secondary paths of , where .
We now describe the main loop of Algorithm SCG as the transition system such that the th iteration changes from a state of the form to a state where .
After initial solution steps in Algorithm SCG (line 1 to line 1), the system state is for and . The transition rules are defined in the following way.
When the entering variable is a link :
- (a)
When the leaving variable is a path :
By Lemma 1, there is a . Let and , the other th’s state are the same as th’s state. In the following description, without loss of generality we do not mention the unchanged state part. 2. (b)
When the leaving variable is a path :
Let . 3. (c)
When the leaving variable is a link :
Let . 2. 2.
When the entering variable is a path :
- (a)
When the leaving variable is a path :
- i.
When :
Let . 2. ii.
When :
By Lemma 1, there is a .
Let . 2. (b)
When the leaving variable is a path :
- i.
When :
Let . 2. ii.
When :
Let . 3. (c)
When the leaving variable is a link :
Let .
It is easy to see that state represents the basic matrix in the th iteration, where
[TABLE]
In other words, is the incidence matrix of paths and edges in
Definition 2
In the above transition system, if the entering variable is a path and the leaving variable is a link , then we call a basic variable which corresponds to , denoted as .
The variable has some update rules. When the entering variable is a path and the leaving variable is a path , then we update . If the entering variable is a link and leaving variable is a path , then update .
Note 1
Let We call is the set of saturated link.
The intuitive meaning of a saturated link is that its bandwidth has been fully taken up and its bandwidth restricts the objective function to further decrease under current basis.
Lemma 2
* is an invariant of the main loop, in other words, there is a path for each .*
Proof
We prove it by induction. When , it obviously holds. Assume that the conclusion holds when .
When , if rules 1-(a) and 1-(b) are used in Fig. 3, then both cardinal of and decrease by compared with last iteration. Hence conclusion holds. If rules 1-(c), 2-(a)-i and 2-(b) are used, then both cardinal of and are unchanged. Hence conclusion holds. If rule 2-(a) is used, then both cardinal of and increase by . Thus, conclusion holds. In summary, no matter what rule is used in -th, holds. ∎
3.3 Matrix Formulation
We fix working paths on and add slack variables for constraint (7) where , then MMCF can be described as follows:
Model 4** (Link-Path Formulation for augmenting network)**
[TABLE]
Note 2
.
Example 4
In Fig. 1,
In other words, Model 4 can be written as
Model 5** (Matrix formulation )**
[TABLE]
where is defined as (8).
In th iteration the leaving variable selection procedure in Algorithm SCG can been described as follows:
[TABLE]
Firstly, solve equation (15), and obtain
[TABLE]
which satisfy constraints (10)-(14).
Secondly, solve equation (16), and obtain .
[TABLE]
where vector is the basic vector corresponding to entering variable.
Finally, choose a leaving variable by a pivot rule.
Note 3 (pivot rule)
There are many different mays to choose leaving variable. In this paper, we apply classical pivot rule to pick th as leaving variable where
[TABLE]
The solution of equation (17) are dual values of constraints (10) and (12). Then let be newly updated link weights.
[TABLE]
3.4 Classical Column Generation Complexity Analysis
Suppose Algorithm SCG does main iterations before termination, then Algorithm SCG computes shortest path and solves linear equation systems in the form of (15), (16) and (17) where ’s size is . As the authors know that the best shortest path algorithm complexity is which is given by Dijkstra’s algorithm based on Fibonacci heap and the best linear system solving algorithm complexity is . Hence, the Algorithm SCG’s complexity is
[TABLE]
4 Speedup Through Employing ’s Structure
The complexity of (18) can not be accepted in reasonable time when the size of is large. This hinders SCG’s use in some applications e.g. online load balance in SDN and large scale problem offline. Hence, how to improve the efficiency of column generation is a problem considered in many works dantzig1967generalized ; mccallum1977a ; barnhart1994a ; mamer2000a . The complexity (18) only has two parts, i.e. computing shortest path and solving linear equation systems (15), (16) and (17). Hence, reducing coefficient matrix size is a feasible approach. Luckily, the primal partitioning procedure, a specialization of the generalized upper bounding procedure developed by Dantzig and Van Slyke dantzig1967generalized , involves the determination at each iteration of the inverse of a basis containing only one row for each saturated link. In other words, we can reduce matrix size to the number of saturated link. In the following, we will concretely show how to apply conclusion of dantzig1967generalized on MCF. Through reordering column of basis matrix to obtain a special structure in resulted basis matrix , we give bellow a method called structured matrix method (SMCG). By this way we can reduce the size of linear equation to be solved in general.
4.1 Structured Matrix Method for Column Generation
After we reorder basic variable in th iteration by , Model 4 can be rewritten as:
Model 6** (Structure matrix model )**
[TABLE]
where
[TABLE]
Mathematically, we can rewrite equation (15) into:
[TABLE]
Then we have
[TABLE]
Hence, we can firstly solve equation (23). Secondly, substituting in (20) to obtain . Finally, substituting in (22) to obtain . In this way can solve equation system (15).
Note 4
Let
[TABLE]
Now equation (23) can be written as:
[TABLE]
Lemma 3
* is a non-singular sparse matrix.*
Proof
By simplex method theory, is a non-singular matrix. By structure of in (19), . Therefore, is a non-singular matrix.∎
Since equations (15) and (16) have the same coefficient matrix. Hence, employing the way to solve equation (15), we can solve equation (16). Through the same method we obtain
[TABLE]
In equation (17), mathematically, can be rewritten as
[TABLE]
We substitute in (27) and (28) to obtain
[TABLE]
We simplify equation systems (29) and (30) by
[TABLE]
[TABLE]
Through the above simplification, we can solve equation (17) too.
4.2 Structure Matrix Method’s Complexity Analysis
Suppose SCG does main iterations before termination, then it computes shortest path and in th iteration we need to solve linear equation systems in the form of (25), (26) and (31) where ’s size is . By the same discussion in Section 3.4, we can obtain that the Structure Matrix Method complexity is
[TABLE]
As given by the analysis in Section 3.4, the standard column generation method is
[TABLE]
by (18). By the Note 1, it is easy to see that . And in general, , hence SMCG is better than the classical one (SCG).
5 Speedup Through Employing ’s Sparse Structure
The sparse property is very useful when solving linear equation, in the following, to show the sparse property of matrix we will discuss the element of matrix in detail. In , is a vector denoting whether path crosses each edge in , i.e.
[TABLE]
is a vector associated with th path of and its value indicates which commodity the th path belong to. Let th path of be path for commodity . Then
[TABLE]
Hence, , where is associated with path and
[TABLE]
is also a vector associated with th path of and its value indicates which edge it crosses. Let path be the th path of . Then,
[TABLE]
By conclusion of fronczak2004average the ratio between path length and is very small when is large in general. When we see the graph as only consisted of saturated links, then number of nonzero elements in vector and are identical with the length of associated paths and . Therefore, and are two sparse vectors. As discussed above, is statistically a very sparse matrix.
In the following, we list some experiment results of matrix . We record the dimension and number of ’s nonzero elements in every iteration for some random cases. Let be the number of nonzero element in matrix . The detail of cases’ configuration can be found in section 7. The dimension of is equal to number of saturated link in th iteration. In Fig. 4 we can see that the dimension starts from [math] to a large number (more than ), which indicates that the number of saturated links is more and more larger as iteration proceeding, and the resource competition of different commodities is more and more intense. But the growth of the ratio between nonzero coefficients of matrix and its dimension is very slow. In Fig. 4(a) when , the value is still less than while is larger than . Hence is a very sparse matrix.
According to vanderbei1998linear ’s suggestions, we use LU decomposition to solve equations (25), (26) and (31). But because of the high sparsity of matrix , LAPACK anderson1990lapack kernels are not applicable. Hence, we can use the linear solver KLU davis2010algorithm , which has high performance for sparse matrix, to solve equations (25), (26) and (31) instead of LAPACK.
In Table 1 we find an interesting phenomenon that when the value is greater than or equal to (case ), solving linear equation will become dominating part of total time consumption. And when is less than , sparse linear solvers will greatly reduce the time of linear equation solving.
6 Speedup Through Sparse and Similar Properties
After we employ KLU to solve linear equations occurring in iteration of SMCG, when the number of saturated link is small, then linear equation solving step is not a dominating part of time. But when there are many saturated links the complexity of SMCG is almost the same as classical one. When structure of matrix is complex (i.e. nonzero elements of matrix is more than ), then linear equation solving step dominates the entire algorithm time, even employing KLU. Therefore, in the following, we do not invoke KLU to solve equations but directly use results in previous iteration to incrementally solve equations (15), (16) and (17).
For keeping speedup, in this section we firstly give a fast method locSolver which reduces Problem 1 to a small one in Section 6.1. Secondly, we provide an incremental method incSolver to solve equations (15), (16) and (17) in Section 6.2. Thirdly, in the final, we discuss why locSolver and incSolver are proper solvers for equation during iteration in Section 6.4.
6.1 A Fast Method to Solve Sparse Linear Equation System
Problem 1
Solve linear equation system
[TABLE]
where is a matrix and is a vector.
We will provide a fast algorithm to solve Problem 1. This method can reduce linear equation system to a small one. Especially, when is a very sparse matrix and is also a sparse vector, this method is very powerful. For presenting this fast method we first give following definitions and lemmas.
Definition 3
For matrix , let be the undirected graph of matrix with nodes. has a link iff . Let be the set of nodes reachable from element of through .
Lemma 4
In Problem 1, let . If , then Problem 1 has no solution.
Proof
Set . Thus, all the elements in row are zeros. Therefore, we have for every . But , so there is no satisfying Problem 1. ∎
Definition 4
* are two sub-sequences of . is called -projection of (briefly projection of ) if for *
Definition 5
In Problem 1, let . is called a computable projection of Problem 1 if
- (i)
; 2. (ii)
. 3. (iii)
.
Definition 6
* is a sub-sequence of . is called an -projection of if for *
Definition 7
* is a sub-sequence of and is a vector such that . denotes a lifting vector where*
[TABLE]
Lemma 5
Let be a computable projection of Problem 1. If there exists a vector satisfying that , then is a solution of Problem 1.
Proof
Let . In the following we want to prove that . W.l.o.g. set .
First, we will prove that for . By definition of , for . Thus,
[TABLE]
for .
Second, we will prove that for . Since is a computable projection, for . Thus,
[TABLE]
for . By the definition of , for . Therefore,
[TABLE]
for .
In summary, for . So is a solution to Problem 1. ∎
Theorem 6.1
If is a computable projection of Problem 1, then the system has solution iff there exists a vector such that . Furthermore, is a solution of Problem 1.
Proof
W.l.o.g. we set . Let us assume that is a solution of Problem 1. By condition (iii) of Definition 5, we have when and . Thus,
[TABLE]
for . In other words, .
Since is one of computable projections of Problem 1, then applying Lemma 5, is one solution of Problem 1.∎
Lemma 6
In Problem 1, let . Then is a computable projection of Problem 1, if it has a solution.
Proof
Since Problem 1 has a solution, we have because otherwise it will conflict with Lemma 4. By definition of and , and . In summary, satisfy condition (i) (ii) (iii) of Definition 5. So, is a computable projection of Problem 1.∎
Corollary 1
In Problem 1, let . Then has solution and is a solution to Problem 1, if Problem 1 is feasible.
Proof
When there is an satisfying Problem 1, employing Lemma 6, is a computable projection of . By Theorem 6.1, the conclusion holds.∎
Theorem 6.2
In Problem 1, let . If is a non-singular matrix then there is a unique vector such that .
Proof
Since is a non-singular matrix, Problem 1 has a unique solution . Employing Corollary 1, there is a vector such that . Suppose that there is another such that . By Lemma 5, are two solutions of Problem 1. In other words, . It is easy to check that . Hence, is a singular matrix, which conflicts with the fact that is a non-singular matrix. So, has a unique solution. ∎
Corollary 2
In Problem 1, let . If is a non-singular matrix then and is a non-singular matrix.
Proof
Let . It is easy to know that is a symmetric matrix. Proving is a non-singular matrix is equivalent to check that is a unique solution of . By Theorem 6.2, is a unique solution of equation system . Thus, is a unique solution of . In other words, is a non-singular matrix and and .
Let be a vector which satisfies that . When solving equation , by the same way of above discussion we can obtain that . Therefore, and is a non-singular matrix. ∎
6.1.1 Impoving algorithm locSolver during iteration
Computing reachable edges for a given node set is a key step of locSolver. Although computing reachable set of a given graph is of linear complexity, but in this case we need to construct a new graph per iteration. Luckily, by Theorem 6.1, we can use any computable projection to replace . Thus we can present a fast method instead of explicitly computing . As discussed in Section 6.2, is very similar to , so this approach is feasible. Thus, we utilize the information of to construct computable projection of .
Note 5
For a graph , denotes set of nodes in .
Definition 8
* is a graph with nodes . are graphs such that . We call an over disjoint cover of if*
- (i)
* for ;* 2. (ii)
there is such that for edge .
For a given graph , ’s different connected components is one of its over disjoint cover.
Theorem 6.3
In Problem 1, let , be an over disjoint cover of . Let . Let . If Problem 1 has a solution then is a computable projection.
Proof
Since Problem 1 has a solution, by Lemma 4, there is for . Thus, .
Assume that , in other words, there is a such that . In other words, and . Let such that and . By definition of there is an edge because .
By Definition 8, all ’s edges whose nodes contain must be completely contained in . Therefore, the assumption can not hold. Hence, .
We want to prove that . We prove it by contradiction. If , then by definition of all the edges of will belong to , in particular, . Thus, . This conflicts with , so .
Thus, , by the same way we can prove (iii) of Definition 5. Hence is a computable projection. ∎
Theorem 6.3 provides a new approach to constructing computable projection. This approach can be used to replace the computation of in line 2 in locSolver.
Lemma 7
* are two matrices. is an over disjoint cover of . Denote the set of nonzero elements in matrix by . We iteratively update by the following operation: merging to where if there is a link connecting and . Let be finally resulted graphs of the above iteration. Then is an over disjoint cover of .*
Proof
We prove it by induction.
When . If both and are nonzeros, then and . Thus, conclusion holds.
If only , then and . Thus conclusion holds.
If only , then only has one more link compared with . If there exist such that , then merge into a graph . It is easy to check that satisfies (i)-(ii) of Definition 8. Hence the conclusion holds when .
Assuming that the conclusion holds when . When , let be a matrix such that has only one nonzero element , and . It is easy to know that matrix has only nonzero elements. By assumption, ’s over disjoint cover can be constructed from ’s, which can be constructed from ’s .
In summary, conclusion holds for any .∎
Through Lemma 7, we can construct over disjoint cover of from ’s. This can be used to fast compute computable projection in th iteration from th’s.
6.2 Incremental Change Property of ’s Nonzero Pattern
Fast solving equations (25), (26) and (31) is a feasible way of improving efficiency of SMCG. In the following section we will first give an Algorithm incSolver which utilizes the sparse and incremental change properties of matrices and vectors occurring in two consecutive equation systems to fast solve target equation. Second we will describe the three interesting phenomenons during SMCG’s iteration. And these phenomenons can let us directly employ incSolver instead of other solvers. By this way, we can fast solve equations (25), (26) and (31).
6.2.1 Fast method of solving similar linear equations
Problem 2
is a non-singular sparse matrix. are two very similar matrices, in other words, has few nonzero elements. are two very similar vectors. When there is a vector such that
[TABLE]
we want to give an efficient algorithm to solve equation
[TABLE]
Assume that is a solution of (34). Because the coefficient matrices and right-hand-sides of (33) and (34) are very similar. It is reasonable to believe that are very similar. Thus, we only need to compute the different part for these two solutions when solving (34). The concrete algorithm of this idea is listed in Algorithm incSolver.
The outline of Algorithm incSolver is as follows: When we want to solve equation (34) when there is a vector satisfying (33). In this case, we can believe that is a sparse vector. So, we firstly use Algorithm locSolver to find a vector which is a solution of equation . It is easy to check that .
6.3 Incremental Change Property of ’s Nonzero Pattern
In this section we will list the three interesting phenomenons. Firstly, matrices have little difference. Secondly, right-hand-sides in (25) and (31) also have little difference between th and th iteration. Thirdly, right-hand-side of (26) is very sparse. All of these phenomenons indicate that locSolver and incSolver are the proper solvers for (25), (26) and (31). So, we can use Algorithm incSolver to quickly construct solutions of (25), (26) and (31).
As described in Model 6, is entirely defined by and their elements’ order. Therefore, changing order of ’s elements can give a better incremental property of matrices and vectors occurring in iteration. In the following description, without special statement the same elements of have the same matrix index between th and th iteration, and the same elements of and have the same matrix index. For obtaining incremental property, we firstly redefine transition system rules as follows:
When the entering variable is a link :
- (a)
The same as Fig. 3 1-(a) 2. (b)
The same as Fig. 3 1-(b) 3. (c)
When the leaving variable is a link :
Let . And let index of in be the same as in , and the other links’ indices are kept the same between and . 2. 2.
When the entering variable is a :
- (a)
The same as Fig. 3 2-(a) 2. (b)
The same as Fig. 3 2-(b) 3. (c)
When the leaving variable is a link :
Let . ** is a path corresponding to saturate link . Append to to obtain . And other links’ indices are kept the same between and .**
First phenomenon.
From transition system rules in Fig. 5, we can find that size of matrix only has three cases, i.e. . Below we will discuss relation between and under these three cases.
First, when , we will give a useful fact that the number of ’s columns which has nonzero elements is very few.
Lemma 8
In Note 4, if matrix only has one column corresponding to commodity different from , then there are at most columns of different from .
Proof
By the definition of in (19), every column of matrix corresponding to a commodity . Let be th column of . By the order of , is corresponding to primary path . Let be th column of matrix which is corresponding to a commodity . By equation (19), the form of is as follows
[TABLE]
Hence, in product only column of matrix affects . And is the th column of product . Thus, in product , th column of only affect columns corresponding to . Therefore, changing column ’s value only changes columns’ values of product , since the number of ’s columns are the same as is . ∎
Employing Lemma 8, we can give relation between and as follows:
If we use rule 1-(c) of Fig. 5 during iteration and let have the same index of as in , then has at most
[TABLE]
columns different from . 2. 2.
If we use rule 2-(a) of Fig. 5 during iteration, then at most has columns different from . 3. 3.
If we use rule 2-(b) of Fig. 5 during iteration, then at most has column different from .
In summary, when size of equals size of , matrix has few nonzero columns.
Second, when . Only after transition system rule 2-(c), this case can occur. And matrix can be written as
[TABLE]
where are vectors and is scalar. So and are very similar.
Third, when . Only after transition system rule 1-(a), 1-(b), this case can occur. And relation between and can be written as
[TABLE]
where are matrices, are vectors and is a scalar. So and are very similar.
Second phenomenon.
By the same analysis procedure as above, we can easily check that
and are similar; 2. 2.
and are similar; 3. 3.
and are also similar.
Thus, right-hand-sides in (25) and (31) in th and th iterations are similar too.
Third phenomenon.
In equation (26), if associate entering variable of is an edge , the form of is as follows
[TABLE]
By the discussion in the beginning of Section 5, every column of is a sparse column in general. So, is also a sparse vector in general at Model 6.
Otherwise, is a basic vector associated with a path . Then, in Model 6 only has one nonzero element which is . And is also sparse in general by discussion in the beginning of Section 5. Thus, is the subtraction of two sparse vectors, so is also a sparse vector in general.
6.4 Fast Solving Equations During Iteration
By discussion in Section 6.3, coefficient matrix and right-hand-side of (26) are both sparse. Hence, we can employ algorithm locSolver to solve (26).
In addition, coefficient matrices and right-hand-sides of (25) and (31) are very similar between th and th iteration. So, in the following we will employ algorithm incSolver to solve equations in th iteration from solution of th ones.
- (1)
When , we directly employ incSolver to solve (25) and (31). 2. (2)
When , we firstly extend solution of corresponding equation of th by setting the element of new index as [math]. After this extension, we employ incSolver to solve (25) and (31). 3. (3)
When , we firstly narrow solution of corresponding equation of th by deleting element of lacking index. After this narrowing, we employ incSolver to solve (25) and (31).
7 Experiments
7.1 Environment
The algorithm of SMCG is implemented as a C++ program. Compilation was done using g++ version 5.4.0 with optimization flags -O2. We use latest LAPACK (version 3) and latest KLU which is contained in tool SuiteSparse 4.5.6111 http://faculty.cse.tamu.edu/davis/suitesparse.html. All tests are done on a 64-bit Intel(R) Core(TM) i5 CPU 7400 @ 3.00GHz with 8GB RAM memory and Ubuntu 16.04 GNU/Linux.
We use incCG, kluCG and lapackCG to denote implementations of SMCG with incSolver, KLU and LAPACK as linear equation solver, respectively. In other words, except for linear equation solver, the other parts of incCG, kluCG and lapackCG are the same.
Random test cases are created by generator where is the number of nodes. The average node degree (sum of in degree and out degree) is . Each edge is generated by two random integers between and as its source and target node indices. The edge capacity is a random integer between and and edge weight is a random integer between and . The source and target indices of commodity are two random integers between and . Commodity demand is a random integer between and . Every case has commodities.
In Table 1, you can see that shortest path computing and linear equation solving are two major time consuming parts of implementations. And except for , and , the total time of incCG, kluCG and lapackCG are almost equal to sum of shortest path computing time and linear equation solving time. And the shortest path computing time of different implementations are almost the same. In addition, considering total time, when linear equation solving is dominating part, incSolver will achieve high speedup. For example, we can see in case using incSolver instead of LAPACK will achieve improvement. On the other hand, when linear equation solving costs less time, incSolver can reduce linear equation solving to a negligible fraction. For example, in case , using incSolver instead of LAPACK will reduce linear equation solving time to less than of the total.
In Fig. 6, we can see that incSolver outperforms KLU and LAPACK on all the test cases. Among these cases, KLU’s speedup is between and compared with LAPACK, while incSolver achieves a speedup from to . When comparing incSolver with KLU, incSolver’s speedup is between and . As incSolver is a prototype implementation, we believe that incSolver has great potential for improvement.
8 Conclusion
In this paper, for speeding up linear equation solving part in column generation for multi-commodity flow problem, firstly, we use transition system view to describe the procedure of column generation. This view can help us better understand the procedure of column generation and it also helps us conveniently present following improvement. Secondly, we discuss the sparse property of coefficient matrix. In the SMCG the average number of nonzero coefficient in each row of coefficient matrix is very few. In our test it is less than , even when the dimension of matrix is more than . Finally, we present two algorithms. The first is a fast algorithm locSolver (for localized system solver) which can reduce the number of variables in solving a linear equation system when both the coefficient matrix and right-hand-side are sparse. The other is an algorithm incSolver (for incremental system solver) which utilizes similarity during the iteration in solving a linear equation system. All algorithms can be used in column generation of multi-commodity problem. Preliminary numerical experiments show that the algorithms are significantly faster than existing algorithms. For example, under random test cases incSolver delivers up to (from ) improvement in the linear equation solving part compared with LAPACK. In addition, considering total time, when linear equation solving is dominating part, incSolver will achieve high speedup. For example in some tests using incSolver instead of LAPACK will achieve improvement. On the other hand, when linear equation solving costs less time, incSolver can reduce linear equation solving to a negligible fraction. For example in some cases using incSolver instead of LAPACK will reduce linear equation solving time to less than of the total.
9 Acknowledgements
The authors would like to thank Prof. Zongyan Qiu who helps to improve the presentation of the article.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1(1) Ahuja, R.K., Magnanti, T.L., Orlin, J.B.: Network Flows: Theory, Algorithms, and Applications. Prentice-Hall, Inc., Upper Saddle River, NJ, USA (1993)
- 2(2) Anderson, E., Bai, Z., Dongarra, J., Greenbaum, A., Mckenney, A., Du Croz, J., Hammarling, S., Demmel, J., Bischof, C.H., Sorensen, D.: Lapack: a portable linear algebra library for high-performance computers pp. 2–11 (1990)
- 3(3) Awerbuch, B., Leighton, T.: Improved approximation algorithms for the multi-commodity flow problem and local competitive routing in dynamic networks pp. 487–496 (1994)
- 4(4) Barnhart, C., Hane, C.A., Johnson, E.L., Sigismondi, G.: A column generation and partitioning approach for multi-commodity flow problems. Telecommunication Systems 3 (3), 239–258 (1994)
- 5(5) Barnhart, C., Johnson, E.L., Nemhauser, G.L., Savelsbergh, M.W.P., Vance, P.H.: Branch-and-price: Column generation for solving huge integer programs. Operations Research 46 (3), 316–329 (1998)
- 6(6) Bienstock, D., Iyengar, G.: Approximating fractional packings and coverings in o (1/epsilon) iterations. symposium on the theory of computing 35 (4), 825–854 (2006)
- 7(7) Briant, O., Lemaréchal, C., Meurdesoif, P., Michel, S., Perrot, N., Vanderbeck, F.: Comparison of bundle and classical column generation. Mathematical Programming 113 (2), 299–344 (2008)
- 8(8) Cattaruzza, D., Absi, N., Feillet, D., Vigo, D.: An iterated local search for the multi-commodity multi-trip vehicle routing problem with time windows. Computers and Operations Research 51 , 257–267 (2014)
