You are on page 1of 50

Introduction to Systems and

Decision Support

Chapter 5
Integer Programming

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-1


Chapter Topics

 Integer Programming (IP) Models

 Integer Programming Graphical Solution


 Computer Solution of Integer Programming Problems
With Excel

 0-1 Integer Programming Modeling Examples

 Integer Programming Using Branch and Bound

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-2


Integer Programming Models
Types of Models

Total Integer Model: All decision variables required to have


integer solution values.

0-1 Integer Model: All decision variables required to have


integer values of zero or one.

Mixed Integer Model: Some of the decision variables (but not all)
required to have integer values.

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-3


A Total Integer Model Example
■ The owner of a machine shop is planning to expand by
purchasing some new machines—presses and lathes. The
owner has estimated that each press purchased will
increase profit by $100 per day and each lathe will increase
profit by $150 daily. The number of machines the owner
can purchase is limited by the cost of the machines and
the available floor space in the shop. The machine
purchase prices and space requirements are as follows:

Required
Machine Floor Space (ft.2) Purchase Price

Press 15 $8,000

Lathe 30 4,000

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-4


A Total Integer Model Example
■ The owner has a budget of $40,000 for purchasing
machines and 200 square feet of available floor space. The
owner wants to know how many of each type of machine
to purchase to maximize the daily increase in profit.

?
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-5
A Total Integer Model Example
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

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-6


A 0 - 1 Integer Model Example
■ A community council must decide which recreation facilities to construct in its
community. Four new recreation facilities have been proposed—a swimming
pool, a tennis center, an athletic field, and a gymnasium. The council wants to
construct facilities that will maximize the expected daily usage by the residents of
the community, subject to land and cost limitations. The expected daily usage and
cost and land requirements for each facility follow:

Expected Usage Land Requirement


Recreation
(people/day) Cost ($) (acres)
Facility
Swimming pool 300 35,000 4
Tennis Center 90 10,000 2
Athletic field 400 25,000 7
Gymnasium 150 90,000 3
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-7
A 0 - 1 Integer Model Example
■ The community has a $120,000 construction budget and 12 acres of
land. Because the swimming pool and tennis center must be built on
the same part of the land parcel, however, only one of these two
facilities can be constructed. The council wants to know which of
the recreation facilities to construct to maximize the expected daily
usage.

?
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-8
A 0 - 1 Integer Model Example
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 + x 2  1 (Mutually exclusive constraint ) 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
x4 = construction of a gymnasium

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-9


A 0 - 1 Integer Model Example

 If the community had specified that either the swimming


pool or the tennis center must be built, but not both,
then this constraint would become ?

 If the community council had specified that exactly two


of the four facilities must be built, this constraint would
be formulated as ?

 If, the council had specified that no more than two


facilities must be constructed, the constraint would be ?

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-10


A 0 - 1 Integer Model Example

 If the community had specified that either the swimming


pool or the tennis center must be built, but not both,
then this constraint would become ?
x1 + x 2 = 1 (multiple choose constraint)

 If the community council had specified that exactly two


of the four facilities must be built, this constraint would
be formulated as ?

x1 + x2 + x3 + x4 =2

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-11


A 0 - 1 Integer Model Example

 If, the council had specified that no more than two


facilities must be constructed, the constraint would be ?

x1 + x2 + x3 + x4  2

 Suppose, for example, that the Important project of the


head of the community council is the swimming pool,
and she also believes the tennis center is frivolous. The
council head is very influential, so the rest of the council
knows that the tennis center has no chance of being
selected if the pool is not selected first.

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-12


A 0 - 1 Integer Model Example

 However, even if the pool is selected, there is no


guarantee that the tennis center will also be selected.
Thus, the tennis center is conditional upon construction
of the swimming pool This condition is formulated as

x2  x1 (Conditional Constraint)

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-13


A Mixed Integer Model Example

Nancy Smith has $250,000 to invest in three alternative


investments—condominiums, land, and municipal bonds.
She wants to invest in the alternatives that will result in the
greatest return on investment after 1 year. Each
condominium costs $50,000 and will return a profit of
$9,000 if sold at the end of 1 year; each acre of land costs
$12,000 and will return a profit of $1,500 at the end of 1
year; and each municipal bond costs $8,000 and will result in
a return of $1,000 if sold at the end of 1 year. In addition,
there are only 4 condominiums, 15 acres of land, and 20
municipal bonds available for purchase

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-14


A Mixed Integer Model Example
■ $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.

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-15


A Mixed Integer Model Example

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

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-16


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.

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-17


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

Figure 5.1 Feasible solution space with integer solution points


Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-18
Branch and Bound Method

■ It is not a solution technique limited to solve integer programming


problems
■ It can be applied to different types of the problems.
■ It is based on the principle that the total set of feasible solution can
be partitioned into smaller subsets
■ Smaller subsets evaluated until best solution is found.
■ See book’s web site Module C – “Integer Programming: the
Branch and Bound Method” for detailed description of this
method.

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-19


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

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-20


Computer Solution of IP Problems
0 – 1 Model with Excel (2 of 5)

Objective function

=C7*C12+D7*C13
Decision variables—
+E7*C14+F7*C15
C12:C15

Exhibit 5.2
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-21
Computer Solution of IP Problems
0 – 1 Model with Excel (3 of 5)

Restricts variables, C12:C15,


to integer and 0-1 values

Exhibit 5.3
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-22
Computer Solution of IP Problems
0 – 1 Model with Excel (4 of 5)

Click on ―bin‖ for 0-1.

Exhibit 5.4
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-23
Computer Solution of IP Problems
0 – 1 Model with Excel (5 of 5)

Deactivate
Solution:
X1=1 swimming pool
X2=0 tennis center
X3=1 athletic field
X4=0 gymnasium
Z=700 people per
day usage
Return to solver
window
Exhibit 5.5
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-24
Computer Solution of IP Problems
Total Integer Model with Excel (1 of 5)

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

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-25


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

Objective function

Slack, =G6-E6

Decision variables—
B10:B11 =C6*B10+D6*B11

Exhibit 5.9
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-26
Computer Solution of IP Problems
Total Integer Model with Excel (3 of 5)

Integer variables

Exhibit 5.10
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-27
Computer Solution of IP Problems
Total Integer Model with Excel (4 of 5)

Click on ―int‖

Exhibit 5.11
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-28
Computer Solution of IP Problems
Total Integer Model with Excel (5 of 5)

Integer Solution

Exhibit 5.12
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-29
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

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-30


Computer Solution of IP Problems
Total Integer Model with Excel (2 of 3)

Available to invest

=C4*B8+D4*B9+E4*B10

Exhibit 5.13
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-31
Computer Solution of IP Problems
Solution of Total Integer Model with Excel (3 of 3)

Exhibit 5.14

Integer requirement for Constraints for acres,


condos (x1) and bonds (x3) condos, and bonds

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-32


0 – 1 Integer Programming Modeling Examples
Capital Budgeting Example (1 of 6)
The University Bookstore at Tech is considering several expansion projects,
including developing a store Web site for online retail and catalog
purchases, buying an off-campus warehouse and its subsequent expansion,
developing a clothing and gift department specializing in university logo
apparel, opening a computer department carrying both hardware and
software products, and creating a banking pavilion of three automated teller
machines outside the store. Some of the projects will be developed over a
2-year period and some over a 3-year period, as funds permit. The net
present value costs per year and the projected net present value of returns
for a 5-year period for each of the projects are shown in the following
table:

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-33


0 – 1 Integer Programming Modeling Examples
Capital Budgeting Example (2 of 6)

NPV Return Project Costs per Year ($1000)


Project
($1,000s) 1 2 3

1. Web site $120 $55 $40 $25


2. Warehouse 85 45 35 20
3. Clothing department 105 60 25 --
4. Computer department 140 50 35 30
5. ATMs 75 30 30 --

Available funds per year 150 110 60

■ In addition, the store does not have enough space


available to create both a computer department and a
clothing department. The bookstore director wants to
know which projects to select to maximize returns.
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-34
0 – 1 Integer Programming Modeling Examples
Capital Budgeting Example (3 of 6)
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
25x1 + 20x2 + 30x4  60
x3 + x4  1
xi = 0 or 1
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-35
0 – 1 Integer Programming Modeling Examples
Capital Budgeting Example (4 of 6)

=SUMPRODUCT(C7:C11,E7:E11)
=C9+C10
Exhibit 5.17
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-36
0 – 1 Integer Programming Modeling Examples
Capital Budgeting Example (5 of 6)
Exhibit 5.18

0-1 integer
restriction

Mutually exclusive
constraint

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-37


0 – 1 Integer Programming Modeling Examples
Capital Budgeting Example (6 of 6)

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-38


0 – 1 Integer Programming Modeling Examples
Fixed Charge and Facility Example (1 of 7)
Frijo-Lane Food Products own farms in the Southwest and Midwest,
where it grows and harvests potatoes. It then ships these potatoes to
three processing plants in Atlanta, Baton Rouge, and Chicago, where
different varieties of potato products, including chips, are produced.
Recently, the company has experienced a growth in its product
demand, so it wants to buy one or more new farms to produce more
potato products. The company is considering six new farms with the
following annual fixed costs and projected harvest:
Farms Annual Fixed Projected Annual
Costs Harvest (tons, 1000s)
($1000)
1 405 11.2
2 390 10.5
3 450 12.8
4 368 9.3
5 520 10.8
6 465 9.6
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-39
0 – 1 Integer Programming Modeling Examples
Fixed Charge and Facility Example (2 of 7)
The company currently has the following additional available
production capacity (tons) at its three plants, which it wants to utilize:

The shipping costs ($) per ton from the farms being considered for
purchase to the plants are as follows:

Plant ($/ton shipped)


Farm A B C
Available
Plant Capacity
1 18 15 12 (tons,1000s)
2 13 10 17 A 12
3 16 14 18 B 10
4 19 15 16 C 14

5 17 19 12
6 14 16 12
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-40
0 – 1 Integer Programming Modeling Examples
Fixed Charge and Facility Example (3 of 7)

Which of six farms should be purchased that will


meet current production capacity at minimum total
cost, including annual fixed costs and shipping costs?

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-41


0 – 1 Integer Programming Modeling Examples
Fixed Charge and Facility Example (4 of 7)
yi = 0 if farm i is not selected, and 1 if farm i is selected; i = 1,2,3,4,5,6
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

x1A + x2A + x3A + x4A + x5A + x6A = 12


x1B + x2B + x3B + x4B + x5B + x6B = 10
x1C + x2C + x3C + x4C + x5C + x6C = 14

xij ≥ 0 yi = 0 or 1

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-42


0 – 1 Integer Programming Modeling Examples
Fixed Charge and Facility Example (5 of 7)
Objective function

=G10-C22*F10

=SUM(C5:C10) =C10+D10+E10

Exhibit 5.19
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-43
0 – 1 Integer Programming Modeling Examples
Fixed Charge and Facility Example (6 of 7)

Exhibit 5.20
0-1 integer
restriction

Plant capacity
constraints

Harvest constraints

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-44


0 – 1 Integer Programming Modeling Examples
Fixed Charge and Facility Example (7 of 7)

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-45


0 – 1 Integer Programming Modeling Examples
Set Covering Example (1 of 4)
APS wants to construct the minimum set 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
12. St. Louis Indianapolis, Nashville, St. Louis

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-46


0 – 1 Integer Programming Modeling Examples
Set Covering Example (2 of 4)
xi = city i, i = 1 to 12; xi = 0 if city is not selected as a hub and xi = 1 if it is.
Minimize Z = x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11 + x12
subject to: Atlanta: x1 + x 3 + x 8  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 + x 6 + x 7  1
Nashville: x1 + x4 + x6+ x8 + x12  1
New York: x2 + x9+ x11  1
Pittsburgh: x4 + x5 + x10 + x11  1
Richmond: x3 + x9 + x10 + x11  1
St Louis: x6 + x8 + x12  1 xij = 0 or 1

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-47


0 – 1 Integer Programming Modeling Examples
Set Covering Example in Excel (3 of 4)
Objective function

Decision variables =SUMPRODUCT(B18:M18,B20:M20)


in row 20

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall Exhibit 5.21 5-48
0 – 1 Integer Programming Modeling Examples
Set Covering Example (4 of 4)

Exhibit 5.22

City constraints
set > 1

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-49


?

Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 5-50

You might also like