Chapter 2 Solving Integer Programming
Chapter 2 Solving Integer Programming
3 X1 + X2 £ 9
X1 + 3 X2 £ 7
- X1 + X2 £ 1
X1, X2 integers
Exemple 1 - continued
A naive approach for
solving an IP: First solve
B (1)
A
(2)
round off each variable
that required to be an
O D
integer.
largest z-value.
• The feasible region for this problem is the
B (1)
S={(0,0),(1,0),(2,0),(3,0),(0,1),(1,1),(2,1)}
(3) C
z = 9. O D
The Branch-and-Bound method
ü Most IPs are solved by using the technique of branch-and-bound.
ü If all the decision variables assume integer values in the optimal solution to
the LP relaxation, then the optimal solution to the LP relaxation will be the
optimal solution to the IP.
The Branch-and-Bound method - continued
ü We call the LP relaxation subproblem 1.
This implies that the optimal z-value for the IP cannot exceed 10.5. Thus,
the optimal z-value for the LP relaxation is an upper bound for the IP.
The Branch-and-Bound method - continued
ü To find out more about the location of the IP’s optimal solution, the feasible
ü Note that every point in the feasible region for the IP must have either X1£2
or X1³3.
The Branch-and-Bound method - continued
ü Then, we ‘branch’ on the variable X1 and create the following two
additional subproblems.
LP2 = LP1 + X1 £ 2
LP3 = LP1 + X1 ³ 3 LP1
X1 = 2,5 X2 = 1,5
ü We say that subproblem 2 and 3 Z = 10,5
were created by branching on X1. X1 £ 2 X1 ³ 3
LP2 LP3
The Branch-and-Bound method - continued
ü The feasible regions for subproblem 2 and subproblem 3 have no points in
common.
ü We choose any subproblem
that has not yet been solved
as an LP. We arbitrarily choose
B (1)
E
to solve subproblem 2. (3)
C
(2)
ü We get the optimal solution A
to subproblem 2 (point E) O F D
X1= 2, X2= 5/3 and Z = 28/3.
The Branch-and-Bound method - continued
ü Since the optimal solution to subproblem 2 did not yield an all-integer
X2 £ 1 X2 ³ 2
LP4 LP5
The Branch-and-Bound method - continued
ü LIFO (last-in-first-out) rule: we choose to solve the most recently created
subproblem.
ü The LIFO rule implies that
subproblems 4 or 5 should be
solved next. B (1)
E
(3)
ü The optimal solution to C
(2)
subproblem 4 is point G: A G
X1 = 2, X2 = 1 and Z = 8. O F D
The Branch-and-Bound method - continued
ü Since both X1 and X2 assume integer values, this solution is also feasible
LP1
for the original IP and is a candidate X1 = 2.5 X2 = 1.5
Z = 10.5
solution. Also, Z=8 constitutes a X1 £ 2 X1 ³ 3
LP2
lower bound for the optimal X1 = 2, X2 = 5/3 LP3
Z = 28/3
value of the objective X2 £ 1 X2 ³ 2
X
LP4
function. X1 = 2, X2 = 1 LP5
Z=8
The Branch-and-Bound method - continued
ü It would be useless to continue the branching from any subproblem having
(2)
subproblem 5 is point B: A G
X1 = 1, X2 = 3 and Z = 7. O F D
The Branch-and-Bound method - continued
ü The solution of LP5 is an integer solution but it cannot be retained as a
LP1
candidate solution because X1 = 2,5 X2 = 1,5
Z = 10,5
the lower bound 8 is not respected . X1 £ 2 X1 ³ 3
LP2 LP3
X1 = 2, X2 = 5/3
Z = 28/3
X2 £ 1 X2 ³ 2
LP4 LP5
X X1 = 2, X2 = 1 X1 = 1, X2 = 2 X
Z=8 Z=7<8
The Branch-and-Bound method - continued
ü The optimal solution to subproblem 3 is LP1
X1 = 2,5 X2 = 1,5
point D: X1=3, X2=0 and Z=9. Z = 10,5
updated to 9.
LP4 LP5
X X1 = 2, X2 = 1 X1 = 1, X2 = 2
ü Since all subproblems Z=8 Z=7<8 X
have been solved the last candidate solution constitute the IP optimal solution.
The Branch-and-Bound method - continued
ü It is unnecessary to branch on a subproblem in the following three
situations :
• The optimal z-value for the subproblem does not exceed (in a max
problem) the current LB
The Branch-and-Bound method - continued
ü To solve a mixed IP by branch-and-bound, we branch only on variables that
are required to be integers.
ü Lingo
ü Gams
ü Gurobi