Two- and three-index formulations of the minimum cost multicommodity k-splittable flow problem

Two- and three-index formulations of the minimum cost multicommodity k-splittable flow problem

European Journal of Operational Research 202 (2010) 82–89 Contents lists available at ScienceDirect European Journal of Operational Research journal...

219KB Sizes 0 Downloads 30 Views

European Journal of Operational Research 202 (2010) 82–89

Contents lists available at ScienceDirect

European Journal of Operational Research journal homepage: www.elsevier.com/locate/ejor

Discrete Optimization

Two- and three-index formulations of the minimum cost multicommodity k-splittable flow problem Mette Gamst b, Peter Neergaard Jensen a, David Pisinger b,*, Christian Plum a a b

DIKU, University of Copenhagen, Denmark DTU Management Engineering, Technical University of Denmark, Denmark

a r t i c l e

i n f o

Article history: Received 20 May 2008 Accepted 4 May 2009 Available online 18 May 2009 Keywords: Network flows Transportation Decomposition Multicommodity flow

a b s t r a c t The multicommodity flow problem (MCFP) considers the efficient routing of commodities from their origins to their destinations subject to capacity restrictions and edge costs. Baier et al. [G. Baier, E. Köhler, M. Skutella, On the k-splittable flow problem, in: 10th Annual European Symposium on Algorithms, 2002, 101–113] introduced the maximum flow multicommodity k-splittable flow problem (MCkFP) where each commodity may use at most k paths between its origin and its destination. This paper studies the NPhard minimum cost multicommodity k-splittable flow problem (MCMCkFP) in which a given flow of commodities has to be satisfied at the lowest possible cost. The problem has applications in transportation problems where a number of commodities must be routed, using a limited number of distinct transportation units for each commodity. Based on a three-index formulation by Truffot et al. [J. Truffot, C. Duhamel, P. Mahey, Branch and price pour le problème du multiflot k-séparable de coût minimal, in: LIMOS, UMR 6158 – CNRS, ROADEF’05, 2005] we present a new two-index formulation for the problem, and solve both formulations through branch-and-price. The three-index algorithm by Truffot et al. is improved by introducing a simple heuristic method to reach a feasible solution by eliminating some symmetry. A novel branching strategy for the two-index formulation is presented, forbidding subpaths in the branching children. Though the proposed heuristic for the three-index algorithm improves its performance, the three-index algorithm is still outperformed by the two-index algorithm, both with respect to running time and to the number of solved test instances. Ó 2009 Elsevier B.V. All rights reserved.

1. Introduction Various variants of the multicommodity flow problem (MCFP) has been considered. In an MCFP we are given a network G ¼ ðV; EÞ where each edge has a certain capacity and possibly an associated cost. Furthermore there is a set of commodities each of which has to be sent from a starting vertex to an ending vertex. Typically the goal is one of the following: 1. (Minimum cost) A given flow for each commodity is to be routed through the network. The goal is to minimize the cost of sending all commodities through the network. 2. (Maximum flow) The goal is to maximize the flow through the network, i.e., there is no fixed flow demand for the commodities. Edge costs are unimportant because the cost of sending flow is not taken into account. The MCFP can be solved in polynomial time, see e.g. [6]. Often, however, there are extra conditions that have to be satisfied, * Corresponding author. Tel.: +45 45 25 45 55. E-mail address: [email protected] (D. Pisinger). 0377-2217/$ - see front matter Ó 2009 Elsevier B.V. All rights reserved. doi:10.1016/j.ejor.2009.05.014

making the problem NP-hard. An example of such a condition is an upper bound on the length of the paths used to ship the flow. This is relevant in telecommunication networks where the path must not be too long as this may lead to delays. The lengthbounded flow problem is NP-hard even for a single-commodity [10]. Another condition could be that all flow for each commodity must be sent via just one path. This type of problem, which is often denoted the Unsplittable MCFP, is introduced and proven NP-hard by Kleinberg [13]. Yet another condition is an upper bound on the number of paths used by a commodity. This is called the multicommodity k-splittable flow problem (MCkFP). We consider the Minimum Cost MCkFP (MCMCkFP), which for instance appears in the transportation sector where a number of different commodities have to be dispatched to various destinations at the lowest possible cost. For safety reasons, it is not desirable to divide the commodities into more than k routes. Robacker [18] considered the flow maximization version of the MCFP. He describes a decomposition of the problem which he hopes may lead to combinatorial methods for solving the multicommodity problem. Ford and Fulkerson [8] suggested a variant of the simplex method, based on column generation, where each simplex step consists in finding a shortest path. This is the

83

M. Gamst et al. / European Journal of Operational Research 202 (2010) 82–89

forerunner of the general Dantzig–Wolfe decomposition procedure [7]. Kamath and Palmon [12] formulated the maximum MCFP as a quadratic problem. They solved the problem in polynomial time using an interior point algorithm. Their results also apply to the minimum cost MCFP. Barnhart et al. [5] considered the minimum cost unsplittable MCFP. They presented a branch-and-price-and-cut algorithm in which they used column generation to find bounds in the branch-and-bound tree, and they proposed a new branching rule allowing new columns to be generated effectively. They concluded that their cuts only work for problems where the commodity flow is large compared to the edge capacities. The multicommodity k-splittable flow problem (MCkFP) was introduced by Baier et al. [4] who presented approximation algorithms for the single- and multicommodity k-splittable flow problems, specifically, variants of the maximum flow problem including the maximum budget-constrained k-splittable flow problem. The authors proved that the maximum single-commodity k-splittable flow problem is NP-hard in the strong sense for directed graphs. Finally, they note that for k P jEj, a k-splittable ðs; tÞ flow problem degenerates to an ordinary ðs; tÞ flow problem. Koch et al. [15] proved that the maximum MCkFP is NP-hard in the strong sense for directed as well as undirected graphs. They also showed that, unless P ¼ NP, no approximation algorithm exists which is better than 56. In a later paper, Koch et al. [14] consider the maximum MCkFP as a two-stage problem consisting of the decision on the k paths (routing) and on the amount of flow on the paths (packing). If k is a constant, they show that it suffices to consider a polynomial number of packing alternatives, which can be constructed in polynomial time. If k is part of the input, Koch et al. propose an approximation algorithm with approximation factor ð1  Þ;  > 0. Truffot et al. [21] used branch-and-price to solve the maximum MCkFP. An edge-path model was presented to which a branch-andprice algorithm was applied. The subproblem for the column generation is a shortest path problem solvable in polynomial time. More recent work on this problem is seen in [19], where Truffot and Duhamel also presented a two-index model for the maximum MCkFP, but they concluded that the two-index model cannot be used in an efficient way in a branch-and-bound scheme. Truffot et al. [20] also introduced the minimum cost MCkFP. A three-index model for the problem was solved using a branch-and-price algorithm. The algorithm is closely related to the one presented in [19,21]. The minimum cost MCkFP can be represented by a directed graph G ¼ ðV; EÞ, where V is the set of vertices and E the set of edges. Each edge e 2 E has a nonnegative cost ce and a positive capacity ue attached. The edge capacities are positive since any edge with zero capacity can be removed from the graph. The set of commodities is denoted L and each commodity l 2 L has a source sl a destination t l an amount to be shipped F l and a maximal numl ber of routes the commodity may use k . Baier et al. [4] and Koch et al. [15] showed that the maximum single-commodity k-splittable flow problem is NP-hard in directed and undirected networks, respectively. As a consequence, it is NP-hard even to decide whether an instance of the minimum cost single-commodity k-splittable flow problem has a feasible solution. In this paper, we compare various formulations of the minimum cost MCkFP when solved through branch-and-price. A two-index formulation is presented and it is compared to the three-index model by Truffot et al. [21]. The two-index model is based on the work of Barnhart et al. [5] where the formulation is changed from unsplittable to k-splittable. The model was introduced for the minimum cost MCkFP by Gamst et al. [9] and for the maximum MCkFP by Truffot and Duhamel [19].

The main contribution of this paper is the branch-and-price algorithm for the two-index model. The algorithm consists of a sophisticated branching strategy, and a pricing problem which handles restrictions imposed by branching. Furthermore, we introduce a heuristic for the three-index model of Truffot et al. [20] which improves the performance of the three-index algorithm. Despite the improvement, however, the two-index algorithm outperforms the three-index model. The three-index algorithm is capable of solving instances with up to 1085 commodities, 400 nodes, and 1520 edges. The two-index algorithm solves instances with up to 2239 commodities, 400 nodes, and 1520 edges. The paper is organized as follows: Section 2 contains the threeindex mathematical formulation of Truffot et al. [20] and the corresponding branch-and-price solution approach. We present a heuristic to speed up the solution process in this section. In Section 3 we introduce the two-index mathematical formulation and solve it through branch-and-price. Both algorithms are tested and compared in Section 4 showing that the three-index algorithm is outperformed by the two-index algorithm, both with respect to running time and to the number of solved test instances. Section 5 concludes the paper. 2. Three-index model The three-index model for the MCMCkFP was introduced by Truffot et al. [20]. Let P l be the set of possible paths for commodity l. The variable xhl p denotes the amount of flow on path p for the hth path of commodity l. The binary variable yhl p decides whether path p for the hth path of commodity l is to be used or not. The model is: l

ðMIP3Þ

min

k X XX l2L

cp xhl p;

h¼1 p2P l l

s:t:

k X XX l2L

dpe xhl p 6 ue

8e 2 E;

ð1Þ

h¼1 p2Pl

hl xhl 8l 2 L; p  up yp 6 0

l

h ¼ 1; . . . ; k ;

8p 2 P l ; ð2Þ

X

yhl p

6 1 8l 2 L;

l

h ¼ 1; . . . ; k ;

ð3Þ

p2Pl l

k X X h¼1 p2P

l xhl p P F

8l 2 L;

ð4Þ

l

xhl 8l 2 L; p P 0 yhl p 2 f0; 1g8l 2 L;

l

8p 2 P l ;

h ¼ 1; . . . ; k ; l

h ¼ 1; . . . ; k ;

8p 2 P l :

The objective function minimizes the total cost. The cost cp of a path p 2 Pl is defined as the sum of edge costs ce on the path. Constraint (1) is a capacity constraint, in which dpe indicates whether or not edge e is used by path p. In (2), up denotes the capacity constraint on path p which is defined as up ¼ minfue j e 2 pg, hence (2) forces the decision variable yhl p to be set if there is flow on the corresponding path xhl p . Constraint (3) ensures that at most one path is used as the hth path of a commodity l, and finally (4) ensures that all commodities are shipped. The model is relaxed into an LP-model: first the binary varihl ables yhl p are LP-relaxed to 0 6 yp 6 1. From (2) and (3) we are gihl hl hl ven that xhl p =up 6 yp 6 1; up > 0. Setting yp ¼ xp =up , does thus not violate any constraints, instead the formulation is simplified to only consisting of one type of variables, and constraint (2) is eliminated:

84

M. Gamst et al. / European Journal of Operational Research 202 (2010) 82–89 l

ðLP3Þ min

k P P P l2L h¼1 p2P

l

Now, we use the dichotomic branching rule adding one of the following two constraints:

cp xhl p;

0

l

k P P P

s:t:

l2L h¼1 p2P l

P p2P

l

xhl p up

dpe xhl p 6 ue

8e 2 E;

@ l

l xhl p P F

h¼1 p2Pl

l

Model (MIP3), and thus also (LP3), cause symmetry in the solution space as the h-index may result in equivalent solutions being treated as different solutions. For example, consider a commodity l which uses two paths p1 and p2 . Now, the two solutions 2l 1l 2l x1l p1 ¼ 1; xp2 ¼ 2 and xp2 ¼ 2; xp1 ¼ 1 are treated as different solutions though they use the same paths. To eliminate some of this symmetry, Truffot et al. use variable ordering by adding constraint (5) to the models (MIP3) and (LP3):

p2P

xpðhþ1Þl 

p2P

xhl p 6 0;

l

8l 2 L;

h ¼ 1; . . . ; k  1:

ð5Þ

l

However, (5) does not eliminate symmetry introduced by flow variables having the same amount of flow. 2.1. Pricing problem The pricing problem can be recognized as a shortest path problem. Let pe 6 0 correspond to the first constraint of the primal model, khl 6 0 to the second, rl P 0 to the third and xhl 6 0 to the symmetry constraint (5). Even though the primal model only consists of one variable type, the dual formulation has three constraints because of the symmetry constraint (5). The reduced costs are:

X e2E

k dpe ðce  pe Þ  þ rl þ xhl up

e2E

dpe ðce  pe Þ 

¼ 0A:

e2/þ ðdhl Þ 2

(1) For a commodity, several identical paths are used but with different values of h. (2) More than one path is used for a single value of h for a commodity. In the first case, we merge the paths into one. In the second case, each path is assigned a unique value of h, if possible. In this way a feasible solution may be reached faster. 3. Two-index model In order to investigate how the h-indices affect the behavior of the branch-and-price algorithm, we have studied another path formulation of the MCMCkFP without the use of h-indices:

min

XX

cp xlp ;

l2L p2P l

s:t:

XX

dpe xlp 6 ue

8e 2 E;

ð7Þ

l2L p2P l

khl þ rl þ xhl  xðh1Þl up l

To decrease the running time of the branch-and-price algorithm we suggest a simple heuristic method to reach a feasible solution by eliminating some symmetry. The model (LP3) can cause problems, as the constraint xhl p =up 6 1 will not always be tight and hence may allow several paths to be used as the hth path of commodity l. Also, the mathematical formulation (LP3) does not prevent the same path for a commodity from taking on several values of h. For these reasons, any of the two following situations may occur:

ðMIP2Þ

hl

8l 2 L; h ¼ 1; 8p 2 Pl ; X

¼ 0A @

dpe xhl p

8l 2 L;

xhl 8l 2 L; h ¼ 1; . . . ; k ; 8p 2 Pl ; p P 0

l

1

X

2.3. Heuristic

l

X

1 0 dpe xhl p

e2/þ ðdhl Þ 1

6 1 8l 2 L; h ¼ 1; . . . ; k ;

k P P

X

X

ð6Þ

l

8l 2 L; h ¼ 2; . . . k  1; 8p 2 P ; X p khl de ðce  pe Þ  þ rl  xðh1Þl up e2E

xlp  up ylp 6 0 8l 2 L; X

ylp 6 k

l

8p 2 P l ;

ð8Þ

8l 2 L;

ð9Þ

8l 2 L;

ð10Þ

p2Pl

X

8l 2 L; h ¼ kl ; 8p 2 Pl : l

For each pair of values ðh; lÞ the task is to find a path p 2 P which has negative reduced cost in (6). If the value for up is known in advance, the problem is a shortest path problem defined in costs ðce  pe Þ P 0, which can be solved in polynomial time using e.g. Dijkstra’s algorithm [1]. Recall that up ¼ minfue je 2 pg. That is, up can take on OðjEjÞ values; for each of the OðjEjÞ values of up the shortest path problem is solved on a graph, where edges with ue < up are removed. 2.2. Branching strategy The chosen branching scheme is closely related to that proposed by Barnhart et al. [5]. For the hth path of commodity l, the strategy is based on dividing all edges /þ ðdhl Þ going out from the first divergence node dhl , into two subsets. The first divergence node dhl of a commodity l and path h is defined as the node to which all flow of the lth commodity is following the same path and from which the flow is using two or more paths. The two resulting subþ sets of outgoing edges /þ 1 ðdhl Þ and /2 ðdhl Þ are disjoint and balanced.

xlp P F l

p2Pl

xlp P 0 8l 2 L;

8p 2 P l ;

ylp 2 f0; 1g 8l 2 L;

8p 2 P l ;

Here xlp is the total flow of commodity l on path p, and the corresponding variable ylp is set if and only if commodity l has flow on path p. The remaining variables have the same meaning as in the three-index model. The objective function minimizes the total cost of routing the commodities. Constraint (7) ensures edge capacities are never violated, and constraint (8) forces the decision variable to take on value 1, whenever the amount of flow on the corresponding path is positive. Constraint (9) limits the number of used paths l for commodity l to at most k and finally constraint (10) ensures that every commodity is shipped. The problem is relaxed in the same manner as the three-index model, i.e., we substitute ylp with xlp =up getting:

M. Gamst et al. / European Journal of Operational Research 202 (2010) 82–89

ðLP2Þ

min

XX

85

cp xlp ;

l2L p2P l

s:t:

XX l2L p2P

dpe xlp 6 ue

8e 2 E;

ð11Þ

l

X xlp l 6k up p2Pl X xlp P F l

8l 2 L;

ð12Þ

8l 2 L;

ð13Þ

Fig. 1. A graph used to illustrate the branching strategy. The graph consists of four nodes, the leftmost node is denoted s, and the rightmost node, t. Edges are eA ; eB ; eC ; eD and eE .

p2Pl

xlp P 0 8l 2 L;

8p 2 P l :

Constraint (8) becomes redundant and is removed from the formulation. 3.1. Pricing problem Let pe ; kl and rl be the dual variables for Eqs. (11)–(13) in (LP2). The reduced cost for a commodity l 2 L and for a path p 2 P l is given by:

X e2E

dpe ðce  pe Þ 

kl þ rl : up

ð14Þ

P We have that cp P 0; rl 6 0 and the terms  e2E dpe pe and kl =up l are nonnegative since pe 6 0 and k 6 0. The problem (14) is thus equivalent to the pricing problem for the three-index algorithm: a shortest path problem defined in costs ðce  pe Þ P 0 which must be solved for each possible value of up for each commodity l. 3.2. Branching strategy The branching strategy from Section 2 unfortunately does not work for the two-index algorithm due to the lacking h-indices in the formulation. Nor can we use the original formulation from l Barnhart et al. [5] since we are allowed to use k paths for each commodity. Thus, we have developed a novel branching strategy for the (LP2) formulation of the problem. The branching strategy for the two-index algorithm consists of forbidding sequences of edges. In the general case it does not suffice to forbid the use of a single edge or node. Consider a divergence node for some commodity. The number of paths emanating from this node may be larger than the number of outgoing edges. Thus, forbidding an edge can result in forbidding several paths. This is not desirable, as an optimal solution becomes unreachable when it uses all edges going out of a divergence node. A similar situation can occur when forbidding nodes. Instead, paths emanating from a divergence node are considered. Let cv l be the set of paths for commodity l 2 L emanating from divergence node v, and let the number of elements in cv l be greater l than k . In this case, branching is necessary. A feasible solution inl cludes at most k of the paths in cv l . Thus, the paths in cv l are dil vided into k þ 1 branching children, and when branching, the paths in the corresponding branching child are forbidden. l The branching strategy is feasible since any subset of k paths from cv l can be used in a solution in at least one of the branching l children. Consider any subset of k paths from cv l . Each of the paths in the subset is forbidden in exactly one branching child, i.e., the total number of branching children, including at least one of the l l paths, is at most k . Since k þ 1 branching children are generated, l at least one branching child holds none of the k paths. When branching, the resulting solution space in each branching child is reduced according to the forbidden paths. The solution spaces of branching siblings, however, are not necessarily disjoint; l a solution using less than k paths from cv l is feasible in several

branching children. The branching strategy may thus impose degeneracy problems. The number of columns in the master problem is possibly exponential. Thus, the branching strategy may cause a large search tree, because the number of paths to forbid can be very large. To limit degeneracy problems and to limit the size of the search tree, the branching strategy is changed into forbidding certain sequences of edges rather than forbidding entire paths. A path conl sists of a sequence of edges. The k þ a; a P 1 paths in cv l may share several edges, but two paths never share all edges. When l generating the branching children it thus suffices to find k þ 1 different edge sequences used by the paths in cv l . Each edge sequence must be consecutive, i.e., it forms a connected subpath, and no two l subpaths share all edges. Let Cv l be the set of the k þ 1 different edge sequences derived from the paths in cv l . Let the edge sequences be derived such that each path in cv l uses exactly one of the edge sequences, and each edge sequence consists of as few edges as possible. This can be done by a breadth first search of all edges used by the paths in cv l . When branching, the edge sequences of the corresponding branching child are forbidden. This is feasible by the same argument for the strategy forbidding entire paths. The reason for forbidding edge sequences rather than entire paths, is that a forbidden edge sequence may cut off more of the solution space, because more than one path is possibly forbidden. This may lead to less degeneracy in the branching children, and to a smaller search tree size. An illustration of the branching strategy is seen in Fig. 1. In the figure, a graph with four nodes is seen. A commodity with source s and target t is to be routed using at most two paths. In the current solution three paths are used: p1 ¼ feA ; eD ; eE g; p2 ¼ feA ; eC ; eE g and p3 ¼ feB ; eC ; eE g. Assume that the optimal solution consists of path p1 and p3 . When branching on the current solution it is thus not feasible to forbid the use of any single path or node. Instead, l k þ 1 subpaths are found: feA ; eC g; feA ; eD g and feB g. Now, the optimal solution is found in the branching child which forbids the use of edge sequence feA ; eC g. The branching strategy necessitates some changes to the pricing problem. When solving the shortest path problem, we need to ensure that we do not use the forbidden edge sequences. The shortest path problem with forbidden paths is a polynomial problem and can be solved using a modified k-shortest path algorithm [22]. 4. Computational results The described branch-and-price algorithms for the two models were tested on a 2.66 gigahertz Intel Xeon machine with 8 gigabyte RAM. Note that CPU times in the following stem from using one core. The algorithms have been implemented using the framework COIN [17] with ILOG CPLEX 10.2 as LP-solver. Computations regarding selection of branching candidate and branching child are handled by COIN. When reporting the running times of the three-index model, we refer to our own implementation of the three-index algorithm. All l tests have been performed with uniform values of k, i.e., k ¼ k for all commodities l 2 L.

86

M. Gamst et al. / European Journal of Operational Research 202 (2010) 82–89

Table 1 Results for the three-index algorithm with and without the proposed heuristic. The second column Heur., indicates whether the heuristic is included. Next follows total time usage (Time), and time spent on running the heuristic (Heur. Time). The Table gives information about the tree size and depth (Tree size and Depth), as well as the number of columns added to the master problem (Col.). Time is measured in seconds and Gap in percent between upper and lower bound. An optimal solution is found whenever Gap = 0.00. A non-zero gap, indicate that the testrun ran out of memory. Upper bounds have been rounded to two decimal precision. Problem, k

Heur.

Time

Heur. Time

Tree size

Depth

Col.

Gap

UB

bl01, 2 bl01, 2 bl01, 3 bl01, 3 bl01, 10 bl01, 10 bl03, 2 bl03, 2 bl03, 3 bl03, 3 bl03, 10 bl03, 10 bs01, 2 bs01, 2 bs01, 3 bs01, 3 bs01, 10 bs01, 10 bs03, 2 bs03, 2 bs03, 3 bs03, 3 bs03, 10 bs03, 10 bs13, 2 bs13, 2 bs13, 3 bs13, 3 bs13, 10 bs13, 10

No Yes No Yes No Yes No Yes No Yes No Yes No Yes No Yes No Yes No Yes No Yes No Yes No Yes No Yes No Yes

176.28 177.74 0.80 0.33 0.91 0.12 225.06 225.38 2.98 0.44 2.17 0.13 212.65 213.30 73.25 66.15 5.34 0.11 0.59 0.47 0.17 0.02 1.31 0.08 581.78 569.69 492.96 529.69 222.87 1.42

– – – <0.01 – <0.01 – – – <0.01 – <0.01 – – – 0.32 – <0.01 – <0.01 – <0.01 – 0.04 – – – – – 0.01

>48,000 >48,000 101 35 31 1 >34,000 >34,000 317 1 63 1 >43,000 >43,000 6295 5531 171 1 125 97 29 1 61 1 >11,000 >11,000 >10,000 >10,000 857 1

54 54 45 17 15 0 75 75 49 0 31 0 73 73 65 45 45 0 28 25 14 0 25 0 234 231 208 168 176 0

353 356 525 525 1740 1740 422 417 591 591 2020 2020 407 408 579 579 1870 1870 325 325 438 438 1470 1470 1397 1393 2110 2103 7039 7030

0.04 0.04 0.00 0.00 0.00 0.00 0.23 0.23 0.00 0.00 0.00 0.00 0.23 0.23 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.17 0.17 0.01 <0.01 0.00 0.00

1549555.0 1549555.0 1548873.0 1548873.0 1548873.0 1548873.0 15836.0 15836.0 15799.0 15799.0 15799.0 15799.0 1536558.0 1536558.0 1533606.0 1533606.0 1533095.0 1533095.0 16488.0 16488.0 16488.0 16488.0 16488.0 16488.0 3259617.5 3259606.0 3254481.25 3254331.5 3254081.06 3254081.06

In both algorithms we have through preliminary results [9] decided to use strong branching [3]. We investigate all possible branching candidates. A best-first search strategy is used in the branch-and-bound tree. Also, based on [9], we set the number of paths priced in per iteration to 0:5  jLj  k for the three-index algorithm and to 0:5  jLj for the two-index algorithm. For the three-index model we multiply the number of paths priced in per iteration with k because of the extra h-index in the model. For both algorithms we never price more than one path into the restricted master problem for each pair of values ðh; lÞ or for each commodity l, respectively, per iteration. This is to keep column generation simple. The algorithms are tested on four types of problems: the Carbin instances [2], also denoted bl,bs, and the grid and planar instances [16]. The Carbin instances are randomly generated problems. The grid instances are formed as grids, and the planar are designed to simulate problems arising in telecommunication. Note that we have not performed tests on all of the instances. We have not solved the Carbin instances with variable edge weights, because the algorithms cannot handle this. For the grid and the planar instances this is due to the algorithms being unable to solve the larger instances in reasonable time. First, we test the branch-and-price algorithm for the three-index model with and without the proposed heuristic. Results can be seen in Table 1. Overall, the running time is improved significantly for the solved instances when the heuristic is included. As can be seen in the table, this is due to achieving a smaller search tree when using the heuristic; the impact of the heuristic is that less branching is required to reach a feasible solution. Furthermore, the table shows that very little time is spent on running the heuristic. For several instances, the optimal solution is found in the root node when using the heuristic. This, however, is not the case for all instances. For the unsolved instances, using the heuristic either

leads to better bounds or it has no effect on the performance. Throughout the remaining of this section, the heuristic is thus included in the branch-and-price algorithm for the three-index model, and the heuristic is run in every node of the search tree. Next, we compare the two branch-and-price algorithms with each other. A summary of the results can be seen in Table 2. Tables 3 and 4 show detailed test data for the Carbin instances, Table 5 shows detailed test data for the planar instances and Table 6 shows detailed test data for the grid instances. For k ¼ 2, the three-index algorithm solves only three of the bs instances and six of the bl instances, while the two-index algorithm is capable of solving nine out of the eleven bs instances and all the bl instances. The average running time for the two-index algorithm is considerably better than for the three-index

Table 2 The number of test instances solved to optimality with the 3-index and 2-index algorithms, for various k values. A.Mean is the average mean time in seconds calculated over those instances solved to optimality by both algorithms. Name

bl bl bl bs bs bs planar planar planar grid grid grid

k

2 3 10 2 3 10 2 3 10 2 3 10

# Instances

11 11 11 11 11 11 5 5 5 7 7 7

3-Index

2-Index

A.Mean

Opt.

A.Mean

Opt.

5.06 0.43 0.87 41.66 37.95 1.08 117.92 2.58 267.40 1.40 0.09 7.00

6/11 10/11 11/11 3/11 8/11 11/11 4/5 4/5 5/5 4/7 5/7 7/7

1.90 0.21 0.22 0.32 0.32 0.27 3.09 2.75 15.13 0.24 0.73 1.31

11/11 11/11 11/11 9/11 11/11 11/11 5/5 5/5 5/5 5/7 7/7 7/7

87

M. Gamst et al. / European Journal of Operational Research 202 (2010) 82–89 Table 3 Results for the three-index and the two-index algorithms on the Carbin instances called bl. Time is measured in seconds and Gap in percent between upper and lower bound. An optimal solution is found whenever Gap = 0.00. The maximal running time is set to 1800 seconds. Results with Time <1800, and a non-zero gap, indicate that the testrun ran out of memory. Upper bounds have been rounded to two decimal precision.

Table 4 Results for the three-index and the two-index algorithms on the Carbin instances called bs. Time is measured in seconds and Gap in percent between upper and lower bound. An optimal solution is found whenever Gap = 0.00. The maximal running time is set to 1800 seconds. Results with Time <1800, and a non-zero gap, indicate that the testrun ran out of memory. Upper bounds have been rounded to two decimal precision.

Name

Name

bl01 bl01 bl01 bl03 bl03 bl03 bl05 bl05 bl05 bl07 bl07 bl07 bl09 bl09 bl09 bl11 bl11 bl11 bl15 bl15 bl15 bl17 bl17 bl17 bl19 bl19 bl19 bl21 bl21 bl21 bl23 bl23 bl23

k

2 3 10 2 3 10 2 3 10 2 3 10 2 3 10 2 3 10 2 3 10 2 3 10 2 3 10 2 3 10 2 3 10

3-Index

2-Index

Time

Gap

UB

Time

Gap

UB

177.45 0.33 0.11 224.00 0.04 0.13 2.72 0.73 0.09 0.04 0.04 0.15 11.97 0.20 0.75 2.70 0.11 0.48 345.16 0.24 0.82 5.33 0.30 1.33 7.59 0.41 1.68 463.15 0.55 2.20 472.65 429.00 1.80

0.04 0.00 0.00 0.23 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.05 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.00 0.00 0.02 <0.01 0.00

1549555.00 1548873.00 1548873.00 15836.00 15799.00 15799.00 460698.00 460041.00 460037.00 5588.00 5588.00 5588.00 6106441.00 6106255.00 6106255.00 68088.50 68086.00 68086.00 32237.00 32220.00 32220.00 13086437.00 13086437.00 13086437.00 108027.00 108027.00 108027.00 5571253.00 5570292.00 5570292.00 54414.50 54402.00 54401.00

1.79 0.05 0.02 5.28 0.04 0.04 9.55 0.08 0.02 0.04 0.03 0.04 0.99 0.18 0.17 0.21 0.13 0.13 77.76 0.24 0.26 0.58 0.32 0.28 0.62 0.42 0.35 19.27 0.58 0.55 58.84 2.14 0.51

0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

1549555.00 1548873.00 1548873.00 15836.00 15799.00 15799.00 460698.00 460041.00 460037.00 5588.00 5588.00 5588.00 6106441.00 6106255.00 6106255.00 68088.50 68086.00 68086.00 32235.00 32220.00 32220.00 13086437.00 13086437.00 13086437.00 108027.00 108027.00 108027.00 5571239.00 5570292.00 5570292.00 54414.50 54402.00 54401.00

algorithm. For k ¼ 3, the three-index algorithm is unable to solve three of the bs instances and one bl instance, where the two-index algorithm solves all to optimality. Again the two-index algorithm shows a better average running time than that of the three-index algorithm. Both algorithms are capable of solving all the Carbin instances for k ¼ 10, however, the two-index algorithm averagely spends less time on doing so than the three-index algorithm. The running times reflect the complexity of the corresponding problem instances and used algorithms. Whenever the value of k exceeds some threshold value, the running time for solving the instance decreases. The reason for this is that at some point, k does not impose a constraint on the problem, i.e., the instance corresponds to the linear MCFP. The value of k has greater impact on the three-index algorithm. When k takes on a value greater than the mentioned threshold, the running time of the three-index algorithm increases, because columns are generated for each h ¼ 1; . . . ; k, and are priced into the master problem. Generating columns and solving a larger master problem is time consuming. Also, even if the value of k is greater than the threshold, the three-index algorithm may generate solutions using more than one path as the hth path, hence causing the algorithm to branch. The same is obviously not the case for the two-index algorithm. The three-index algorithm fails to solve the largest planar instance for k = 2 and 3. The two-index algorithm solves all the planar instances. The average running time for the algorithms shows that the two-index algorithm performs significantly better than the three-index algorithm for k = 2 and 10, but the three-index algorithm has smaller running time for k = 3.

bs01 bs01 bs01 bs03 bs03 bs03 bs05 bs05 bs05 bs07 bs07 bs07 bs11 bs11 bs11 bs13 bs13 bs13 bs15 bs15 bs15 bs17 bs17 bs17 bs19 bs19 bs19 bs21 bs21 bs21 bs23 bs23 bs23

k

2 3 10 2 3 10 2 3 10 2 3 10 2 3 10 2 3 10 2 3 10 2 3 10 2 3 10 2 3 10 2 3 10

3-Index

2-Index

Time

Gap

UB

Time

Gap

UB

213.71 66.15 0.11 0.55 0.03 0.08 331.11 380.74 0.19 273.61 182.37 0.14 403.03 0.32 1.19 506.64 610.59 1.28 440.36 499.73 0.78 62.52 0.33 1.32 58.90 0.29 1.26 658.58 53.54 2.93 616.91 0.56 2.65

0.23 0.00 0.00 0.00 0.00 0.00 0.59 0.09 0.00 0.28 0.00 0.00 <0.01 0.00 0.00 0.17 <0.01 0.00 0.09 <0.01 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.03 0.00 0.00 0.05 0.00 0.00

1536558.00 1533606.00 1533095.00 16488.00 16488.00 16488.00 410502.00 408496.00 408114.00 5816.00 5801.00 5800.00 63381.83 63380.33 63380.33 3259573.50 3254299.00 3254081.06 35392.00 35362.00 35360.00 11323466.00 11323427.00 11323427.00 105449.50 105449.50 105449.50 5194721.00 5193164.50 5193164.50 53994.50 53968.63 53968.63

5.21 0.10 0.04 0.10 0.02 0.04 9.57 0.43 0.07 4.65 0.16 0.06 0.84 0.34 0.21 523.72 5.77 0.35 62.74 0.77 0.28 0.53 0.34 0.33 0.34 0.36 0.31 27.37 0.62 0.64 652.64 0.62 0.68

0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.00 0.00 <0.01 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

1536558.00 1533606.00 1533095.00 16488.00 16488.00 16488.00 410417.00 408496.00 408114.00 5816.00 5801.00 5800.00 63381.83 63380.33 63380.33 3258178.50 3254192.72 3254081.06 35390.00 35362.00 35360.00 11323466.00 11323427.00 11323427.00 105449.50 105449.50 105449.50 5194297.00 5193164.50 5193164.50 53987.00 53968.63 53968.63

For larger grid instances with k = 2, both algorithms experience problems. The three-index algorithms solves four, and the two-index algorithm solves five out of seven instances. For k ¼ 3, the three-index algorithm manages to solve five out of seven instances, and the two-index algorithm solves all instances. For k ¼ 10 all instances are solved. Again, the two-index algorithm shows a better average running time than the three-index algorithm for k ¼ 2 and k ¼ 10, while the opposite holds for k ¼ 3. Larsson and Yuan [16] are capable of solving all grid instances as the linear MCFP. Neither of the two algorithms here presented are capable of solving instances as large as Larsson and Yuan, which is due to our algorithms not being specialized for the linear MCFP. The three-index algorithm is capable of solving instances with up to 2239 commodities, 850 edges and 150 nodes ðplanar150 Þ, and 400 commodities, 1520 edges and 400 nodes ðgrid400:1520:400 Þ for k ¼ 10, and instances with up to 532 commodities, 1085 edges and 100 nodes ðplanar100 Þ for k ¼ 2. The two-index algorithm solves instances with up to 2239 commodities, 850 edges and 150 nodes ðplanar150 Þ and 400 commodities, 1520 edges and 400 nodes ðgrid400:1520:400 Þ for k ¼ 10, and instances with up to 2239 commodities, 850 edges and 150 nodes ðplanar150 Þ for k ¼ 2. Also, the three-index algorithm is capable of solving about 76% of the test instances to optimality, while the two-index has solved just over 96% of the test instances to optimality. Hence, for the far majority of the problem instances, the two-index algorithm outperforms the three-index algorithm both with respect to time spent and to the number of instances solved to optimality. We

88

M. Gamst et al. / European Journal of Operational Research 202 (2010) 82–89

Table 5 Results for the three-index and the two-index algorithms on planar instances. Time is measured in seconds and Gap in percent between upper and lower bound. An optimal solution is found whenever Gap = 0.00. The maximal running time is set to 1800 seconds. Results with Time <1800, and a non-zero gap, indicate that the testrun ran out of memory. Upper bounds have been rounded to two decimal precision. Name

planar30 planar30 planar30 planar50 planar50 planar50 planar80 planar80 planar80 planar100 planar100 planar100 planar150 planar150 planar150

k

3-Index

2 3 10 2 3 10 2 3 10 2 3 10 2 3 10

2-Index

Time

Gap

UB

Time

Gap

UB

0.04 0.06 0.20 0.29 0.39 1.79 243.72 2.90 15.93 227.61 6.97 37.12 1503.54 1302.07 1281.94

0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 >1000 >1000 0.00

44350624.00 44350624.00 44350624.00 122199689.00 122199689.00 122199689.00 182438134.00 182438134.00 182438134.00 231339582.00 231339582.00 231339582.00 545566045720.00 545566045720.00 548087089.00

0.06 0.06 0.07 0.87 0.55 0.50 6.70 2.42 2.46 10.81 7.95 7.64 248.59 83.24 64.99

0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

44350624.00 44350624.00 44350624.00 122199689.00 122199689.00 122199689.00 182438134.00 182438134.00 182438134.00 231339582.00 231339582.00 231339582.00 548087089.00 548087089.00 548087089.00

Table 6 Results for the three-index and the two-index algorithms on the grid instances. Time is measured in seconds and Gap in percent between upper and lower bound. An optimal solution is found whenever Gap = 0.00. The maximal running time is set to 1800 seconds. Results with Time <1800, and a non-zero gap, indicate that the testrun ran out of memory. Upper bounds have been rounded to two decimal precision. Name

k

grid25:80:50 grid25:80:50 grid25:80:50 grid25:80:100 grid25:80:100 grid25:80:100 grid100:360:50 grid100:360:50 grid100:360:50 grid100:360:100 grid100:360:100 grid100:360:100 grid225:840:100 grid225:840:100 grid225:840:100 grid225:840:200 grid225:840:200 grid225:840:200 grid400:1520:400 grid400:1520:400 grid400:1520:400

2 3 10 2 3 10 2 3 10 2 3 10 2 3 10 2 3 10 2 3 10

3-Index

2-Index

Time

Gap

UB

Time

Gap

UB

0.03 0.05 0.07 0.42 0.08 0.24 1.06 0.06 0.18 4.07 0.18 0.61 133.91 14.52 1.84 275.21 309.44 12.19 252.51 251.16 33.85

0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 <0.01 0.00 0.00 <0.01 <0.01 0.00 >1000 >1000 0.00

827319.00 827319.00 827319.00 1705378.00 1705378.00 1705378.00 1524657.00 1524642.00 1524642.00 3031717.00 3031695.00 3031695.00 5049776.50 5049688.50 5049688.50 10402290.80 10401819.87 10401782.00 15281128750.00 15281128750.00 25864036.57

0.05 0.02 0.03 0.08 0.08 0.06 0.21 0.05 0.06 0.61 0.20 0.18 70.71 3.28 0.54 212.23 7.18 1.92 614.19 28.07 6.39

0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 <0.01 0.00 0.00 <0.01 0.00 0.00

827319.00 827319.00 827319.00 1705378.00 1705378.00 1705378.00 1524657.00 1524642.00 1524642.00 3031717.00 3031695.00 3031695.00 5049759.50 5049688.50 5049688.50 10402154.75 10401782.00 10401782.00 25864060.50 25864036.57 25864036.57

conclude that this is partly due to the extra h-index in the three-index model causing symmetry in the solution space, and partly due to the three-index algorithm having k times as many variables as the two-index algorithm. 5. Conclusions In this paper we have presented a branch-and-price algorithm for the MCMCkFP which outperforms existing methods. The new branch-and-price algorithm is based on a two-index formulation, which unlike previous formulations omits a symmetry inducing index for each of the k paths per commodity. The two-index model was independently suggested for the Maximum Flow MCkFP by Truffot et al. [20], but the authors discarded the model since it complicates branching. We have presented a branching strategy for the model which ensures that the pricing problem can be solved efficiently. The branching strategy and the algorithm for the resulting pricing problem can also be used for the Maximum Flow problem. Thus, our branch-and-price algorithm can be

viewed as a general framework applicable for various variants of the MCkFP. Furthermore, we have introduced a rounding heuristic for the three-index branch-and-price algorithm which transforms certain fractional solutions into feasible solutions. Though the heuristic boosts the performance of the three-index algorithm, it is still outperformed by the two-index algorithm. The three-index algorithm including the proposed heuristic has solved 76% of the problem instances to optimality within the available time and space, where the two-index has solved 96% of the problem instances to optimality. Further comparison of the algorithms shows that the two-index branch-and-price algorithm also outperforms the three-index algorithm with respect to running time. The solution times for the Minimum Cost MCkFP are larger than those of Barnhart et al. [5] for the unsplittable MCFP. This indicates that the k-splittable constraints are harder to maintain than the unsplittable constraints, probably because the k-splittable constraints increase the size of the solution space and introduce symmetry. In order to improve the performance it could be interesting

M. Gamst et al. / European Journal of Operational Research 202 (2010) 82–89

to tighten the formulations through various cuts, as done in e.g. Jepsen et al. [11]. Also, adding constraints which break the symmetry might improve the solution times. The introduction of a good initial heuristic will only marginally improve the running times, since the current algorithm generally quickly finds a good upper bound. References [1] R.K. Ahuja, T.L. Magnanti, J.B. Orling, Network Flows, Prentice-Hall, Inc., 1993. [2] F.Alvelos. Branch-and-Price and Multicommodity Flows. Ph.D. Thesis, Universidade do Minho, 2005. Available from . [3] D. Applegate, R. Bixby, V. Chvatal, B. Cook, Finding Cuts in the TSP, Technical Report 95-05, Center for Discrete Mathematics and Theoretical Computer Science (DIMACS), Rutgers University, Piscatawy, NJ, 1995. [4] G. Baier, E. Köhler, M. Skutella, On the k-splittable flow problem, in: 10th Annual European Symposium on Algorithms, 2002, pp. 101–113. [5] C. Barnhart, C.A. Hane, P.A. Vance, Using branch-and-price-and-cut to solve origin-destination integer multicommodity flow problems, Operations Research 48 (2000) 318–326. [6] T.H. Cormen, C.E. Leiserson, R.L. Rivest, C. Stein, Introductions to Algorithms, second ed., MIT Press and McGraw-Hill, 2001. [7] G.B. Dantzig, P. Wolfe, Decomposition principle for linear programs, Operations Research 8 (1960) 101–111. [8] L.R. Ford, D.R. Fulkerson, A suggested computation for maximal multicommodity network flows, Management Science 5 (1958) 97–101. [9] M. Gamst, P.N. Jensen, C. Plum, Multicommodity k-Splittable Flow Problemet Løst Med Branch-and-price, Report, Department of Computer Science, University of Copenhagen (DIKU), Denmark, 2006.

89

[10] G. Handler, I. Zang, A dual algorithm for the constrained shortest path problem, Networks 10 (1980) 293–310. [11] M. Jepsen, B. Petersen, S. Spoorendonk, D. Pisinger, Introducing subset row inequalities in a branch-and-cut-and-price algorithm for the vehicle routing problem with time windows, Operations Research 56 (2008) 497–511. [12] A. Kamath, O. Palmon, Improved interior point algorithms for exact and approximate solution of multicommodity flow problems, in: Proceedings of the Sixth Annual ACM–SIAM Symposium on Discrete Algorithms, 1995. [13] J.M. Kleinberg, Approximation algorithms for disjoint paths problems, Ph.D. Thesis, MIT, Cambridge, MA, 1996. [14] R. Koch, M. Skutella, I. Spenke, Approximation and complexity of k-splittable flows, Approximation and Online Algorithms, in: Third International Workshop, WAOA, 2005, pp. 244–257. [15] R. Koch, M. Skutella, I. Spenke, Maximum k-splittable s,t-flows, Theory of Computing Systems 43 (1) (2008) 1432–4350. [16] T. Larsson, D. Yuan, An augmented lagrangian algorithm for large scale multicommodity routing, Computational Optimization and Applications 27 (2004) 187–215. [17] R. Lougee-Heimer, The common optimization interface for operations research, IBM Journal of Research and Development 47 (2003) 57–66. [18] J.T. Robacker, Concerning multicommodity networks, Technical Report RM1799, The RAND Corporation, Santa Monica, California, 1956. [19] J. Truffot, C. Duhamel, A branch-and-price algorithm for the k-splittable maximum flow problem, Discrete Optimization 5 (3) (2008) 629–646. [20] J. Truffot, C. Duhamel, P. Mahey, Branch-and-price pour le problème du multiflot k-séparable de coût minimal, in: LIMOS, UMR 6158 – CNRS, ROADEF’05, 2005. [21] J. Truffot, C. Duhamel, P. Mahey, Using branch-and-price to solve multicommodity k-splittable flow problems, in: Proceedings of the International Network Optimization Conference (INOC), 2005. [22] D. Villeneuve, G. Desaulniers, The shortest path problem with forbidden paths, European Journal of Operational Research 165 (1) (2005) 97–107.