Algorithms for Solving Mixed Integer Programs

Một phần của tài liệu Optimization methods in finance, 2nd edition (Trang 163 - 170)

The modeling power of mixed integer programming comes with some cost. Mixed integer programming belongs to the class of NP-hard computational problems (Conforti et al., 2014). In layman’s terms, this means that, unlike convex opti- mization problems, which can be solved with fast and reliable numerical algo- rithms, the same cannot be expected for mixed integer programs. The algorithms that we describe next can in principle solve any mixed integer linear programs in finitely many steps. However, the NP-hardness of integer programming implies that for some problem instances the computational cost incurred by these algo- rithms could be insurmountable even for any foreseeable amount of computa- tional power.

The two most popular generic methods for solving mixed integer linear programs arecutting planes andbranch and bound. Both of these methods rely extensively on linear programming relaxations. A cutting plane is a new linear constraint to the linear programming relaxation that “cuts off” non-integer solutions without cutting off any feasible solution of the original mixed integer linear program. The method of cutting planes was proposed by Dantzig et al. (1954) in the context of the traveling-salesman problem, and by Gomory (1958, 1960) for pure integer linear programs and mixed integer linear programs, respectively. The method is based on solving a sequence of increasingly tighter linear programming relaxations by adding cutting planes until a solution to the mixed integer linear program is found. On the other hand, Land and Doig (1960) proposed a “branch-and-bound” method to solve mixed integer linear programs.

Branch and bound is an enumerative procedure based on dividing the original problem into a number of smaller problems (branching) and evaluating their quality based on their linear programming relaxations (bounding). Branch and bound was the most effective technique for solving mixed integer linear programs for multiple decades. However, in the 1990s, cutting planes made a resurgence.

Current state-of-the-art integer programming solvers combine cutting planes and branch and bound into an overall procedure called “branch and cut”, a term coined in Padberg and Rinaldi (1987).

8.4 Algorithms for Solving Mixed Integer Programs 151

8.4.1 Branch-and-Bound Method

The gist of the branch-and-bound method can be easily grasped via a couple of examples. Consider the following integer linear program (see Figure 8.3):

max x1+x2

s.t. −x1+x22 8x1+ 2x219 x1, x20 x1, x2Z.

(8.12)

x2

maxx1+x2

x1

Figure 8.3 A two-variable integer program

Step 1. Solve the linear programming relaxation of (8.12), namely max x1+x2

s.t. −x1+x22 8x1+ 2x219 x1, x20.

The solution is ¯x =

1.5 3.5T

with objective value 5. Thus 5 is an upper bound on the optimal value of (8.12). The vector ¯x=

1.5 3.5T

is not a feasible solution to (8.12) since the entries of ¯x are fractional.

How can we exclude this fractional solution while preserving the feasible integral solutions? One way is tobranch: create two new linear programs, one with the additional constraint x1 1, and the other with the additional constraintx12. Clearly, any solution to the integer program must be feasible to one or the other of these two problems. We will solve both of these linear programs.

Step 2. Solve the first of the two new linear programs:

max x1+x2

s.t. −x1+x22 8x1+ 2x219 x11

x1, x20.

The solution is ¯x = 1 3T

with objective value 4. This is a feasible integral solution to (8.12). So now we have the upper bound 5 and the lower bound 4 on the optimal value of (8.12).

Step 3. Solve the second new linear program:

max x1+x2

s.t. −x1+x22 8x1+ 2x219 x12

x1, x20.

The solution is ¯x =

2 1.5T

with objective value 3.5. Because this value is worse than the lower bound of 4 that we already have, we do not need any further branching. We conclude that the vector ¯x =

1 3T

with objective value 4 found in Step 2 is an optimal solution to (8.12).

The solution of the above integer program by branch and bound required the solution of three linear programs. These problems can be arranged in abranch- and-bound tree, see Figure 8.4. Each nodeof the tree corresponds to one of the problems that were solved.

x1= 1.5,x2= 3.5 z= 5

x1= 1,x2= 3 z= 4

x1= 2,x2= 1.5 z= 3.5

x11 x12

Figure 8.4 Branch-and-bound tree for(8.12)

We can stop the enumeration at a node of the branch-and-bound tree for three different reasons (when they occur, the node is said to bepruned).

Pruning by integrality occurs when the corresponding linear program has an optimal solution that is integral. This occurred in Step 2 in the above example.

8.4 Algorithms for Solving Mixed Integer Programs 153

Pruning by bounds occurs when the objective value of the linear program at that node is worse than the value of the best feasible solution found so far. This occurred in Step 3 in the above example.

Pruning by infeasibility occurs when the linear program at that node is infea- sible. This did not occur in any of the steps in the above example.

We next illustrate the branch-and-bound method is a slightly modified instance that leads to a larger branch-and-bound tree. Consider the integer linear pro- gram:

max 3x1+x2 s.t. −x1+x22

8x1+ 2x219 x1, x20 x1, x2Z.

(8.13)

Figure 8.5 depicts the branch-and-bound tree for this problem.

x1= 1.5,x2= 3.5

x1= 1,x2= 3 x1= 2, x2= 1.5

x11 x12

x1= 2, x2= 1

x21 x22

x12 x13

z= 8

z = 6 z = 7.5

z= 7.375

z = 7

x1= 2.125, x2= 1

Figure 8.5 Branch-and-bound tree for(8.13)

Algorithm 8.1 sketches the branch-and-bound method for a general mixed integer linear program of the form (8.1). The branch-and-bound method keeps a list of linear programming problems obtained by relaxing the integrality require- ments on the variables and imposing constraints such asxj≤ujorxj≥lj. Each such linear program corresponds to anodeof the branch-and-bound tree. It will be convenient to letNidenote both a node and its corresponding linear program in the branch-and-bound tree. Let xi and zi denote respectively the optimal solution and optimal value of the linear programNiwith the conventionzi=

ifNiis infeasible. LetN0denote the root node of the branch-and-bound tree: it corresponds to the linear programming relaxation (8.2) of (8.1). Throughout the algorithm we let Ldenote the list of nodes that must still be solved. These are the nodes that have not been pruned nor branched on. Throughout the algorithm xdenotes the best feasible solution found so far andzU its objective value. The value zU is also the best upper bound on the optimal value z of (8.1) so far.

Initially, the bound zU can be derived from a heuristic solution to (8.1), or it can be set to +if no heuristic solution is available.

Algorithm 8.1Branch-and-bound method

1: L:={N0},zU := +, x:=∅(initialization)

2: if L= thenHALT andreturnthe vectorx end if (termination)

3: choose and delete a nodeNi fromLand solve it(select next node to solve)

4: if zi≥zU thengo to step 2end if (prune Ni)

5: if xi is feasible for (8.1) then(update upper bound and prune) zU :=zi; x:=xi

delete fromLall nodesNk withzk ≥zU go to step 2

6: else(branch from Ni)

choosej∈J such that ¯xijZ

branch on variablexj,that is, construct two new linear programs Ni1: add the new constraintxj ≤ x¯ijtoNi

Ni2: add the new constraintxj ¯xijtoNi

addNi1, Ni2 toLand go to step 2

7: end if

There are a variety of strategies for node selection (step 3) and for branching (step 6). Even more important to the success of branch and bound is the ability to prune the tree (steps 4 and 5). This will occur when zU is a good upper bound and whenziis a good lower bound. For this reason, it is crucial to have a formulation of (8.1) whose linear programming relaxation has an optimal value zLP as close as possible to the optimal valuez of (8.1).

8.4.2 Cutting-Plane Method

A valid inequality for a mixed integer linear program is a linear inequality that is satisfied by all feasible solutions. A cutting plane of a mixed integer linear program is a valid inequality that cuts off some solutions to its linear programming relaxation.

As we noted in Proposition 8.3, if an optimal solution of the linear program- ming relaxation satisfies the integrality constraints of a mixed integer linear program, then it is an optimal solution to the mixed integer linear program.

The gist of cutting-plane methods is the observation that, when the latter does

8.4 Algorithms for Solving Mixed Integer Programs 155

not occur, the linear programming relaxation can be strengthened by adding a cutting plane that cuts off its optimal solution.

Gomory (1960) proposed the following approach for solving mixed integer linear programs. Assume the variables in the problem are non-negative and satisfy the equality constraint

j∈J

ajxj+

j∈J

ajxj=b. (8.14)

Assume thatbis not an integer and letf0be its fractional part, i.e.b=b+f0, where 0< f0<1. Forj∈J, letaj =aj+fj, where 0≤fj <1. Replacing in (8.14) and moving sums of integer products to the right, we get

j∈J:fj≤f0

fjxj+

j∈J:fj>f0

(fj1)xj+

j∈J

ajxj = k+f0,

where k is some integer. Using the fact thatk ≤ −1 or k 0, we must have either

j∈J:fj≤f0

fj 1−f0

xj+

j∈J:fj>f0

1−fj 1−f0

xj

j∈J

aj 1−f0

xj 1

or

jJ:fjf0

fj

f0xj

jJ:fj>f0

1−fj

f0 xj+

jJ

aj

f0xj 1.

This is of the form

jcjxj1 or

jdjxj1, which implies

jmax(cj, dj)xj 1 because the variablesxj are non-negative.

Which is the larger of the two coefficientscj anddj in our case? The answer is easy since one coefficient is positive and the other is negative for each variable xj. Therefore, we get

j∈J:fj≤f0

fj

f0

xj+

j∈J:fj>f0

1−fj

1−f0

xj+

j∈J:aj>0

aj

f0

xj

∈J:aj<0

aj

1−f0

xj1.

(8.15) Inequality (8.15) is valid for all x 0 that satisfy (8.14) with xj integer for j∈J. It is called aGomory mixed integer cut.

We illustrate the use of Gomory cuts on problem (8.12). To that end, we first add slack variablesx3 andx4 to turn the inequality constraints into equalities:

max x1+x2

s.t. −x1+x2+x3= 2 8x1+ 2x2+x4= 19 x1, x2, x3, x40 x1, x2Z.

Solving the linear programming relaxation by the simplex method we get the

optimal basis B = {1,2} and so the constraints of the linear programming relaxation can be written as

x10.2x3+ 0.1x4= 1.5 x2+ 0.8x3+ 0.1x4= 3.5 x1, x2, x3, x40.

The corresponding basic solution is x3 = x4 = 0, x1 = 1.5, x2 = 3.5 with objective value z= 5. This solution is not integer. Let us generate the Gomory cut corresponding to the equation

x10.2x3+ 0.1x4= 1.5.

We have f0 = 0.5, f1 = f2 = 0, a3 = 0.2 and a4 = 0.1. Applying formula (8.15), we get the Gomory cut

0.2

10.5x3+0.1

0.5x41, i.e., 2x3+x45.

Sincex3= 2 +x1−x2andx4= 19−x12x2, we can express the above Gomory cut in terms ofx1, x2:

3x1+ 2x29.

Figure 8.6 Formulation strengthened by a cut

Adding this cut to the linear programming relaxation, we get the following

Một phần của tài liệu Optimization methods in finance, 2nd edition (Trang 163 - 170)

Tải bản đầy đủ (PDF)

(351 trang)