5-1 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Integer Programming Chapter 5
5-2 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 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-3 Integer Programming Models Types of Models Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 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.
5-4 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: Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-5 A Total Integer Model (2 of 2) x 1 = number of presses purchased x 2 = number of lathes purchased Integer Programming Model: Maximize Z = $100x 1 + $150x 2 subject to: $8,000x 1 + 4,000x 2 $40,000 15x x 2 200 ft 2 x 1, x 2 0 and integer Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-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). A Integer Model (1 of 2) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-7 x 1 = construction of a swimming pool (1 if constructed, 0 otherwise) x 2 = construction of a tennis center x 3 = construction of an athletic field x 4 = construction of a gymnasium 0-1 Integer Programming Model: Maximize Z = 300x x x x 4 subject to: $35,000x ,000x ,000x ,000x 4 $120,000 4x 1 + 2x 2 + 7x 3 + 3x 4 12 acres x 1 + x 2 1 facility x 1, x 2, x 3, x 4 = 0 or 1 A Integer Model (2 of 2) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-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. Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-9 x 1 = # of condominiums purchased (integer) x 2 = acres of land purchased (continuous) x 3 = # of bonds purchased (integer) Mixed Integer Programming Model: Maximize Z = $9,000x 1 + 1,500x 2 + 1,000x 3 subject to: 50,000x ,000x 2 + 8,000x 3 $250,000 x 1 4 condominiums x 2 15 acres x 3 20 bonds x 2 0 x 1, x 3 0 and integer A Mixed Integer Model (2 of 2) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-10 ■Rounding non-integer solution values 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 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-11 Integer Programming Example Graphical Solution of Machine Shop Model Maximize Z = $100x 1 + $150x 2 subject to: 8,000x 1 + 4,000x 2 $40,000 15x x 2 200 ft 2 x 1, x 2 0 and integer Optimal Solution: Z = $1, x 1 = 2.22 presses x 2 = 5.55 lathes Figure 5.1 Feasible Solution Space with Integer Solution Points Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-12 ■Rounding non-integer solution values to the nearest integer value can result in an infeasible solution. x 1 = 2.22 presses 2 x 2 = 5.55 lathes 6 15x x 2 (2) + 30(6) = 210 Violates constraint Infeasible ■A feasible solution is ensured by rounding down non-integer solution values but may result in a less than optimal (sub-optimal) solution. x 1 = 2.22 presses 2 x 2 = 5.55 lathes 5 Z = 950. But there is a better solution! (x 1 = 1 and x 2 = 6). Integer Programming Graphical Solution Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-13 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. ■Excel and QM for Windows used in this book. ■See book’s companion website – “Integer Programming: the Branch and Bound Method” for detailed description of this method. Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-14 Recreational Facilities Example: Maximize Z = 300x x x x 4 subject to: $35,000x ,000x ,000x ,000x 4 $120,000 4x 1 + 2x 2 + 7x 3 + 3x 4 12 acres x 1 + x 2 1 facility x 1, x 2, x 3, x 4 = 0 or 1 Computer Solution of IP Problems 0 – 1 Model with Excel (1 of 5) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-15 Exhibit 5.2 Computer Solution of IP Problems 0 – 1 Model with Excel (2 of 5) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-16 Exhibit 5.3 Computer Solution of IP Problems 0 – 1 Model with Excel (3 of 5) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-17 Exhibit 5.4 Computer Solution of IP Problems 0 – 1 Model with Excel (4 of 5) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-18 Exhibit 5.5 Computer Solution of IP Problems 0 – 1 Model with Excel (5 of 5) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-19 Computer Solution of IP Problems 0 – 1 Model with QM for Windows (1 of 3) Recreational Facilities Example: Maximize Z = 300x x x x 4 subject to: $35,000x ,000x ,000x ,000x 4 $120,000 4x 1 + 2x 2 + 7x 3 + 3x 4 12 acres x 1 + x 2 1 facility x 1, x 2, x 3, x 4 = 0 or 1 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-20 Exhibit 5.6 Computer Solution of IP Problems 0 – 1 Model with QM for Windows (2 of 3) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-21 Exhibit 5.7 Computer Solution of IP Problems 0 – 1 Model with QM for Windows (3 of 3) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-22 Computer Solution of IP Problems Total Integer Model with Excel (1 of 5) Integer Programming Model of Machine Shop: Maximize Z = $100x 1 + $150x 2 subject to: 8,000x 1 + 4,000x 2 $40,000 15x x 2 200 ft 2 x 1, x 2 0 and integer Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-23 Exhibit 5.8 Computer Solution of IP Problems Total Integer Model with Excel (2 of 5) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-24 Exhibit 5.9 Computer Solution of IP Problems Total Integer Model with Excel (3 of 5) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-25 Exhibit 5.10 Computer Solution of IP Problems Total Integer Model with Excel (4 of 5) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-26 Exhibit 5.11 Computer Solution of IP Problems Total Integer Model with Excel (5 of 5) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-27 Integer Programming Model for Investments Problem: Maximize Z = $9,000x 1 + 1,500x 2 + 1,000x 3 subject to: 50,000x ,000x 2 + 8,000x 3 $250,000 x 1 4 condominiums x 2 15 acres x 3 20 bonds x 2 0 x 1, x 3 0 and integer Computer Solution of IP Problems Mixed Integer Model with Excel (1 of 3) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-28 Exhibit 5.12 Computer Solution of IP Problems Total Integer Model with Excel (2 of 3) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-29 Exhibit 5.13 Computer Solution of IP Problems Solution of Total Integer Model with Excel (3 of 3) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-30 Exhibit 5.14 Computer Solution of IP Problems Mixed Integer Model with QM for Windows (1 of 2) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-31 Exhibit 5.15 Computer Solution of IP Problems Mixed Integer Model with QM for Windows (2 of 2) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-32 ■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 (1 of 4) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-33 x 1 = selection of web site project x 2 = selection of warehouse project x 3 = selection clothing department project x 4 = selection of computer department project x 5 = selection of ATM project x i = 1 if project “i” is selected, 0 if project “i” is not selected Maximize Z = $120x 1 + $85x 2 + $105x 3 + $140x 4 + $70x 5 subject to: 55x x x x x 5 x x x x x 5 x x x 4 60 x 3 + x 4 1 x i = 0 or 1 0 – 1 Integer Programming Modeling Examples Capital Budgeting Example (2 of 4) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-34 Exhibit – 1 Integer Programming Modeling Examples Capital Budgeting Example (3 of 4) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-35 Exhibit – 1 Integer Programming Modeling Examples Capital Budgeting Example (4 of 4) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
– 1 Integer Programming Modeling Examples Fixed 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? Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-37 y i = 0 if farm i is not selected, and 1 if farm i is selected;i = 1,2,3,4,5,6 x ij = potatoes (1000 tons) shipped from farm i to plant j;j = A,B,C. Minimize Z =TRANSPORTATION COST + FIXED COST TRANSPORTATION COST : 18x 1A + 15x 1B + 12x 1C + 13x 2A + 10x 2B + 17x 2C + 16x x 3B +18x 3C + 19x 4A + 15x 4b + 16x 4C + 17x 5A + 19x 5B +12x 5C + 14x 6A + 16x 6B + 12x 6C FIXED COST: 405y y y y y y 6 MIN Z=18x 1A + 15x 1B + 12x 1C + 13x 2A + 10x 2B + 17x 2C + 16x x 3B +18x 3C + 19x 4A + 15x 4b + 16x 4C + 17x 5A + 19x 5B +12x 5C + 14x 6A + 16x 6B + 12x 6C + 405y y y y y y 6 x ij ≥ 0 y i = 0 or 1 0 – 1 Integer Programming Modeling Examples Fixed Charge and Facility Example (2 of 4) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-38 y i = 0 if farm i is not selected, and 1 if farm i is selected;i = 1,2,3,4,5,6 x ij = potatoes (1000 tons) shipped from farm i to plant j;j = A,B,C. subject to: x 1A + x 2A + x 3A + x 4A + x 5A + x 6A = 12 (capacity of the A plant) x 1B + x 2B + x 3B + x 4B + x 5B + x 6B = 10 (capacity of the B plant) x 1C + x 2C + x 3C + x 4C + x 5C + x 6C = 14 (capacity of the C plant) x 1A + x 1B + x 1C ≤ 11.2y 1 x 2A + x 2B + x 2C ≤ 10.5y 2 x 3A + x 3B + x 3C ≤ 12.8y 3 x 4A + x 4B + x 4C ≤ 9.3y 4 x 5A + x 5B + x 5C ≤ 10.8y 5 x 6A + x 6B + X 6C ≤ 9.6y 6 x ij ≥ 0 y i = 0 or 1 0 – 1 Integer Programming Modeling Examples Fixed Charge and Facility Example (2 of 4) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-39 y i = 0 if farm i is not selected, and 1 if farm i is selected;i = 1,2,3,4,5,6 x ij = potatoes (1000 tons) shipped from farm i to plant j;j = A,B,C. Minimize Z =18x 1A + 15x 1B + 12x 1C + 13x 2A + 10x 2B + 17x 2C + 16x x 3B +18x 3C + 19x 4A + 15x 4b + 16x 4C + 17x 5A + 19x 5B +12x 5C + 14x 6A + 16x 6B + 12x 6C + 405y y y y y y 6 subject to: x 1A + x 1B + x 1C y 1 ≤ 0x 2A + x 2B + x 2C -10.5y 2 ≤ 0 x 3A + x 3B + x 3C y 3 ≤ 0x 4A + x 4B + x 4C - 9.3y 4 ≤ 0 x 5A + x 5B + x 5C y 5 ≤ 0x 6A + x 6B + X 6C - 9.6y 6 ≤ 0 x 1A + x 2A + x 3A + x 4A + x 5A + x 6A = 12 x 1B + x 2B + x 3B + x 4B + x 5B + x 6B = 10 x 1C + x 2C + x 3C + x 4C + x 5C + x 6C = 14 x ij ≥ 0 y i = 0 or 1 0 – 1 Integer Programming Modeling Examples Fixed Charge and Facility Example (2 of 4) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-40 Exhibit – 1 Integer Programming Modeling Examples Fixed Charge and Facility Example (3 of 4) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-41 Exhibit – 1 Integer Programming Modeling Examples Fixed Charge and Facility Example (4 of 4) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-42 Cities Cities within 300 miles 1. AtlantaAtlanta, Charlotte, Nashville 2. BostonBoston, New York 3. CharlotteAtlanta, Charlotte, Richmond 4. CincinnatiCincinnati, Detroit, Indianapolis, Nashville, Pittsburgh 5. DetroitCincinnati, Detroit, Indianapolis, Milwaukee, Pittsburgh 6. IndianapolisCincinnati, Detroit, Indianapolis, Milwaukee, Nashville, St. Louis 7. MilwaukeeDetroit, Indianapolis, Milwaukee 8. NashvilleAtlanta, Cincinnati, Indianapolis, Nashville, St. Louis 9. New YorkBoston, New York, Richmond 10. PittsburghCincinnati, Detroit, Pittsburgh, Richmond 11. RichmondCharlotte, New York, Pittsburgh, Richmond 12. St. Louis Indianapolis, Nashville, St. Louis 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: 0 – 1 Integer Programming Modeling Examples Set Covering Example (1 of 4) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-43 x i = city i, i = 1 to 12; x i = 0 if city is not selected as a hub and x i = 1 if it is. Minimize Z = x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 + x 8 + x 9 + x 10 + x 11 + x 12 subject to:Atlanta:x 1 + x 3 + x 8 1 Boston:x 2 + x 10 1 Charlotte:x 1 + x 3 + x 11 1 Cincinnati:x 4 + x 5 + x 6 + x 8 + x 10 1 Detroit:x 4 + x 5 + x 6 + x 7 + x 10 1 Indianapolis: x 4 + x 5 + x 6 + x 7 + x 8 + x 12 1 Milwaukee:x 5 + x 6 + x 7 1 Nashville: x 1 + x 4 + x 6 + x 8 + x 12 1 New York:x 2 + x 9 + x 11 1 Pittsburgh:x 4 + x 5 + x 10 + x 11 1 Richmond: x 3 + x 9 + x 10 + x 11 1 St Louis: x 6 + x 8 + x 12 1 x ij = 0 or 1 0 – 1 Integer Programming Modeling Examples Set Covering Example (2 of 4) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-44 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 0 – 1 Integer Programming Modeling Examples Set Covering Example (3 of 4) Exhibit 5.20
5-45 Exhibit – 1 Integer Programming Modeling Examples Set Covering Example (4 of 4) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-46 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,000/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? Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-47 Step 1: Formulate the Integer Programming Model Maximize Z = $85,000x ,000x 2 subject to: x 1 + x 2 10 salespeople $10,000x 1 + 7,000x 2 $72,000 expense budget x 1, x 2 0 or integer Step 2: Solve the Model using QM for Windows Total Integer Programming Modeling Example Model Formulation (2 of 3) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
5-48 Total Integer Programming Modeling Example Solution with QM for Windows (3 of 3) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall