4-1 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Linear Programming: Modeling Examples Chapter 4
4-2 Chapter Topics A Product Mix Example A Diet Example An Investment Example A Marketing Example A Transportation Example A Blend Example A Multiperiod Scheduling Example Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-3 A Product Mix Example Problem Definition (1 of 8) T-shirt/Sweatshirt manufacturing company. ■ Must complete production within 72 hours ■ Truck capacity is 1,200 standard sized-boxes. Standard size box holds 12 T-shirts. A 12-sweatshirt box is three times the size of a standard box. ■ $25,000 available for a production run. ■ There are 500 dozen blank sweatshirts and 500 dozen blank T- shirts in stock. ■ How many dozens (boxes) of each type of shirt to produce? ■ Sweatshirt with Front Print ■ Sweatshirt with Front and Back Print ■ T-shirt with Front Print ■ T-shirt with Front and Back Print
4-4 A Product Mix Example (2 of 8) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-5 A Product Mix Example Data (3 of 8) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-6 Decision Variables: x 1 = sweatshirts, front printing x 2 = sweatshirts, back and front printing x 3 = T-shirts, front printing x 4 = T-shirts, back and front printing Objective Function: Maximize Z = $90x 1 + $125x 2 + $45x 3 + $65x 4 Model Constraints: 0.10x x x x 4 72 hr 3x 1 + 3x 2 + x 3 + x 4 1,200 boxes $36x 1 + $48x 2 + $25x 3 + $35x 4 $25,000 x 1 + x 2 500 dozen sweatshirts x 3 + x 4 500 dozen T-shirts A Product Mix Example Model Construction (4 of 8) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-7 Exhibit 4.3 A Product Mix Example Solution with QM for Windows (7 of 8) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-8 Exhibit 4.4 A Product Mix Example Solution with QM for Windows (8 of 8) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-9 The dietition wants the breakfast to include at least 420 calories, 5 milligrams of iron, 400 milligrams of calcium, 20 grams of protein, 12 grams of fiber, and must have no more than 20 grams of fat and 30 milligrams of cholesterol. A Diet Example Data and Problem Definition (1 of 5) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-10 x 1 = cups of bran cereal x 2 = cups of dry cereal x 3 = cups of oatmeal x 4 = cups of oat bran x 5 = eggs x 6 = slices of bacon x 7 = oranges x 8 = cups of milk x 9 = cups of orange juice x 10 = slices of wheat toast A Diet Example Model Construction – Decision Variables (2 of 5) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-11 MinimizeZ = 0.18x x x x x x x x x x 10 subject to: 90x x x x x x x x x x 10 420 calories 2x 2 + 2x 3 + 2x 4 + 5x 5 + 3x 6 + 4x 8 + x 10 20 g fat 270x 5 + 8x x 8 30 mg cholesterol 6x 1 + 4x 2 + 2x 3 + 3x 4 + x 5 + x 7 + x 10 5 mg iron 20x x x 3 + 8x x x x 8 + 3x x 10 400 mg of calcium 3x 1 + 4x 2 + 5x 3 + 6x 4 + 7x 5 + 2x 6 + x 7 + 9x 8 + x 9 + 3x 10 20 g protein 5x 1 + 2x 2 + 3x 3 + 4x 4 + x 7 + 3x 10 12 g fiber x i 0, for all j A Diet Example Model Summary (3 of 5) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-12 OPTIMUM SOLUTION X 3 = cups of outmeal X 8 = cups of milk X 10 = slices of wheat tost (Cost) Z = $0.509 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-13 $70,000 (All of it) to divide between several investments Municipal bonds – 8.5% annual return Certificates of deposit – 5% Treasury bills – 6.5% Growth stock fund – 13% - No more than 20% of investment should be in Municipal Bonds - The amount invested in deposit cannot exceed the amount invested in the other three alternatives. - At least 30% in treasury bills and deposit - Amount invested in deposits and treasury bills should be no less than in bonds and stock funds; the ratio should be at least 1.2 to 1. An Investment Example
4-14 How much to invest in each alternative to maximize the return??? Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-15 Maximize Z = $0.085x x x x 4 subject to: x 1 $14,000 x 2 - x 1 - x 3 - x 4 0 x 2 + x 3 $21, x 1 + x 2 + x x 4 0 x 1 + x 2 + x 3 + x 4 = $70,000 x 1, x 2, x 3, x 4 0 where x 1 = amount ($) invested in municipal bonds x 2 = amount ($) invested in certificates of deposit x 3 = amount ($) invested in treasury bills x 4 = amount ($) invested in growth stock fund An Investment Example Model Summary (1 of 4) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-16 An Investment Example What if we change the constraint defining the entire amount of fund to invest as follows? x1 + x2 + x3 + x4 <= $70000 What changes to be made to the LP model ??? Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-17 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Maximize Z = $0.085x x x x 4 subject to: x 1 $14,000 x 2 - x 1 - x 3 - x 4 0 x 2 + x 3 $21, x 1 + x 2 + x x 4 0 x 1 + x 2 + x 3 + x 4 = $70,000 x 1, x 2, x 3, x 4 0
4-18 Budget limit $100,000 Television station has time available for 4 commercials Radio station has time for 10 commercials Newspaper has space for 7 ads Resources available for no more than 15 commercials and/or ads A Marketing Example (The Biggs Dept. Store Chain hires an advertising firm) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-19 Maximize Z = 20,000x ,000x 2 + 9,000x 3 subject to: 15,000x 1 + 6,000x 2 + 4,000x 3 100,000 x 1 4 x 2 10 x 3 7 x 1 + x 2 + x 3 15 x 1, x 2, x 3 0 where x 1 = number of television commercials x 2 = number of radio commercials x 3 = number of newspaper ads A Marketing Example Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-20 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-21 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-22 A Transportation Example The Zephyr Television Company ships televisions from three warehouses to three retail stores on a monthly basis. Each warehouse has a fixed supply per month, and each store has a fixed demand per month. Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-23 Warehouse supply ofRetail store demand Television Sets:for television sets: 1 - Cincinnati 300A - New York Atlanta 200B - Dallas Pittsburgh 200C - Detroit200 Total 700Total600 A Transportation Example (Zephyr TV Comp.) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-24 A Transportation Example The manufacturer wants to know the number of television sets to ship from each warehouse to each store in order to minimize the total cost of transportation. Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-25 Minimize Z = $16x 1A + 18x 1B + 11x 1C + 14x 2A + 12x 2B + 13x 2C + 13x 3A + 15x 3B + 17x 3C subject to: x 1A + x 1B + x 1C 300 x 2A + x 2B + x 2C 200 x 3A + x 3B + x 3C 200 x 1A + x 2A + x 3A = 150 x 1B + x 2B + x 3B = 250 x 1C + x 2C + x 3C = 200 All x ij 0 A Transportation Example Model Summary (2 of 4) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Double-subscripted variable: x ij : Number of products shipped from warehouse i to store j, for i=1,2,3 and j=A,B,C.
4-26 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-27 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-28 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-29 A Blend Example A petroleum company produces three grades of motor oil: super, premium, and extra from three components. Company wants to produce at least 3,000 barrels of each grade of motor oil per day. Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-30 A Blend Example Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-31 ■ Determine the optimal mix of the three components in each grade of motor oil that will maximize daily profit. A Blend Example Problem Statement Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-32 A Blend Example Decision variables: The quantity of each of the three components used in each grade of gasoline (9 decision variables) xij = barrels of component i used in motor oil grade j per day, where i = 1, 2, 3 and j = s (super), p (premium), and e (extra). Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-33 A Blend Example We have 3 groups of constraints to model: - Company wants to produce at least 3,000 barrels of each grade of motor oil (3 constraints for production level) - Barrels of components to use per day can not exceed the given levels (3 constraints for input) - Amount of components used in each grade of motor oil should comply with the given percentages (6 constraints for blending) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-34 Maximize Z = 11x 1s + 13x 2s + 9x 3s + 8x 1p + 10x 2p + 6x 3p + 6x 1e + 8x 2e + 4x 3e subject to: x 1s + x 1p + x 1e 4,500 bbl. x 2s + x 2p + x 2e 2,700 bbl. x 3s + x 3p + x 3e 3,500 bbl. 0.50x 1s x 2s x 3s x 2s x 1s x 3s x 1p x 2p x 3p x 3p x 1p x 2p x 1e x 2e x 3e x 2e x 1e x 3e 0 x 1s + x 2s + x 3s 3,000 bbl. x 1p + x 2p + x 3p 3,000 bbl. x 1e + x 2e + x 3e 3,000 bbl. A Blend Example Model Summary (3 of 6) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall all x ij 0
4-35 Solution for Blend Example X 1s = 1500 barrels X 2s = 600 barrels X 3s = 900 barrels X 1p = 1200 barrels X 2p = 1800 barrels X 1e = 1800 barrels X 2e = 1300 barrels X 3e = 900 barrels Z = $76800 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-36 A Multi-Period Scheduling Example PM Computer Services assembles its own brand of personal computers from component parts it purchases overseas and domestically. PM sells most of its computers locally to different departments at State University as well as to individuals and businesses in the immediate geographic region. Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-37 Production Capacity: 160 computers per week 50 more computers with overtime Assembly Costs: $190 per computer regular time; $260 per computer overtime Inventory Holding Cost: $10/computer per week Order schedule: A Multi-Period Scheduling Example Problem Definition and Data (1 of 5) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-38 A Multi-Period Scheduling Example PM Computers wants to determine a schedule that will indicate how much regular and overtime production it will need each week to meet its orders at minimum cost. Note that the company starts production with no inventory on hand and wants no inventory left over at the end of the 6-week period. Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-39 Decision Variables: r j = regular production of computers in week j (j = 1, 2, …, 6) o j = overtime production of computers in week j (j = 1, 2, …, 6) i j = extra computers carried over as inventory in week j (j = 1, 2, …, 5) A Multi-Period Scheduling Example Decision Variables (2 of 5) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-40 Model summary: Minimize Z = $190(r 1 + r 2 + r 3 + r 4 + r 5 + r 6 ) + $260(o 1 +o 2 +o 3 +o 4 +o 5 +o 6 ) + 10(i 1 + i 2 + i 3 + i 4 + i 5 ) subject to: r j 160 computers in week j (j = 1, 2, 3, 4, 5, 6) o j 50 computers in week j (j = 1, 2, 3, 4, 5, 6) r 1 + o 1 - i 1 = 105week 1 r 2 + o 2 + i 1 - i 2 = 170week 2 r 3 + o 3 + i 2 - i 3 = 230 week 3 r 4 + o 4 + i 3 - i 4 = 180week 4 r 5 + o 5 + i 4 - i 5 = 150week 5 r 6 + o 6 + i 5 = 250week 6 r j, o j, i j 0 A Multi-Period Scheduling Example Model Summary (3 of 5) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
4-41 Solution for Multi-Period Scheduling Example r 1 = 160 computers produced in regular time in week 1 r 2 = 160 computers produced in regular time in week 2 r 3 = 160 computers produced in regular time in week 3 r 4 = 160 computers produced in regular time in week 4 r 5 = 160 computers produced in regular time in week 5 r 6 = 160 computers produced in regular time in week 6 o 3 = 25 computer produced with overtime in week 3 o 4 = 20computer produced with overtime in week 4 o 5 = 30 computer produced with overtime in week 5 o 6 = 50 computer produced with overtime in week 6 i 1 = 55 computers carried over in inventory in week 1 i 2 = 45 computers carried over in inventory in week 2 i 5 = 40 computers carried over in inventory in week 5 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall