Sie sind auf Seite 1von 32

Integer Programming

 Types of Integer Programs


 Counterintuitive Solutions
 Formulation of BILPs
 Solution using Excel
Types of Integer Programming
Problems
 An LP in which all the variables are restricted to be
integers is called an all-integer linear program (ILP)
 The LP that results from dropping the integer
requirements is called the LP Relaxation of the ILP
 If only a subset of the variables are restricted to be
integers, the problem is called a mixed-integer linear
program (MILP)
 Binary variables are variables whose values are
restricted to be 0 or 1. If all variables are restricted to
be 0 or 1, the problem is called a 0-1 or binary integer
linear program (BILP)
Counterintuitive Solutions
 Consider the following all-integer linear
program:
Max z = 3x1 + 2x2

s.t. 3x1 + x2 < 9


x1 + 3x2 < 7
-x1 + x2 < 1

x1, x2 > 0 and integer


Counterintuitive Solutions

 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:

x1 = 2.5, x2 = 1.5, z = 10.5


Counterintuitive Solutions
LP Relaxation
x2
5 -x1 + x2 < 1

4 3x1 + x2 < 9
Max 3x1 + 2x2
3

2 LP Optimal (2.5, 1.5)


x1 + 3x2 < 7
1

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 z = 100x1 + 400x2


s.t.
2x1 + 4x2 < 7
5x1 + 3x2 < 15
x1, x2 ≥ 0 and integer
Excel Formulation and Solution of
ILPs – Problem 1
Excel Formulation and Solution of
ILPs – Problem 1
Excel Formulation and Solution of
ILPs – Problem 1
Formulation of BILPs
 Capital Budgeting Problem
 Set Covering Problem
 Fixed Charge Problem
 Minimum Lot-size Problem
 Either-or Constraints
 Etc. Etc.
2. Capital Budgeting (without 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
2. Capital Budgeting (without 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

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

 The Washington State Legislature is trying to decide


on locations at which to base search-and-rescue teams
 Would like to have as few teams as possible, still
providing the desired level of service to each of the 37
counties
 The covering problem starts by defining nodes
(counties) and the conditions of coverage to each node
(county) and minimizes the number (or cost) of
providing coverage to each node (county)
 Associated with each node i is a subset of the potential
facility sites j that can serve or cover the node (county)
3. Locating Search & Rescue Teams
3. Locating Search & Rescue Teams
 Since response time is critical, the legislature would like
every county to either have a team located in that
county or in an adjacent county
 This may be specified in terms of binary coefficients aij
which take a value 1 if a team at facility j can cover
node i; 0 otherwise – i.e.
1, if potential facility site j can cover node i
a ij  
0, if not
 Decision variables xj are defined as

1, if potential facility site j is chosen


xj  
 0, if not
3. Locating Search & Rescue Teams

 The set covering problem can then be


formulated as follows:

s.t.
3. Locating Search & Rescue Teams
(Excel Solution)
3. Locating Search & Rescue Teams
(Excel Solution)
3. Locating Search & Rescue Teams
(Excel Solution)

Das könnte Ihnen auch gefallen