9 Integer Programming
9 Integer Programming
LP Relaxation
Solving the problem as a linear program
ignoring the integer constraints, the optimal
solution to the linear program gives fractional
values for both x1 and x2. From the graph on
the next slide, we see that the optimal
solution to the linear program is:
4 3x1 + x2 < 9
Max 3x1 + 2x2
3
x1
1 2 3 4 5 6 7
Counterintuitive Solutions
Rounded
LP Up Solution:
Relaxation x1=3, x2=2
x2
5 -x1 + x2 < 1
4 3x1 + x2 < 9
Max 3x1 + 2x2
3
ILP Infeasible (3, 2)
2 LP Optimal (2.5, 1.5)
x1 + 3x2 < 7
1
x1
1 2 3 4 5 6 7
Counterintuitive Solutions
Rounded
LP Down
Relaxation Solution: x1=2, x2=1
x2
5 -x1 + x2 < 1
4 3x1 + x2 < 9
Max 3x1 + 2x2
3
ILP Not Optimal (2, 1)
2 LP Optimal (2.5, 1.5)
x1 + 3x2 < 7
1
x1
1 2 3 4 5 6 7
Counterintuitive Solutions
Rounded
LP Off
Relaxation Solution: x1=3, x2=1
x2
5 -x1 + x2 < 1
4 3x1 + x2 < 9
Max 3x1 + 2x2
3
ILP Infeasible (3, 1)
2 LP Optimal (2.5, 1.5)
x1 + 3x2 < 7
1
x1
1 2 3 4 5 6 7
Counterintuitive Solutions
Another
LP Rounded
Relaxation Off Solution: x1=2, x2=2
x2
5 -x1 + x2 < 1
4 3x1 + x2 < 9
Max 3x1 + 2x2
3
ILP Infeasible (2, 2)
2 LP Optimal (2.5, 1.5)
x1 + 3x2 < 7
1
x1
1 2 3 4 5 6 7
Counterintuitive Solutions
Optimal Solution: x1=3,
ILPRelaxation
LP x2=0
x2
5 -x1 + x2 < 1
4 3x1 + x2 < 9
Max 3x1 + 2x2
3
ILP Optimal (3, 0)
2 LP Optimal (2.5, 1.5)
x1 + 3x2 < 7
1
x1
1 2 3 4 5 6 7
Formulation of ILPs – Problem 1
An exporter of ready-made garments makes two types of
shirts: Office and Party. He makes a profit contribution of
Rs 100 per Office shirt and of Rs 400 per Party shirt. He
has two tailors: Jiten and Kalyan at his disposal to stitch
these shirts. Tailors Jiten and Kalyan can devote at the
most 7 hours and 15 hours per day, respectively. An
Office shirt requires 2 hours of Tailor Jiten’s and 5 hours
of Tailor Kalyan’s time while a Party shirt needs 4 hours
and 3 hours from the respective tailors. How many shirts
of each type should be stitched per day to maximize the
daily profit of the exporter?
Formulation of ILPs – Problem 1
Max 10x1+12x2+11x3+15x4+24x5+17x6+16x7+18x8
s.t. x1+3x2+ 3x4+3x 5+7x6+2x7+5x8 < 20
2x1+2x2+2x3+2x4+2x5+3x6+3x7+4x8 < 20
2x1+3x2+4x3+2x4+3x5+3x6+6x7+2x8 < 20
2x1+ x2+ 5x4+4x5+2x6+ x7+2x8 < 20
x1, x2 , x3 , x4 , x5 , x6 , x7 , x8 {0,1}
2. Capital Budgeting (without Contingency
Constraints) (Excel Solution)
2. Capital Budgeting (with Contingency Constraints)
Cash Outflow Required ($ m) Cash
Project Proposal Available
1 2 3 4 5 6 7 8 ($ m)
Year 1 1 3 0 3 3 7 2 5 20
Year 2 2 2 2 2 2 3 3 4 20
Year 3 2 3 4 2 3 3 6 2 20
Year 4 2 1 0 5 4 2 1 2 20
NPV ($m) 10 12 11 15 24 17 16 18
Contingency constraints: (a) at least one of project 1, 2, or
3 must be done, (b) project 6 and 7 cannot both be done,
and (c) project 5 can only be done if project 6 is done
2. Capital Budgeting (with Contingency Constraints)
Max 10x1+12x2+11x3+15x4+24x5+17x6+16x7+18x8
s.t. x1+3x2+ 3x4+3x 5+7x6+2x7+5x8 < 20
2x1+2x2+2x3+2x4+2x5+3x6+3x7+4x8 < 20
2x1+3x2+4x3+2x4+3x5+3x6+6x7+2x8 < 20
2x1+ x2+ 5x4+4x5+2x6+ x7+2x8 < 20
at leastx1one
+ xof2 +project
x3 1, 2, or 3 must be done> 1
project 6 and 7 cannot both be done x6+ x7 <1
project 5 can only be done xif5 –project
x6 6 is done< 0
x1, x2 , x3 , x4 , x5 , x6 , x7 , x8 {0,1}
2. Capital Budgeting (with Contingency Constraints)
(Excel Solution)
2. Capital Budgeting (if unspent money is available
next year)
Max 10x1+12x2+11x3+15x4+24x5+17x6+16x7+18x8
s.t. x1+3x2+ 3x4+ 3x5+ 7x6+ 2x7+ 5x8+ u1 = 20
2x1+2x2+2x3+ 2x4+ 2x5+ 3x6+ 3x7+ 4x8 + u2 – u1= 20
2x1+3x2+4x3+ 2x4+ 3x5+ 3x6+ 6x7+ 2x8 +u3 – u2 = 20
2x1+ x2+ 5x4+ 4x5+ 2x6+ x7+ 2x8 +u4 – u3 = 20
x1 + x2 + x3 ≥1
x6+ x7 ≤1
x5 – x6 ≤0
u1, u2 , u3 , u4 ≥ 0
x1, x2 , x3 , x4 , x5 , x6 , x7 , x8 {0,1}
2. Capital Budgeting (if unspent money is available
next year) (Excel Solution)
Set Covering Problem
s.t.
3. Locating Search & Rescue Teams
(Excel Solution)
3. Locating Search & Rescue Teams
(Excel Solution)
3. Locating Search & Rescue Teams
(Excel Solution)