Recherche d'information en Open Access (domaine Sciences exactes et appliquées)
métodes exactes
-
Upload
souhir-zribi -
Category
Documents
-
view
226 -
download
0
Transcript of métodes exactes
-
8/9/2019 métodes exactes
1/48
Integer Programming
Fabio Furini
December 8, 2014
Integer Programming 1
-
8/9/2019 métodes exactes
2/48
Outline
1 General Definitions
2 Branch and bound3 Cutting planes
Integer Programming 2
-
8/9/2019 métodes exactes
3/48
Optimization Problems
Optimization Problems
Integer Programming 3
-
8/9/2019 métodes exactes
4/48
Integer Linear Programming – ILP
NotationAn integer linear program is a linear program with the additionalconstraint that the variables are required to be integer.
min cTx (1)Ax ≥ b (2)
x ≥ 0 (3)
x ∈ N (4)
where A ∈ Rm X n , b ∈ Rm, c ∈ Rn.Write an example of the matrix and the vectors...
Integer Programming 4
-
8/9/2019 métodes exactes
5/48
Integer Linear Programming – ILP
NotationEquivalent way an writing an ILP:
min
n
i =1
c i x i (5)n
i =1
Aij x i ≥ b j j = 1, . . . , m (6)
x i ≥ 0 i = 1, . . . , n (7)x i ∈ N i = 1, . . . , n (8)
Integer Programming 5
-
8/9/2019 métodes exactes
6/48
Integer Linear Programming – ILP
Mixed – ILP
An ILP when some variables are restricted to be integer and some are not,the problem is called: mixed integer linear program.
min cTx (9)
Ax ≥ b (10)x ≥ 0 (11)
x j ∈ N j = 1, . . . , p (12)
(Mixed) Binary ILPAn ILP where the integer variables are restricted to be 0 or 1.
x ∈ {0, 1}
Integer Programming 6
-
8/9/2019 métodes exactes
7/48
Modeling Potential
Modeling with integer variables is useful in a wide variety of applications/problems:
model logical requirements (boolean conditions)
model managerial decisions
select among different resources
allocate scarce resources
manage portfolios and projects
model fixed costsmany others . . .
Integer Programming 7
-
8/9/2019 métodes exactes
8/48
Solvers
Commercial solvers:
CPLEX
GUROBI
XPRESSEXCEL
Open solvers:
SCIP
CBC
GLPKLPSOLVE
Libre Office
Problems with more than a few thousand variables are often not possibleto solve unless they show a specific exploitable structure.
Integer Programming 8
-
8/9/2019 métodes exactes
9/48
Exact Algorithms
Branch and Bound
Cutting planes
Branch and CutBranch and Price
Dynamic Programming
A combination of the above methods
Integer Programming 9
-
8/9/2019 métodes exactes
10/48
Heuristic Algorithms
Genetic algorithm
Tabu Search
Simulated Annealing
Local Search
Ant Colony Optimization
Metaheuristic
A combination of the above methods
Integer Programming 10
-
8/9/2019 métodes exactes
11/48
Example 1
Suppose we wish to invest 19,000 e and we have four investmentopportunities:
1 investment of 6,700 e and has a net present value of 8,000 e
2 investment of 10,000 e and has a net present value of 11,000 e3 investment of 5,500 e and has a net present value of 6,000 e
4 investment of 3,400 e and has a net present value of 4,000 e
Into which investments should we place our money so as to maximize our
total present value? Such problems are called capital budgeting problems.
Integer Programming 11
-
8/9/2019 métodes exactes
12/48
Example 1
Decision variable:
x j =
1 then we will make investment j0 otherwise
max8, 000x 1 + 11, 000x 2 + 6, 000x 3 + 4, 000x 4 (13)
6, 700x 1 + 10, 000x 2 + 5.500x 3 + 3, 400x 4 ≤ 19, 000 (14)
x j ∈ {0, 1} i = 1, 2, 3, 4 (15)
Integer Programming 12
-
8/9/2019 métodes exactes
13/48
Example 1
The optimal linear programming solution is:
the optimal linear programming sol is: x 1=1, x 2=0.89, x 3= 0, x 4 = 1
the objective function value is 21,790 e
this solution is not integral
rounding x 2 down to 0 gives a feasible sol with a value of 12,000 e
the optimal solution is: x 1=0, x 2=1, x 3= 1, x 4 = 1
the objective function value is 21,000 e
Integer Programming 13
-
8/9/2019 métodes exactes
14/48
Example 1
There are a number of additional constraints we might want to add:
We can only make two investments
If investment 2 is made, then investment 4 must also be made
If investment 1 is made, then investment 3 cannot be made andvice-versa
x 1 + x 2 + x 3 + x 4 ≤ 2
x 2 − x 4 ≤ 0
x 1 + x 3 ≤ 1
Integer Programming 14
-
8/9/2019 métodes exactes
15/48
Example 2
As the project team leader, you must determine the best selection of 5 outof 10 possible projects. Project profits p 1, p 2, . . . , p 10.
x j =
1 then we execute project j0 otherwise
max10
j =1
p j x j (16)
10
j =1
x j = 5 (17)
x j ∈ {0, 1} i = 1, . . . , 10 (18)
Integer Programming 15
-
8/9/2019 métodes exactes
16/48
Example 2 – additional operational constraints
If project 2 is executed, then project 3 must also be executed
x 2 ≤ x 3 (19)If project 2 is executed, then project 4 cannot be executed
x 4 ≤ 1 − x 2 (20)
Executing projects 1 and 6 will allow you to execute project 7
x 7 ≤ x 1, x 7 ≤ x 6 (21)
Executing projects 1 or 6 will allow you to execute project 8
x 8 ≤ x 1 + x 6 (22)
Executing projects 2 and 3 will prevent you executing project 9x 9 ≤ 2 − (x 2 + x 3) (23)
Executing projects 2 or 3 will prevent you executing project 10
x 10 ≤ 1 − x 2, x 10 ≤ 1 − x 3 (24)
Integer Programming 16
B h d b d
-
8/9/2019 métodes exactes
17/48
Branch and bound
Branch and bound
Integer Programming 17
B h d b d
-
8/9/2019 métodes exactes
18/48
Branch and bound
Branch and bound has been the most effective technique for solvingMILPs in the following forty years or so. It was proposed in 1960 byLand and Dong.
It is based on dividing the problem into a number of smaller problems
(branching) and evaluating their quality based on solving theunderlying linear programs (bounding).
However, in the last ten years, cutting planes have made a resurgenceand are now efficiently combined with branch and bound into an
overall procedure called branch and cut. This term was coined byPadberg and Rinaldi 1987.
Integer Programming 18
B h d b d
-
8/9/2019 métodes exactes
19/48
Branch and bound
All these approaches involve solving a series of linear programs:
(MILP) min cTx (25)
Ax ≥ b (26)
x ≥ 0 (27)
x j ∈N
j = 1, . . . , p (28)Linear Programming Relaxation:
(LP) min cTx (29)
Ax ≥ b (30)
x ≥ 0 (31)
The best known (and most successful) methods for solving LPs are the
interior-point and simplex methods .Integer Programming 19
B h d b d
-
8/9/2019 métodes exactes
20/48
Branch and bound
Since LP is less constrained than MILP, the following are immediate:
The optimal objective value for LP is less than or equal to the optimalobjective for MILP
If LP is infeasible, then so is MILP
If the optimal solution x of LP satisfies x j integer for j = 1, ..., p ,then x is also optimal for MILP
it gives a bound on the optimal value of MILP
Integer Programming 20
B h d b d l 1
-
8/9/2019 métodes exactes
21/48
Branch and bound example 1
We first explain branch and bound by solving the following pure integerlinear program:
max x 1 + x 2 (32)
−x 1 + x 2 ≤ 2 (33)8x 1 + 2x 2 ≤ 19 (34)
x 1, x 2 ≥ 0 (35)
x 1, x 2 ∈ N (36)
The first step is to solve the linear programming relaxation:x 1 = 1.5, x 2 = 3.5 with objective value 5.
Integer Programming 21
Branch and bound example 1
-
8/9/2019 métodes exactes
22/48
Branch and bound example 1
How can we cut this sol while preserving the feasible integral solutions?
Integer Programming 22
Branch and bound example 1
-
8/9/2019 métodes exactes
23/48
Branch and bound example 1
One way is to branch, creating two linear programs:
x 1 ≤ 1
x 1 ≥ 2Clearly, any solution to the integer program must be feasible to one orthe other of these two problems.
We will solve both of these linear programs.
Integer Programming 23
Branch and bound example 1
-
8/9/2019 métodes exactes
24/48
Branch and bound example 1
max x 1 + x 2 (37)
−x 1 + x 2 ≤ 2 (38)
8x 1 + 2x 2 ≤ 19 (39)x 1 ≤ 1 (40)
x 1, x 2 ≥ 0 (41)
The solution is
x 1 = 1, x 2 = 3 withobjective value 4.
max x 1 + x 2 (42)
−x 1 + x 2 ≤ 2 (43)
8x 1 + 2x 2 ≤ 19 (44)x 1 ≥ 2 (45)
x 1, x 2 ≥ 0 (46)
The solution is
x 1 = 2, x 2 = 1.5 withobjective value 3.5.
Integer Programming 24
Branch and bound example 1
-
8/9/2019 métodes exactes
25/48
Branch and bound example 1
These problems can be arranged in a branch-and-bound tree. Each node
of the tree corresponds to one of the problems that were solved:
Figure: B&B tree of example 1
Integer Programming 25
Branch and bound example 1
-
8/9/2019 métodes exactes
26/48
Branch and bound example 1
We can stop the enumeration at a node of the branch-and-bound tree forthree different reasons (when they occur, the node is said to be pruned).
Pruning by integrality occurs when the corresponding linear programhas an optimum solution that is integral.
Pruning by bounds occurs when the objective value of the linearprogram at that node is worse than the value of the best feasiblesolution found so far.
Pruning by infeasibility occurs when the linear program at that node
is infeasible.
Integer Programming 26
Branch and bound example 2
-
8/9/2019 métodes exactes
27/48
Branch and bound example 2
max3x 1 + x 2 (47)
−x 1 + x 2 ≤ 2 (48)
8x 1 + 2x 2 ≤ 19 (49)
x 1, x 2 ≥ 0 (50)x 1, x 2 ∈ N (51)
Exercise: Execute the branch and bound algorithm
Point of intersection among two lines: ax 1 + bx 2 + c = 0
rx 1 + sx 2 + t = 0
(α, β ) = ((cs - bt)/(br - as), (at - cr)/(br - as))
Integer Programming 27
Branch and bound example 2
-
8/9/2019 métodes exactes
28/48
Branch and bound example 2
Figure: B&B tree of example 2
Integer Programming 28
Branch and bound – Algorithm
-
8/9/2019 métodes exactes
29/48
Branch and bound Algorithm
The branch-and-bound algorithm keeps a list of linear programmingproblems obtained by relaxing the integrality requirements on thevariables and imposing constraints such as:
x j ≤ u j x j ≥ l j
Each such linear program corresponds to a node of thebranch-and-bound tree.
For a node N i , let z i denote the value of the corresponding linearprogram. Let L denote the list of nodes that must still be solved. Letz U denote an upper bound on the optimum value (initially, the boundz U can be derived from a heuristic solution of MILP, or it can be setto +∞).
Integer Programming 29
Branch and bound – Algorithm
-
8/9/2019 métodes exactes
30/48
Branch and bound Algorithm
0 Initialize L = MILP, z U = +∞, x ∗ = ∅.
1 Terminate? If L = ∅, the solution x ∗ is optimal.
2 Select node Choose and delete a problem N i from L.
3 Bound Solve N i . If it is infeasible, go to Step 1. Else, let x i be itssolution and z i its objective value.
4 PruneIf z i ≥ z U , go to Step 1.If x i is not feasible for MILP, go to Step 5.If x i is feasible for MILP, let z U = z i , x
∗ = x i . Delete from L allproblems with z j ≥ z U . Go to Step 1.
5 Branch From N i , construct linear programs N 1i , ..., N
k i with smaller
feasible regions whose union contains all the feasible solutions of (MILP) in N i . Add N
1i , ..., N
k i to L and go to Step 1.
Integer Programming 30
Branch-and-bound – Additional Elements
-
8/9/2019 métodes exactes
31/48
Branch and bound Additional Elements
Formulation (so that the gap z I - z LP is small)
Branching
Node selection
Heuristics (to find a good upper bound z U )
Integer Programming 31
Binary Branching (branching on a variable)
-
8/9/2019 métodes exactes
32/48
y g ( g )
Problem N i is a linear program. A way of dividing its feasible region is toimpose bounds on a variable. Let x i j be one of the fractional values for
j = 1, . . . , p , in the optimal solution x i of N i .From problem N i , we can construct two linear programs (satisfy the
requirements of Step 5):N −ij = N i with the additional bound x j ≤ x
i j
N +ij = N i with the additional bound x j ≥ x i
j
The advantage of branching on a variable is that the number of
constraints in the linear programs does not increase, since linearprogramming solvers treat bounds on variables implicitly.
Integer Programming 32
Strong Branching
-
8/9/2019 métodes exactes
33/48
g g
Compute for all the fractional variables:
D +ij = increase of the objective values from N i to N +ij
D −ij = increase of the objective values from N i to N −
ij
branch on the variable j = 1, . . . , p such that min
(D −
ij , D
+
ij ) is the largest(thus tightening the lower bound for pruning). Others have proposed tochoose j such that (D +ij + D
−
ij ) is the largest. Combining these two criteriais even better, with more weight on the first.But the computing time of doing it at each node N i , for every fractional
variable x i j , may be too high. Significantly more time should be spent onthese evaluations towards the top of the tree.
Integer Programming 33
Pseudocost Branching
-
8/9/2019 métodes exactes
34/48
g
Let f i j = x i
j − x i
j be the fractional part of x i
j , for j = 1, . . . , p . For an
index j such that f i j > 0, define:
down pseudocost P − j = D −
ij
f i j
up pseudocost P + j = D +
ij
1−f i j
It can be observed that the pseudocosts tend to remain fairly constantthroughout the branch-and-bound tree. Therefore the pseudocosts need
not be computed at each node of the tree. They are estimated instead.
Integer Programming 34
Pseudocost Branching
-
8/9/2019 métodes exactes
35/48
g
A good way of initializing the pseudocosts is through strongbranching at the root node or other nodes of the tree when newvariables become fractional for the first time
To update the pseudocost P j , we average the observations over allthe nodes of the tree where x j was branched on.
The estimated pseudocosts P − j and P + j are used to computeestimates of D −ij and D
+ij at node N i
D −ij = P −
j f i
j
D +ij = P +
j (1 − f i
j )
Among these candidates, the branching variable x j is chosen to be theone with largest min(D −ij , D
+ij ) (or other criteria such as those
mentioned earlier).
Integer Programming 35
Node selection
-
8/9/2019 métodes exactes
36/48
How does one choose among the different problems N i available in Step 2of the algorithm?
Two goals need to be considered:finding good feasible solutions (thus decreasing the upper bound z U )
proving optimality of the current best feasible solution (by increasingthe lower bound as quickly as possible)
Integer Programming 36
Node selection
-
8/9/2019 métodes exactes
37/48
Best estimate criterion
For the first goal, we estimate the value of the best feasible solutionin each node N i :
E i = z i +
p j =1
min(P − j f i
j , P +
j (1 − f i
j ))
This corresponds to rounding the noninteger solution x i to a nearbyinteger solution and using the pseudocosts to estimate thedegradation in objective value.
Depth-first search strategy
It is an effective strategy to quickly look for a feasible solution.Breadth-first search strategyIt is an effective strategy to increase the global lower bound of theproblem.
Integer Programming 37
-
8/9/2019 métodes exactes
38/48
-
8/9/2019 métodes exactes
39/48
Local Branching
-
8/9/2019 métodes exactes
40/48
This heuristic is particularly suited for MILPs that are too large to solve to
optimality, but where the linear programming relaxation can be solved inreasonable time. For simplicity, assume that all the integer variables are0,1 valued.
Let x̃ be a feasible solution of (MILP) (found by a diving heuristic, for
example).The idea is to define a neighborhood of x̃ as follows:p
j =1 |x j − x̃ j | ≤ k p j ∈I :x̃ j =0
x j +p
j ∈I :x̃ j =1(1 − x j ) ≤ k (linearised)
where k is an integer chosen by the user (for example k = 20)
Instead of getting lost in a huge enumeration tree, the search isrestricted to the neighborhood of x̃ by this constraint
Integer Programming 40
Practical considerations
-
8/9/2019 métodes exactes
41/48
The most successful node selection strategy may differ depending onthe application.
For this reason, most MILP solvers have several node selectionstrategies available as options.
The default strategy is usually a combination of the best estimatecriterion (or a variation) and depth-first search.
Integer Programming 41
Cutting planes
-
8/9/2019 métodes exactes
42/48
Cutting planes
Integer Programming 42
Gomory Cuts
-
8/9/2019 métodes exactes
43/48
Suppose we are given an instance of ILP and begin by solving theLP-relaxation, producing an optimal basic feasible solution x B associatedwith basis B .
If the solution is integer then stop.Otherwise add a cutting plane such that x B :
is not feasibleall feasible integer points remain feasible
Then, repeat above processes.
Integer Programming 43
Gomory Cuts
-
8/9/2019 métodes exactes
44/48
Consider any equation in the optimized final tableau, say the i-th equation:
x i
B +
j /∈B
y ij
x j
= y i 0
(1G )
for some i , 0 ≤ i ≤ m. Due to nonnegativity of x
j /∈B
y ij x j ≤ j /∈B
y ij x j
Therefore we have:
x i B + j /∈B
y ij x j ≤ y i 0 (2G )
Subtracting (2G) from (1G), we get the constraint: j /∈B
(y ij − y ij )x j ≥ y i 0 − y i 0
called the Gomory cut corresponding to the source or generating row i .
Integer Programming 44
Gomory Cuts – Example
-
8/9/2019 métodes exactes
45/48
max x 1 + x 2 (52)
−x 1 + x 2 ≤ 2 (53)
8x 1 + 2x 2 ≤ 19 (54)
x 1, x 2 ≥ 0 (55)
x 1, x 2 ∈ {0, 1} (56)
We first add slack variables x 3 and x 4 to turn the inequality constraintsinto equalities. The problem becomes:
max z − x 1 − x 2 = 0 (57)
−x 1 + x 2 + x 3 = 2 (58)
8x 1 + 2x 2 + x 4 = 19 (59)
x 1, x 2, x 3, x 4 ≥ 0 (60)
x 1, x
2, x
3, x
4 ∈ {0, 1} (61)
Integer Programming 45
Gomory Cuts – Example
-
8/9/2019 métodes exactes
46/48
Solving the linear programming relaxation by the simplex method, we getthe optimal tableau:
z + 0.6x 3 + 0.2x 4 = 5 (62)
x 2 + 0.8x 3 + 0.1x 4 = 3.5 (63)
x 1 − 0.2x 3 + 0.1x 4 = 1.5 (64)
x 1, x 2, x 3, x 4 ≥ 0 (65)
The corresponding basic solution is x 3 = x 4 = 0, x 1 = 1.5, x 2 = 3.5 andz = 5.
Integer Programming 46
Gomory Cuts – Example
-
8/9/2019 métodes exactes
47/48
This solution is not integer. Let us generate the Gomory mixed integer cutcorresponding to the equation:
x 2 + 0.8x 3 + 0.1x 4 = 3.5 (66)
we get the GMI cut:
8x 3 + x 4 ≥ 5. (67)
We can express the above Gomory cut in the space (x 1 , x 2 ). This yields:
x 2 ≤ 3. (68)
Integer Programming 47
-
8/9/2019 métodes exactes
48/48
Integer Programming 48