You are on page 1of 46

Integer

Programming
Chapter Topics

Integer Programming (IP) Models

Integer Programming Graphical Solution


Computer Solution of Integer
Programming Problems With Excel and
QM for Windows

0-1 Integer Programming Modeling


Examples
Integer Programming Models
Types of Models

Total Integer All decision variables required to


Model: have integer solution values.

0-1 Integer All decision variables required to


Model: have integer values of zero or
one.

Mixed Integer Some of the decision variables


Model: (but not all) required to have
integer values.
A Total Integer Model (1 of 2)

Machine shop obtaining new presses and lathes.


Marginal profitability: each press $100/day; each
lathe $150/day.
Resource constraints: $40,000 budget, 200 sq. ft.
floor space.
Machine purchase prices and space requirements:
A Total Integer Model (2 of 2)

Integer Programming Model:

Maximize Z = $100x1 + $150x2


subject to:
$8,000x1 + 4,000x2 $40,000
15x1 + 30x2 200 ft2
x1, x2 0 and integer
x1 = number of presses
x2 = number of lathes
A 0 - 1 Integer Model (1 of 2)
Recreation facilities selection to maximize daily
usage by residents.

Resource constraints: $120,000 budget; 12 acres of


land.
Selection constraint: either swimming pool or
tennis center (not both).
A 0 - 1 Integer Model (2 of 2)

Integer Programming Model:


Maximize Z = 300x1 + 90x2 + 400x3 + 150x4
subject to:
$35,000x1 + 10,000x2 + 25,000x3 + 90,000x4
$120,000
4x1 + 2x2 + 7x3 + 3x4 12 acres
x1 + x2 1 facility
x1, x2, x3, x4 = 0 or 1
x1 = construction of a swimming pool
x2 = construction of a tennis center
x3 = construction of an athletic field
A Mixed Integer Model (1 of 2)

$250,000 available for investments providing


greatest return after one year.
Data:
Condominium cost $50,000/unit; $9,000 profit if
sold after one year.
Land cost $12,000/ acre; $1,500 profit if sold
after one year.
Municipal bond cost $8,000/bond; $1,000 profit
if sold after one year.
Only 4 condominiums, 15 acres of land, and 20
municipal bonds available.
A Mixed Integer Model (2 of 2)

Integer Programming Model:


Maximize Z = $9,000x1 + 1,500x2 + 1,000x3
subject to:
50,000x1 + 12,000x2 + 8,000x3 $250,000
x1 4 condominiums
x2 15 acres
x3 20 bonds
x2 0
x1, x3 0 and integer
x1 = condominiums purchased
x2 = acres of land purchased
x3 = bonds purchased
Integer Programming Graphical
Solution

Rounding non-integer solution values up to the


nearest integer value can result in an infeasible
solution.

A feasible solution is ensured by rounding


down non-integer solution values but may result in
a less than optimal (sub-optimal) solution.
Integer Programming Example
Graphical Solution of Machine Shop
Model
Maximize Z = $100x1 +
$150x2
subject to:
8,000x1 + 4,000x2
$40,000
15x1 + 30x2 200 ft2
x1, x2 0 and integer

Optimal Solution:
Z = $1,055.56
x1 = 2.22 presses
x2 = 5.55 lathes
Feasible solution space with integer solution
points
Branch and Bound Method

Traditional approach to solving integer


programming problems.
Feasible solutions can be partitioned into
smaller subsets
Smaller subsets evaluated until best solution is
found.
Method is a tedious and complex mathematical
process.
Computer Solution of IP Problems
0 1 Model with Excel (1 of 5)

Recreational Facilities Example:

Maximize Z = 300x1 + 90x2 + 400x3 + 150x4


subject to:
$35,000x1 + 10,000x2 + 25,000x3 + 90,000x4
$120,000
4x1 + 2x2 + 7x3 + 3x4 12 acres
x1 + x2 1 facility
x1, x2, x3, x4 = 0 or 1
Computer Solution of IP Problems
0 1 Model with Excel (2 of 5)

=C7*C12+D7*
Decision
C13+E7*C14+
variables
F7*C15
C12:C15
Computer Solution of IP Problems
0 1 Model with Excel (3 of 5)

Restricts variables,
C12:C15, to integer
and 0-1 values
Computer Solution of IP Problems
0 1 Model with Excel (4 of 5)

Click on bin
for 0-1.
Computer Solution of IP Problems
0 1 Model with Excel (5 of 5)

Deactiva
te

Return to
solver
window
Computer Solution of IP Problems
0 1 Model with QM for Windows (1
of 3)
Recreational Facilities Example:
Maximize Z = 300x1 + 90x2 + 400x3 + 150x4
subject to:
$35,000x1 + 10,000x2 + 25,000x3 + 90,000x4
$120,000
4x1 + 2x2 + 7x3 + 3x4 12 acres
x1 + x2 1 facility
x1, x2, x3, x4 = 0 or 1
Computer Solution of IP Problems
0 1 Model with QM for Windows (2
of 3)
Computer Solution of IP Problems
0 1 Model with QM for Windows (3
of 3)
Click to
solve.

Variable Click on 0/1 to make


type variables 0 or 1.
Computer Solution of IP Problems
Total Integer Model with Excel (1 of
6)
Integer Programming Model of
Machine Shop:

Maximize Z = $100x1 + $150x2


subject to:
8,000x1 + 4,000x2 $40,000
15x1 + 30x2 200 ft2
x1, x2 0 and integer
Computer Solution of IP Problems
Total Integer Model with Excel (2 of
6)

Solution:
X1=1 swimming pool
X2=0 tennis center
X3=1 athletic field
X4=0 gymnasium
Z=700 people per day usage
Computer Solution of IP Problems
Total Integer Model with Excel (3 of
6)

Objective
function

Slack,
=G6-E6

Decision
variables =C6*B10+D6*
B10:B11 B11
Computer Solution of IP Problems
Total Integer Model with Excel (4 of
6)

Integer
variables
Computer Solution of IP Problems
Total Integer Model with Excel (5 of
6)

Click on
int
Computer Solution of IP Problems
Total Integer Model with Excel (6 of
6)

Integer
Solution
Computer Solution of IP Problems
Mixed Integer Model with Excel (1 of
3)
Integer Programming Model for Investments
Problem:
Maximize Z = $9,000x1 + 1,500x2 + 1,000x3
subject to:
50,000x1 + 12,000x2 + 8,000x3 $250,000
x1 4 condominiums
x2 15 acres
x3 20 bonds
x2 0
x1, x3 0 and integer
Computer Solution of IP Problems
Total Integer Model with Excel (2 of
3)

Available to
invest

=C4*B8+D4*B9+E4
*B10
Computer Solution of IP Problems
Solution of Total Integer Model with
Excel (3 of 3)

Integer requirement Constraints for


for condos (x1) and acres, condos,
bonds (x3) and bonds
Computer Solution of IP Problems
Mixed Integer Model with QM for
Windows (1 of 2)

Click on
Real
Computer Solution of IP Problems
Mixed Integer Model with QM for
Windows (2 of 2)
0 1 Integer Programming Modeling
Examples
Capital Budgeting Example (1 of 4)
University bookstore expansion project.
Not enough space available for both a computer
department and a clothing department.
0 1 Integer Programming Modeling
Examples
Capital Budgeting Example (2 of 4)
x1 = selection of web site project
x2 = selection of warehouse project
x3 = selection clothing department project
x4 = selection of computer department project
x5 = selection of ATM project
xi = 1 if project i is selected, 0 if project i is not
selected

Maximize Z = $120x1 + $85x2 + $105x3 + $140x4 +


$70x5
subject to:
55x1 + 45x2 + 60x3 + 50x4 + 30x5 150
40x1 + 35x2 + 25x3 + 35x4 + 30x5 110
0 1 Integer Programming Modeling
Examples
Capital Budgeting Example (3 of 4)

=SUMPRODUCT(C7:C11,E
=C9+C 7:E11)
10
0 1 Integer Programming Modeling
Examples
Capital Budgeting Example (4 of 4)
0-1
integer
restricti
on

Mutually
exclusive
constraint
0 1 Integer Programming Modeling
Examples
Fixed
WhichCharge and
of six farms Facility
should Example
be purchased that will(1
of meet
4) current production capacity at minimum total
cost, including annual fixed costs and shipping
costs?
0 1 Integer Programming Modeling
Examples
Fixed
yi Charge
= 0 if farm andand
i is not selected, Facility
1 if farm i isExample
selected;i = (2
1,2,3,4,5,6
of 4)
xij = potatoes (1000 tons) shipped from farm I to plant j; j = A,B,C.
Minimize Z = 18x1A+ 15x1B+ 12x1C+ 13x2A+ 10x2B+ 17x2C+ 16x3+
14x3B
+18x3C+ 19x4A+ 15x4b+ 16x4C+ 17x5A+ 19x5B+12x5C+
14x6A
+ 16x6B+ 12x6C+ 405y1+ 390y2+ 450y3+ 368y4+
520y5+ 465y6
subject to:
x1A + x1B + x1B - 11.2y1 0 x2A + x2B + x2C -10.5y2
0
x3A + x3A + x3C - 12.8y3 0 x4A + x4b + x4C - 9.3y4 0
x5A + x5B + x5B - 10.8y5 0 x6A + x6B + X6C - 9.6y6 0
0 1 Integer Programming Modeling
Examples
Fixed Charge and Facility Example (3
Objective
function
of 4)

=G10-
C22*F10
=SUM(C5:C =C10+D10+
10) E10
0 1 Integer Programming Modeling
Examples
Fixed Charge and Facility Example (4
of 4) 0-1
integer
restricti
on
Plant
capacity
constraint
s
Harvest
constraints
0 1 Integer Programming Modeling
Examples
Set
APSCovering Example
wants to construct (1 ofset
the minimum 4)of new hubs
in these twelve cities such that there is a hub within
300 miles of every city:
Cities Cities within 300 miles
1. Atlanta Atlanta, Charlotte, Nashville
2. Boston Boston, New York
3. Charlotte Atlanta, Charlotte, Richmond
4. Cincinnati Cincinnati, Detroit, Indianapolis, Nashville,
Pittsburgh
5. Detroit Cincinnati, Detroit, Indianapolis, Milwaukee,
Pittsburgh
6. Indianapolis Cincinnati, Detroit, Indianapolis, Milwaukee,
Nashville, St. Louis
7. Milwaukee Detroit, Indianapolis, Milwaukee
8. Nashville Atlanta, Cincinnati, Indianapolis, Nashville, St.
Louis
9. New York Boston, New York, Richmond
10. Pittsburgh Cincinnati, Detroit, Pittsburgh, Richmond
11. Richmond Charlotte, New York, Pittsburgh, Richmond
0 1 Integer Programming Modeling
Examples
Set
xi Covering
= city i, i = 1 to 12;Example
x = 0 if city is(2
i not of 4) as a hub and
selected
xi = 1 if it is.
Minimize Z = x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11
+ x12
subject to: Atlanta: x1 + x3 + x8 1
Boston: x2 + x10 1
Charlotte: x1 + x3 + x11 1
Cincinnati: x4 + x5 + x6 + x8 + x10 1
Detroit: x4 + x5 + x6 + x7 + x10 1
Indianapolis: x4 + x5 + x6 + x7 + x8 + x12 1
Milwaukee: x5 + x6 + x7 1
Nashville: x1 + x4 + x6+ x8 + x12 1
New York: x2 + x9+ x11 1
Pittsburgh: x4 + x5 + x10 + x11 1
0 1 Integer Programming Modeling
Examples
Set Covering Example
Objective
function
in Excel (3 of
4)

Decision =SUMPRODUCT(B18:M18,B
variables in 20:M20)
row 20
0 1 Integer Programming Modeling
Examples
Set Covering Example (4 of 4)

City
constraints
set > 1
Total Integer Programming
Modeling Example
Problem Statement (1 of 3)
Textbook company developing two new regions.
Planning to transfer some of its 10 salespeople into new
regions.
Average annual expenses for sales person:
Region 1 - $10,000/salesperson
Region 2 - $7,500/salesperson
Total annual expense budget is $72,000.
Sales generated each year:
Region 1 - $85,000/salesperson
Region 2 - $60,000/salesperson
How many salespeople should be transferred into each
region in order to maximize increased sales?
Total Integer Programming
Modeling Example
Model Formulation (2 of 3)
Step 1:
Formulate the Integer Programming Model
Maximize Z = $85,000x1 + 60,000x2
subject to:
x1 + x2 10 salespeople
$10,000x1 + 7,000x2 $72,000 expense
budget
x1, x2 0 or integer
Step 2:
Solve the Model using QM for Windows
Total Integer Programming
Modeling Example
Solution with QM for Windows (3 of
3)

You might also like