19
1 Chapter 5 Integer Programming 2 Chapter Topics Integer Programming (IP) Models Integer Programming Graphical Solution Computer Solution of Integer Programming Problems With Excel

Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

Embed Size (px)

Citation preview

Page 1: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

1

Chapter 5Integer Programming

2

Chapter Topics

Integer Programming (IP) Models

Integer Programming Graphical Solution

Computer Solution of Integer Programming Problems With Excel

Page 2: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

2

3

Integer Programming ModelsTypes 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.

4

Machine

Required Floor Space (sq. ft.)

Purchase Price

Press Lathe

15

30

$8,000

4,000

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, 200 sq. ft. floor space.Machine purchase prices and space requirements:

Page 3: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

3

5

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 integerx1 = number of pressesx2 = number of lathes

6

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).Data:

Recreation Facility

Expected Usage (people/day) Cost ($)

Land Requirement

(acres)

Swimming pool Tennis Center Athletic field Gymnasium

300 90

400 150

35,000 10,000 25,000 90,000

4 2 7 3

A 0 - 1 Integer Model (1 of 2)

Page 4: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

4

7

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 acresx1 + x2 ≤ 1 facilityx1, x2, x3, x4 = 0 or 1x1 = construction of a swimming poolx2 = construction of a tennis centerx3 = construction of an athletic fieldx4 = construction of a gymnasium

A 0 - 1 Integer Model (2 of 2)

8

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.

Page 5: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

5

9

Integer Programming Model:Maximize Z = $9,000x1 + 1,500x2 + 1,000x3

subject to:50,000x1 + 12,000x2 + 8,000x3 ≤ $250,000

x1 ≤ 4 condominiumsx2 ≤ 15 acresx3 ≤ 20 bonds x2 ≥ 0x1, x3 ≥ 0 and integerx1 = condominiums purchasedx2 = acres of land purchasedx3 = bonds purchased

A Mixed Integer Model (2 of 2)

10

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 Graphical Solution

Page 6: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

6

11

Integer Programming ExampleGraphical Solution of Maximization Model

Maximize Z = $100x1 + $150x2subject to:

8,000x1 + 4,000x2 ≤ $40,000 15x1 + 30x2 ≤ 200 ft2

x1, x2 ≥ 0 and integer

Optimal Solution:Z = $1,055.56x1 = 2.22 pressesx2 = 5.55 lathes

Figure 5.1 Feasible Solution Space with Integer Solution Points

12

Branch and Bound Method

Traditional approach to solving integer programming problems.Based on principle that total set of feasible solutions can be partitioned into smaller subsets of solutions.Smaller subsets evaluated until best solution is found.Method is a tedious and complex mathematical process.Excel used in this book.

Page 7: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

7

13

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 acresx1 + x2 ≤ 1 facilityx1, x2, x3, x4 = 0 or 1

Computer Solution of IP Problems0 – 1 Model with Excel (1 of 5)

14Exhibit 5.2

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

Page 8: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

8

15Exhibit 5.3

Computer Solution of IP Problems0 – 1 Model with Excel (3 of 5)

16

Exhibit 5.4

Computer Solution of IP Problems0 – 1 Model with Excel (4 of 5)

Page 9: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

9

17Exhibit 5.5

Computer Solution of IP Problems0 – 1 Model with Excel (5 of 5)

18

Computer Solution of IP ProblemsTotal Integer Model with Excel (1 of 5)

Integer Programming Model:

Maximize Z = $100x1 + $150x2

subject to:8,000x1 + 4,000x2 ≤ $40,000

15x1 + 30x2 ≤ 200 ft2

x1, x2 ≥ 0 and integer

Page 10: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

10

19Exhibit 5.8

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

20

Exhibit 5.10

Computer Solution of IP ProblemsTotal Integer Model with Excel (3 of 5)

Page 11: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

11

21

Exhibit 5.9

Computer Solution of IP ProblemsTotal Integer Model with Excel (4 of 5)

22Exhibit 5.11

Computer Solution of IP ProblemsTotal Integer Model with Excel (5 of 5)

Page 12: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

12

23

Integer Programming Model:Maximize Z = $9,000x1 + 1,500x2 + 1,000x3

subject to:50,000x1 + 12,000x2 + 8,000x3 ≤ $250,000

x1 ≤ 4 condominiumsx2 ≤ 15 acresx3 ≤ 20 bonds x2 ≥ 0x1, x3 ≥ 0 and integer

Computer Solution of IP ProblemsMixed Integer Model with Excel (1 of 3)

24Exhibit 5.12

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

Page 13: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

13

25

Exhibit 5.13

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

26

University bookstore expansion project.Not enough space available for both a computer department and a clothing department.Data:

Project NPV Return ($1000)

Project Costs per Year ($1000) 1 2 3

1. Website 2. Warehouse 3. Clothing department 4. Computer department 5. ATMs Available funds per year

120 85 105 140 75

55 45 60 50 30

150

40 35 25 35 30

110

25 20 -- 30 --

60

0 – 1 Integer Programming Modeling ExamplesCapital Budgeting Example (1 of 4)

Page 14: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

14

27

x1 = selection of web site projectx2 = selection of warehouse projectx3 = selection clothing department projectx4 = selection of computer department projectx5 = selection of ATM projectxi = 1 if project “i” is selected, 0 if project “i” is not selected

Maximize Z = $120x1 + $85x2 + $105x3 + $140x4 + $70x5subject to:

55x1 + 45x2 + 60x3 + 50x4 + 30x5 ≤ 15040x1 + 35x2 + 25x3 + 35x4 + 30x5 ≤ 11025x1 + 20x2 + 30x4 ≤ 60

x3 + x4 ≤ 1xi = 0 or 1

0 – 1 Integer Programming Modeling ExamplesCapital Budgeting Example (2 of 4)

28Exhibit 5.16

0 – 1 Integer Programming Modeling ExamplesCapital Budgeting Example (3 of 4)

Page 15: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

15

29

Exhibit 5.17

0 – 1 Integer Programming Modeling ExamplesCapital Budgeting Example (4 of 4)

30

Plant

Available Capacity

(tons,1000s) A B C

12 10 14

Farms Annual Fixed Costs

($1000)

Projected Annual Harvest (tons, 1000s)

1 2 3 4 5 6

405 390 450 368 520 465

11.2 10.5 12.8 9.3 10.8 9.6

Farm

Plant A B C

1 2 3 4 5 6

18 15 12 13 10 17 16 14 18 19 15 16 17 19 12 14 16 12

0 – 1 Integer Programming Modeling ExamplesFixed Charge and Facility Example (1 of 4)

Which of six farms should be purchased that will meet current production capacity at minimum total cost, including annual fixed costs and shipping costs?Data:

Shipping Costs

Page 16: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

16

31

yi = 0 if farm i is not selected, and 1 if farm i is selected, i = 1,2,3,4,5,6xij = potatoes (tons, 1000s) shipped from farm i, i = 1,2,3,4,5,6 to plant j, j = A,B,C.Minimize Z = 18x1A + 15x1B + 12x1C + 13x2A + 10x2B + 17x2C + 16x3A +

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 ≤ 0x3A + x3A + x3C - 12.8y3 ≤ 0 x4A + x4b + x4C - 9.3y4 ≤ 0x5A + x5B + x5B - 10.8y5 ≤ 0 x6A + x6B + X6C - 9.6y6 ≤ 0

x1A + x2A + x3A + x4A + x5A + x6A = 12x1B + x2B + x3B + x4B + x5B + x6B = 10x1C + x2C + x3C + x4C + x5C + x6C = 14

xij ≥ 0 yi = 0 or 1

0 – 1 Integer Programming Modeling ExamplesFixed Charge and Facility Example (2 of 4)

32Exhibit 5.18

0 – 1 Integer Programming Modeling ExamplesFixed Charge and Facility Example (3 of 4)

Page 17: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

17

33

Exhibit 5.19

0 – 1 Integer Programming Modeling ExamplesFixed Charge and Facility Example (4 of 4)

34

Cities Cities within 300 miles1. Atlanta Atlanta, Charlotte, Nashville2. Boston Boston, New York3. Charlotte Atlanta, Charlotte, Richmond4. Cincinnati Cincinnati, Detroit, Indianapolis, Nashville, Pittsburgh5. Detroit Cincinnati, Detroit, Indianapolis, Milwaukee, Pittsburgh6. Indianapolis Cincinnati, Detroit, Indianapolis, Milwaukee, Nashville,

St. Louis7. Milwaukee Detroit, Indianapolis, Milwaukee8. Nashville Atlanta, Cincinnati, Indianapolis, Nashville, St. Louis9. New York Boston, New York, Richmond

10. Pittsburgh Cincinnati, Detroit, Pittsburgh, Richmond11. Richmond Charlotte, New York, Pittsburgh, Richmond12. St. Louis Indianapolis, Nashville, St. Louis

APS wants to construct the minimum set of new hubs in the following twelve cities such that there is a hub within 300 miles of every city:

0 – 1 Integer Programming Modeling ExamplesSet Covering Example (1 of 4)

Page 18: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

18

35

xi = city i, i = 1 to 12, xi = 0 if city is not selected as a hub and xi = 1if it is.Minimize Z = x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11 + x12

subject to:Atlanta: x1 + x3 + x8 ≥ 1Boston: x2 + x10 ≥ 1Charlotte: x1 + x3 + x11 ≥ 1Cincinnati: x4 + x5 + x6 + x8 + x10 ≥ 1Detroit: x4 + x5 + x6 + x7 + x10 ≥ 1Indianapolis: x4 + x5 + x6 + x7 + x8 + x12 ≥ 1Milwaukee: x5 + x6 + x7 ≥ 1Nashville: x1 + x4 + x6+ x8 + x12 ≥ 1New York: x2 + x9+ x11 ≥ 1Pittsburgh: x4 + x5 + x10 + x11 ≥ 1Richmond: x3 + x9 + x10 + x11 ≥ 1St Louis: x6 + x8 + x12 ≥ 1 xij = 0 or 1

0 – 1 Integer Programming Modeling ExamplesSet Covering Example (2 of 4)

36Exhibit 5.20

0 – 1 Integer Programming Modeling ExamplesSet Covering Example (3 of 4)

Page 19: Chapter 5 Integer Programming · PDF file2 3 Integer Programming Models Types of Models Total Integer Model: All decision variables required to have integer solution values. 0-1 Integer

19

37

Exhibit 5.21

0 – 1 Integer Programming Modeling ExamplesSet Covering Example (4 of 4)