Table of Contents Chapter 3 (Linear Programming: Formulation and Applications) Super Grain Corp. Advertising-Mix Problem (Section 3.1) Resource Allocation Problems (Section 3.2) Cost-Benefit-Trade-Off Problems (Section 3.3) Mixed Problems (Section 3.4) Transportation Problems (Section 3.5) Assignment Problems (Section 3.6) 3.2–3.5 3.6–3.16 3.17–3.22 3.23–3.28 3.29–3.33 3.34–3.37 Applications of Linear Programming with Spreadsheets (UW Lecture) 3.38–3.57 These slides are based upon lectures to first-year MBA students at the University of Washington that discuss the application and formulation of linear programming models (as taught by one of the authors). McGraw-Hill/Irwin 3.1 © The McGraw-Hill Companies, Inc., 2008 Super Grain Corp. Advertising-Mix Problem • Goal: Design the promotional campaign for Crunchy Start. • The three most effective advertising media for this product are – Television commercials on Saturday morning programs for children. – Advertisements in food and family-oriented magazines. – Advertisements in Sunday supplements of major newspapers. • The limited resources in the problem are – Advertising budget ($4 million). – Planning budget ($1 million). – TV commercial spots available (5). • The objective will be measured in terms of the expected number of exposures. Question: At what level should they advertise Crunchy Start in each of the three media? McGraw-Hill/Irwin 3.2 © The McGraw-Hill Companies, Inc., 2008 Cost and Exposure Data Costs Cost Category Ad Budget Planning budget Expected number of exposures McGraw-Hill/Irwin Each TV Commercial Each Magazine Ad Each Sunday Ad $300,000 $150,000 $100,000 90,000 30,000 40,000 1,300,000 600,000 500,000 3.3 © The McGraw-Hill Companies, Inc., 2008 Spreadsheet Formulation B 3 4 5 6 7 8 9 10 11 12 13 14 15 Exposures per Ad (thousands) Ad Budget Planning Budget Number of Ads Max TV Spots McGraw-Hill/Irwin C TV Spots 1,300 300 90 TV Spots 0 <= 5 D Magazine Ads 600 Cost per Ad ($thousands) 150 30 Magazine Ads 20 3.4 E SS Ads 500 100 40 SS Ads 10 F Budget Spent 4,000 1,000 G H <= <= Budget Available 4,000 1,000 Total Exposures (thousands) 17,000 © The McGraw-Hill Companies, Inc., 2008 Algebraic Formulation Let TV = Number of commercials for separate spots on television M = Number of advertisements in magazines. SS = Number of advertisements in Sunday supplements. Maximize Exposure = 1,300TV + 600M + 500SS subject to Ad Spending: 300TV + 150M + 100SS ≤ 4,000 ($thousand) Planning Cost: 90TV + 30M + 30SS ≤ 1,000 ($thousand) Number of TV Spots: TV ≤ 5 and TV ≥ 0, M ≥ 0, SS ≥ 0. McGraw-Hill/Irwin 3.5 © The McGraw-Hill Companies, Inc., 2008 The TBA Airlines Problem • TBA Airlines is a small regional company that specializes in short flights in small airplanes. • The company has been doing well and has decided to expand its operations. • The basic issue facing management is whether to purchase more small airplanes to add some new short flights, or start moving into the national market by purchasing some large airplanes, or both. Question: How many airplanes of each type should be purchased to maximize their total net annual profit? McGraw-Hill/Irwin 3.6 © The McGraw-Hill Companies, Inc., 2008 Data for the TBA Airlines Problem Small Airplane Large Airplane Net annual profit per airplane $1 million $5 million Purchase cost per airplane 5 million 50 million 2 — Maximum purchase quantity McGraw-Hill/Irwin 3.7 Capital Available $100 million © The McGraw-Hill Companies, Inc., 2008 Violates Divisibility Assumption of LP • Divisibility Assumption of Linear Programming: Decision variables in a linear programming model are allowed to have any values, including fractional values, that satisfy the functional and nonnegativity constraints. Thus, these variables are not restricted to just integer values. • Since the number of airplanes purchased by TBA must have an integer value, the divisibility assumption is violated. McGraw-Hill/Irwin 3.8 © The McGraw-Hill Companies, Inc., 2008 Spreadsheet Model B 3 4 5 6 7 8 9 10 11 12 13 14 Unit Profit ($millions) Capital ($millions) Units Produced Maximum Small Airplanes McGraw-Hill/Irwin C Small Airplane 1 D Large Airplane 5 Capital Per Unit Produced 5 50 Small Airplane 0 <= 2 3.9 Large Airplane 2 E Capital Spent 100 F G <= Capital Available 100 Total Profit ($millions) 10 © The McGraw-Hill Companies, Inc., 2008 Integer Programming Formulation Let S = Number of small airplanes to purchase L = Number of large airplanes to purchase Maximize Profit = S + 5L ($millions) subject to Capital Available: 5S + 50L ≤ 100 ($millions) Max Small Planes: S ≤ 2 and S ≥ 0, L ≥ 0 S, L are integers. McGraw-Hill/Irwin 3.10 © The McGraw-Hill Companies, Inc., 2008 Think-Big Capital Budgeting Problem • Think-Big Development Co. is a major investor in commercial real-estate development projects. • They are considering three large construction projects – Construct a high-rise office building. – Construct a hotel. – Construct a shopping center. • Each project requires each partner to make four investments: a down payment now, and additional capital after one, two, and three years. Question: At what fraction should Think-Big invest in each of the three projects? McGraw-Hill/Irwin 3.11 © The McGraw-Hill Companies, Inc., 2008 Financial Data for the Projects Investment Capital Requirements Year Office Building Hotel Shopping Center 0 $40 million $80 million $90 million 1 60 million 80 million 50 million 2 90 million 80 million 20 million 3 10 million 70 million 60 million Net present value $45 million $70 million $50 million McGraw-Hill/Irwin 3.12 © The McGraw-Hill Companies, Inc., 2008 Spreadsheet Formulation B 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Net Present Value ($millions) Now End of Year 1 End of Year 2 End of Year 3 Participation Share McGraw-Hill/Irwin C Office Building 45 D Hotel 70 E Shopping Center 50 Cumulative Capital Spent 25 44.757 60.583 80 Cumulative Capital Required ($millions) 40 80 90 100 160 140 190 240 160 200 310 220 Office Building 0.00% Hotel 16.50% 3.13 F Shopping Center 13.11% G H <= <= <= <= Cumulative Capital Available 25 45 65 80 Total NPV ($millions) 18.11 © The McGraw-Hill Companies, Inc., 2008 Algebraic Formulation Let OB = Participation share in the office building, H = Participation share in the hotel, SC = Participation share in the shopping center. Maximize NPV = 45OB + 70H + 50SC subject to Total invested now: 40OB + 80H + 90SC ≤ 25 ($million) Total invested within 1 year: 100OB + 160H + 140SC ≤ 45 ($million) Total invested within 2 years: 190OB + 240H + 160SC ≤ 65 ($million) Total invested within 3 years: 200OB + 310H + 220SC ≤ 80 ($million) and OB ≥ 0, H ≥ 0, SC ≥ 0. McGraw-Hill/Irwin 3.14 © The McGraw-Hill Companies, Inc., 2008 Template for Resource-Allocation Problems Activities Constraints Unit Profit Level of Activity McGraw-Hill/Irwin profit per unit of activity Resources Used SUMPRODUCT (resource used per unit, changing cells) resource used per unit of act ivit y Resources Available <= Total Profit SUMPRODUCT(profit per unit, changing cells) changing cells 3.15 © The McGraw-Hill Companies, Inc., 2008 Summary of Formulation Procedure for ResourceAllocation Problems 1. Identify the activities for the problem at hand. 2. Identify an appropriate overall measure of performance (commonly profit). 3. For each activity, estimate the contribution per unit of the activity to the overall measure of performance. 4. Identify the resources that must be allocated. 5. For each resource, identify the amount available and then the amount used per unit of each activity. 6. Enter the data in steps 3 and 5 into data cells. 7. Designate changing cells for displaying the decisions. 8. In the row for each resource, use SUMPRODUCT to calculate the total amount used. Enter <= and the amount available in two adjacent cells. 9. Designate a target cell. Use SUMPRODUCT to calculate this measure of performance. McGraw-Hill/Irwin 3.16 © The McGraw-Hill Companies, Inc., 2008 Union Airways Personnel Scheduling • Union Airways is adding more flights to and from its hub airport and so needs to hire additional customer service agents. • The five authorized eight-hour shifts are – – – – – Shift 1: Shift 2: Shift 3: Shift 4: Shift 5: 6:00 AM to 2:00 PM 8:00 AM to 4:00 PM Noon to 8:00 PM 4:00 PM to midnight 10:00 PM to 6:00 AM Question: How many agents should be assigned to each shift? McGraw-Hill/Irwin 3.17 © The McGraw-Hill Companies, Inc., 2008 Schedule Data Time Periods Covered by Shift Time Period 1 6 AM to 8 AM √ 8 AM to 10 AM √ √ 79 10 AM to noon √ √ 65 Noon to 2 PM √ √ √ 87 √ √ 64 2 PM to 4 PM 2 3 4 5 Minimum Number of Agents Needed 48 4 PM to 6 PM √ √ 73 6 PM to 8 PM √ √ 82 8 PM to 10 PM √ 43 10 PM to midnight √ Midnight to 6 AM Daily cost per agent McGraw-Hill/Irwin $170 $160 $175 3.18 $180 √ 52 √ 15 $195 © The McGraw-Hill Companies, Inc., 2008 Spreadsheet Formulation B 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Cost per Shift Time Period 6am-8am 8am-10am 10am- 12pm 12pm-2pm 2pm-4pm 4pm-6pm 6pm-8pm 8pm-10pm 10pm-12am 12am-6am Number Working McGraw-Hill/Irwin C 6am-2pm Shift $170 1 1 1 1 0 0 0 0 0 0 6am-2pm Shift 48 D 8am-4pm Shift $160 E Noon-8pm Shift $175 F 4pm-midnight Shift $180 Shift Works Time Period? (1=yes, 0=no) 0 0 0 1 0 0 1 0 0 1 1 0 1 1 0 0 1 1 0 1 1 0 0 1 0 0 1 0 0 0 8am-4pm Shift 31 Noon-8pm Shift 39 3.19 G 10pm-6am Shift $195 0 0 0 0 0 0 0 0 1 1 4pm-midnight Shift 43 10pm-6am Shift 15 H Total Working 48 79 79 118 70 82 82 43 58 15 I J >= >= >= >= >= >= >= >= >= >= Minimum Needed 48 79 65 87 64 73 82 43 52 15 Total Cost $30,610 © The McGraw-Hill Companies, Inc., 2008 Algebraic Formulation Let Si = Number working shift i (for i = 1 to 5), Minimize Cost = $170S1 + $160S2 + $175S3 + $180S4 + $195S5 subject to Total agents 6AM–8AM: S1 ≥ 48 Total agents 8AM–10AM: S1 + S2 ≥ 79 Total agents 10AM–12PM: S1 + S2 ≥ 65 Total agents 12PM–2PM: S1 + S2 + S3 ≥ 87 Total agents 2PM–4PM: S2 + S3 ≥ 64 Total agents 4PM–6PM: S3 + S4 ≥ 73 Total agents 6PM–8PM: S3 + S4 ≥ 82 Total agents 8PM–10PM: S4 ≥ 43 Total agents 10PM–12AM: S4 + S5 ≥ 52 Total agents 12AM–6AM: S5 ≥ 15 and Si ≥ 0 (for i = 1 to 5) McGraw-Hill/Irwin 3.20 © The McGraw-Hill Companies, Inc., 2008 Template for Cost-Benefit Tradoff Problems Activities Constraints Unit Cost cost per unit of act ivit y Benefit Achieved SUMPRODUCT (benefit per unit, changing cells) benefit achieved per unit of activity Level of Activity McGraw-Hill/Irwin Benefit Needed >= Total Cost SUMPRODUCT(cost per unit , changing cells) changing cells 3.21 © The McGraw-Hill Companies, Inc., 2008 Summary of Formulation Procedure for Cost-Benefit-Tradeoff Problems 1. Identify the activities for the problem at hand. 2. Identify an appropriate overall measure of performance (commonly cost). 3. For each activity, estimate the contribution per unit of the activity to the overall measure of performance. 4. Identify the benefits that must be achieved. 5. For each benefit, identify the minimum acceptable level and then the contribution of each activity to that benefit. 6. Enter the data in steps 3 and 5 into data cells. 7. Designate changing cells for displaying the decisions. 8. In the row for each benefit, use SUMPRODUCT to calculate the level achieved. Enter >= and the minimum acceptable level in two adjacent cells. 9. Designate a target cell. Use SUMPRODUCT to calculate this measure of performance. McGraw-Hill/Irwin 3.22 © The McGraw-Hill Companies, Inc., 2008 Types of Functional Constraints Type Resource constraint Benefit constraint Fixed-requirement constraint Form* Typical Interpretation Main Usage LHS ≤ RHS For some resource, Amount used ≤ Amount available Resource-allocation problems and mixed problems LHS ≥ RHS For some benefit, Level achieved ≥ Minimum Acceptable Cost-benefit-trade-off problems and mixed problems LHS = RHS For some quantity, Amount provided = Required amount Transportation problems and mixed problems * LHS = Left-hand side (a SUMPRODUCT function). RHS = Right-hand side (a constant). McGraw-Hill/Irwin 3.23 © The McGraw-Hill Companies, Inc., 2008 Continuing the Super Grain Case Study • David and Claire conclude that the spreadsheet model needs to be expanded to incorporate some additional considerations. • In particular, they feel that two audiences should be targeted — young children and parents of young children. • Two new goals – The advertising should be seen by at least five million young children. – The advertising should be seen by at least five million parents of young children. • Furthermore, exactly $1,490,000 should be allocated for cents-off coupons. McGraw-Hill/Irwin 3.24 © The McGraw-Hill Companies, Inc., 2008 Benefit and Fixed-Requirement Data Number Reached in Target Category (millions) Each TV Commercial Each Magazine Ad Each Sunday Ad Minimum Acceptable Level Young children 1.2 0.1 0 5 Parents of young children 0.5 0.2 0.2 5 Contribution Toward Required Amount Coupon redemption McGraw-Hill/Irwin Each TV Commercial Each Magazine Ad Each Sunday Ad Required Amount 0 $40,000 $120,000 $1,490,000 3.25 © The McGraw-Hill Companies, Inc., 2008 Spreadsheet Formulation B 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 C TV Spots 1,300 D Magazine Ads 600 E SS Ads 500 Ad Budget Planning Budget 300 90 Cost per Ad ($thousands) 150 30 Young Children Parents of Young Children 1.2 0.5 Exposures per Ad (thousands) Coupon Redemption per Ad ($thousands) Number of Ads Maximum TV Spots McGraw-Hill/Irwin F G H 100 40 Budget Spent 3,775 1,000 <= <= Budget Available 4,000 1,000 Number Reached per Ad (millions) 0.1 0 0.2 0.2 Total Reached 5 5.85 >= >= Minimum Acceptable 5 5 Total Redeemed 1,490 = Required Amount 1,490 TV Spots 0 Magazine Ads 40 SS Ads 120 TV Spots 3 <= 5 Magazine Ads 14 SS Ads 7.75 3.26 Total Exposures (thousands) 16,175 © The McGraw-Hill Companies, Inc., 2008 Algebraic Formulation Let TV = Number of commercials for separate spots on television M = Number of advertisements in magazines. SS = Number of advertisements in Sunday supplements. Maximize Exposure = 1,300TV + 600M + 500SS subject to Ad Spending: 300TV + 150M + 100SS ≤ 4,000 ($thousand) Planning Cost: 90TV + 30M + 30SS ≤ 1,000 ($thousand) Number of TV Spots: TV ≤ 5 Young children: Parents: 1.2TV + 0.1M ≥ 5 (millions) 0.5TV + 0.2M + 0.2SS ≥ 5 (millions) Coupons: 40M + 120SS = 1,490 ($thousand) and TV ≥ 0, M ≥ 0, SS ≥ 0. McGraw-Hill/Irwin 3.27 © The McGraw-Hill Companies, Inc., 2008 Template for Mixed Problems Activities Unit Profit or Cost profit/cost per unit of activity Resources Used SUMPRODUCT (resource used per unit, changing cells) Constraints resource used per unit of act ivit y Level of Activity McGraw-Hill/Irwin Resources Available <= Benefit Achieved SUMPRODUCT (benefit per unit, changing cells) benefit achieved per unit of activity Benefit Needed >= = Total Profit or Cost SUMPRODUCT(profit/cost per unit, changing cells) changing cells 3.28 © The McGraw-Hill Companies, Inc., 2008 The Big M Transportation Problem • The Big M Company produces a variety of heavy duty machinery at two factories. One of its products is a large turret lathe. • Orders have been received from three customers for the turret lathe. Question: How many lathes should be shipped from each factory to each customer? McGraw-Hill/Irwin 3.29 © The McGraw-Hill Companies, Inc., 2008 Some Data Shipping Cost for Each Lathe To Customer 1 Customer 2 Customer 3 From Output Factory 1 $700 $900 $800 12 lathes Factory 2 800 900 700 15 lathes Order Size 10 lathes 8 lathes 9 lathes McGraw-Hill/Irwin 3.30 © The McGraw-Hill Companies, Inc., 2008 The Distribution Network C1 10 lathes needed C2 8 lathes needed C3 9 lathes needed $700/lathe 12 lathe produced F1 $900/lathe $800/lathe $900/lathe $800/lathe 15 lathes produced F2 $700/lathe McGraw-Hill/Irwin 3.31 © The McGraw-Hill Companies, Inc., 2008 Spreadsheet Formulation 3 4 5 6 7 8 9 10 11 12 13 14 15 B Shipping Cost (per Lathe) Factory 1 Factory 2 Units Shipped Factory 1 Factory 2 Total To Customer Order Size McGraw-Hill/Irwin C D E Customer 1 $700 $800 Customer 2 $900 $900 Customer 3 $800 $700 Customer 1 10 0 10 = 10 Customer 2 2 6 8 = 8 3.32 Customer 3 0 9 9 = 9 F Total Shipped Out 12 15 G H = = Output 12 15 Total Cost $20,500 © The McGraw-Hill Companies, Inc., 2008 Algebraic Formulation Let Sij = Number of lathes to ship from i to j (i = F1, F2; j = C1, C2, C3). Minimize Cost = $700SF1-C1 + $900SF1-C2 + $800SF1-C3 + $800SF2-C1 + $900SF2-C2 + $700SF2-C3 subject to Factory 1: SF1-C1 + SF1-C2 + SF1-C3 = 12 Factory 2: SF2-C1 + SF2-C2 + SF2-C3 = 15 Customer 1: SF1-C1 + SF2-C1 = 10 Customer 2: SF1-C2 + SF2-C2 = 8 Customer 3: SF1-C3 + SF2-C3 = 9 and Sij ≥ 0 (i = F1, F2; j = C1, C2, C3). McGraw-Hill/Irwin 3.33 © The McGraw-Hill Companies, Inc., 2008 Sellmore Company Assignment Problem • The marketing manager of Sellmore Company will be holding the company’s annual sales conference soon. • He is hiring four temporary employees: – – – – • Ann Ian Joan Sean Each will handle one of the following four tasks: – – – – Word processing of written presentations Computer graphics for both oral and written presentations Preparation of conference packets, including copying and organizing materials Handling of advance and on-site registration for the conference Question: Which person should be assigned to which task? McGraw-Hill/Irwin 3.34 © The McGraw-Hill Companies, Inc., 2008 Data for the Sellmore Problem Required Time per Task (Hours) Temporary Employee Word Processing Graphics Packets Registrations Hourly Wage Ann 35 41 27 40 $14 Ian 47 45 32 51 12 Joan 39 56 36 43 13 Sean 32 51 25 46 15 McGraw-Hill/Irwin 3.35 © The McGraw-Hill Companies, Inc., 2008 Spreadsheet Formulation B 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 C D E F G H I J Task Required Time (Hours) Assignee Ann Ian Joan Sean Word Processing 35 47 39 32 Ann Ian Joan Sean Word Processing $490 $564 $507 $480 Graphics 41 45 56 51 Packets 27 32 36 25 Registrations 40 51 43 46 Packets $378 $384 $468 $375 Registrations $560 $612 $559 $690 Packets 1 0 0 0 1 = 1 Registrations 0 0 1 0 1 = 1 Hourly Wage $14 $12 $13 $15 Task Cost Assignee Graphics $574 $540 $728 $765 Task Assignment Ann Ian Joan Sean Total Assigned Assignee Demand McGraw-Hill/Irwin Word Processing 0 0 0 1 1 = 1 Graphics 0 1 0 0 1 = 1 3.36 Total Assignments 1 1 1 1 = = = = Supply 1 1 1 1 Total Cost $1,957 © The McGraw-Hill Companies, Inc., 2008 The Model for Assignment Problems Given a set of tasks to be performed and a set of assignees who are available to perform these tasks, the problem is to determine which assignee should be assigned to each task. To fit the model for an assignment problem, the following assumptions need to be satisfied: 1. 2. 3. 4. 5. The number of assignees and the number of tasks are the same. Each assignee is to be assigned to exactly one task. Each task is to be performed by exactly one assignee. There is a cost associated with each combination of an assignee performing a task. The objective is to determine how all the assignments should be made to minimize the total cost. McGraw-Hill/Irwin 3.37 © The McGraw-Hill Companies, Inc., 2008 Formulating an LP Spreadsheet Model • Enter all of the data into the spreadsheet. Color code (blue). • What decisions need to be made? Set aside a cell in the spreadsheet for each decision variable (changing cell). Color code (yellow with border). • Write an equation for the objective in a cell. Color code (orange with heavy border). • Put all three components (LHS, ≤/=/≥, RHS) of each constraint into three cells on the spreadsheet. • Some Examples: – – – – – Production Planning Diet / Blending Workforce Scheduling Transportation / Distribution Assignment McGraw-Hill/Irwin 3.38 © The McGraw-Hill Companies, Inc., 2008 LP Example #1 (Product Mix) The Quality Furniture Corporation produces benches and picnic tables. The firm has a limited supply of two resources: labor and wood. 1,600 labor hours are available during the next production period. The firm also has a stock of 9,000 pounds of wood available. Each bench requires 3 labor hours and 12 pounds of wood. Each table requires 6 labor hours and 38 pounds of wood. The profit margin on each bench is $8 and on each table is $18. Question: What product mix will maximize their total profit? McGraw-Hill/Irwin 3.39 © The McGraw-Hill Companies, Inc., 2008 Algebraic Formulation Let B = Number of benches to produce, T = Number of tables to produce. Maximize Profit = $8B + $18T subject to Labor: 3B + 6T ≤ 1,600 hours Wood: 12B + 38T ≤ 9,000 pounds and B ≥ 0, T ≥ 0. McGraw-Hill/Irwin 3.40 © The McGraw-Hill Companies, Inc., 2008 Spreadsheet Formulation 3 4 5 6 7 8 9 10 11 12 B C D Profit Benches $8 Tables $18 Resources Labor Wood Units Produced McGraw-Hill/Irwin Used per Unit Produced 3 6 12 38 161.90 185.71 3.41 E Total 1,600 9,000 F G <= <= Available 1,600 9,000 Total Cost $4,638.10 © The McGraw-Hill Companies, Inc., 2008 LP Example #2 (Diet Problem) A prison is trying to decide what to feed its prisoners. They would like to offer some combination of milk, beans, and oranges. Their goal is to minimize cost, subject to meeting the minimum nutritional requirements imposed by law. The cost and nutritional contents of each food, along with the minimum nutritional requirements are shown below. Milk (gallons) Navy Beans (cups) Oranges (large Calif. Valencia) Minimum Daily Requirement Niacin (mg) 3.2 4.9 0.8 13.0 Thiamin (mg) 1.12 1.3 0.19 1.5 32 0 93 45 2.00 0.20 0.25 Vitamin C (mg) Cost ($) Question: What should the diet for each prisoner be? McGraw-Hill/Irwin 3.42 © The McGraw-Hill Companies, Inc., 2008 Algebraic Formulation Let x1 = gallons of milk per prisoner, x2 = cups of beans per prisoner, x3 = number of oranges per prisoner. Minimize Cost = $2.00x1 + $0.20x2 + $0.25x3 subject to Niacin: 3.2x1 + 4.9x2 + 0.8x3 ≥ 13 mg Thiamin: 1.12x1 + 1.3x2 + 0.19x3 ≥ 1.5 mg Vitamin C: 32x1 + 93x3 ≥ 45 mg and x1 ≥ 0, x2 ≥ 0, x3 ≥ 0. McGraw-Hill/Irwin 3.43 © The McGraw-Hill Companies, Inc., 2008 Spreadsheet Formulation 3 4 5 6 7 8 9 10 11 12 13 B C D E Cost Milk (gal.) $2.00 Beans (cups) $0.20 Oranges $0.25 Niacin (mg) Thiamin (mg) Vitamin C (mg) Quantity (per prisoner) McGraw-Hill/Irwin Nutritional Contents (mg) 3.2 4.9 0.8 1.12 1.3 0.19 32 0 93 0 2.574 3.44 0.484 F Total 13 3.438 45 G H >= >= >= Minimum Requirement 13 1.5 45 Total Cost $0.64 © The McGraw-Hill Companies, Inc., 2008 George Dantzig’s Diet • Stigler (1945) “The Cost of Subsistence” – heuristic solution. Cost = $39.93. • Dantzig invents the simplex method (1947) – Stigler’s problem “solved” in 120 man days. Cost = $39.69. • Dantzig goes on a diet (early 1950’s), applies diet model: – ≤ 1,500 calories – objective: maximize (weight minus water content) – 500 food types • Initial solutions had problems – 500 gallons of vinegar – 200 bouillon cubes For more details, see July-Aug 1990 Interfaces article “The Diet Problem” McGraw-Hill/Irwin 3.45 © The McGraw-Hill Companies, Inc., 2008 Least-Cost Menu Planning Models in Food Systems Management • Used in many institutions with feeding programs: hospitals, nursing homes, schools, prisons, etc. • Menu planning often extends to a sequence of meals or a cycle. • Variety important (separation constraints). • Preference ratings (related to service frequency). • Side constraints (color, categories, etc.) • Generally models have reduced cost about 10%, met nutritional requirements better, and increased customer satisfaction compared to traditional methods. • USDA uses these models to plan food stamp allotment. For more details, see Sept-Oct 1992 Interfaces article “The Evolution of the Diet Model in Managing Food Systems” McGraw-Hill/Irwin 3.46 © The McGraw-Hill Companies, Inc., 2008 LP Example #3 (Scheduling Problem) An airline reservations office is open to take reservations by telephone 24 hours per day, Monday through Friday. The number of reservation agents needed for each time period is shown below. A union contract requires that all employees work 8 consecutive hours. Time Period Number of Agents Needed 12am – 4am 11 4am – 8am 15 8am – 12pm 31 12pm – 4pm 17 4pm – 8pm 25 8pm – 12am 19 Question: How many reservation agents should work each 8-hour shift? McGraw-Hill/Irwin 3.47 © The McGraw-Hill Companies, Inc., 2008 Algebraic Formulation Let x1 = agents who work 12am – 8am, x2 = agents who work 4am – 12pm, x3 = agents who work 8am – 4pm, x4 = agents who work 12pm – 8pm, x5 = agents who work 4pm – 12am, x6 = agents who work 8pm – 4am. Minimize Number of agents = x1 + x2 + x3 + x4 + x5 + x6 subject to 12am–4am: x1 + x6 ≥ 11 4am–8am: x1 + x2 ≥ 15 8am–12pm: x2 + x3 ≥ 31 12pm–4pm: x3 + x4 ≥ 17 4pm–8pm: x4 + x5 ≥ 25 8pm–12am: x5 + x6 ≥ 19 and x1 ≥ 0, x2 ≥ 0, x3 ≥ 0, x4 ≥ 0, x5 ≥ 0, x6 ≥ 0. McGraw-Hill/Irwin 3.48 © The McGraw-Hill Companies, Inc., 2008 Spreadsheet Formulation A 1 2 3 4 5 6 7 8 9 10 11 B C D E F G H Shift 12am - 8am 4am - 12pm 8am - 4pm 12pm - 8pm 4pm - 12am 8pm - 4am Total Number Working 0 15 16 17 8 11 67 Reservation Agents Scheduling Problem Time Period 12am Š 4am 4am Š 8am 8am Š 12pm 12pm Š 4pm 4pm Š 8pm 8pm Šลน12am McGraw-Hill/Irwin Number Working 11 15 31 33 25 19 >= >= >= >= >= >= Minimum Required 11 15 31 17 25 19 3.49 © The McGraw-Hill Companies, Inc., 2008 Workforce Scheduling at United Airlines • United employs 5,000 reservation and customer service agents. • Some part-time (2-8 hour shifts), some full-time (8-10 hour shifts). • Workload varies greatly over day. • Modeled problem as LP: – Decision variables: how many employees of each shift length should begin at each potential start time (half-hour intervals). – Constraints: minimum required employees for each half-hour. – Objective: minimize cost. • Saved United about $6 million annually, improved customer service, still in use today. For more details, see Jan-Feb 1986 Interfaces article “United Airlines Station Manpower Planning System” McGraw-Hill/Irwin 3.50 © The McGraw-Hill Companies, Inc., 2008 LP Example #4 (Transportation Problem) A company has two plants producing a certain product that is to be shipped to three distribution centers. The unit production costs are the same at the two plants, and the shipping cost per unit is shown below. Shipments are made once per week. During each week, each plant produces at most 60 units and each distribution center needs at least 40 units. Distribution Center Plant 1 2 3 A $4 $6 $4 B $6 $5 $2 Question: How many units should be shipped from each plant to each distribution center? McGraw-Hill/Irwin 3.51 © The McGraw-Hill Companies, Inc., 2008 Algebraic Formulation Let xij = units to ship from plant i to distribution center j (i = A, B; j = 1, 2, 3), Minimize Cost = $4xA1 + $6xA2 + $4xA3 + $6xB1 + $5xB2 + $2xB3 subject to Plant A: xA1 + xA2 + xA3 ≤ 60 Plant B: xB1 + xB2 + xB3 ≤ 60 Distribution Center 1: xA1 + xB1 ≥ 40 Distribution Center 2: xA2 + xB2 ≥ 40 Distribution Center 3: xA3 + xB3 ≥ 40 and xij ≥ 0 (i = A, B; j = 1, 2, 3). McGraw-Hill/Irwin 3.52 © The McGraw-Hill Companies, Inc., 2008 Spreadsheet Formulation B 3 4 5 6 7 8 9 10 11 12 13 14 15 Cost Plant A Plant B Shipment Quantities Plant A Plant B Shipped Needed McGraw-Hill/Irwin C D E Distribution Center 1 $4 $6 Distribution Center 2 $6 $5 Distribution Center 3 $4 $2 Distribution Center 1 40 0 40 >= 40 Distribution Center 2 20 20 40 >= 40 Distribution Center 3 0 40 40 >= 40 3.53 F Shipped 60 60 Cost G H Available <= 60 <= 60 = $460 © The McGraw-Hill Companies, Inc., 2008 Distribution System at Proctor and Gamble • Proctor and Gamble needed to consolidate and re-design their North American distribution system in the early 1990’s. – – – – 50 product categories 60 plants 15 distribution centers 1000 customer zones • Solved many transportation problems (one for each product category). • Goal: find best distribution plan, which plants to keep open, etc. • Closed many plants and distribution centers, and optimized their product sourcing and distribution location. • Implemented in 1996. Saved $200 million per year. For more details, see 1997 Jan-Feb Interfaces article, “Blending OR/MS, Judgement, and GIS: Restructuring P&G’s Supply Chain” McGraw-Hill/Irwin 3.54 © The McGraw-Hill Companies, Inc., 2008 LP Example #5 (Assignment Problem) The coach of a swim team needs to assign swimmers to a 200-yard medley relay team (four swimmers, each swims 50 yards of one of the four strokes). Since most of the best swimmers are very fast in more than one stroke, it is not clear which swimmer should be assigned to each of the four strokes. The five fastest swimmers and their best times (in seconds) they have achieved in each of the strokes (for 50 yards) are shown below. Backstroke Breaststroke Butterfly Freestyle Carl 37.7 43.4 33.3 29.2 Chris 32.9 33.1 28.5 26.4 David 33.8 42.2 38.9 29.6 Tony 37.0 34.7 30.4 28.5 Ken 35.4 41.8 33.6 31.1 Question: How should the swimmers be assigned to make the fastest relay team? McGraw-Hill/Irwin 3.55 © The McGraw-Hill Companies, Inc., 2008 Algebraic Formulation Let xij = 1 if swimmer i swims stroke j; 0 otherwise tij = best time of swimmer i in stroke j Minimize Time = ∑ i ∑ j tij xij subject to each stroke swum: ∑ i xij = 1 for each stroke j each swimmer swims 1: ∑ j xij ≤ 1 for each swimmer i and xij ≥ 0 for all i and j. McGraw-Hill/Irwin 3.56 © The McGraw-Hill Companies, Inc., 2008 Spreadsheet Formulation 3 4 5 6 7 8 9 B C D E F Best Times Backstroke 37.7 32.9 33.8 37.0 35.4 Breastroke 43.4 33.1 42.2 34.7 41.8 Butterfly 33.3 28.5 38.9 30.4 33.6 Freestyle 29.2 26.4 29.6 28.5 31.1 Backstroke 0 0 1 0 0 1 = 1 Breastroke 0 0 0 1 0 1 = 1 Butterfly 0 1 0 0 0 1 = 1 Freestyle 1 0 0 0 0 1 = 1 Carl Chris David Tony Ken G H I 10 11 12 13 14 15 16 17 18 19 Assignment Carl Chris David Tony Ken McGraw-Hill/Irwin 3.57 1 1 1 1 0 Time <= 1 <= 1 <= 1 <= 1 <= 1 = 126.2 © The McGraw-Hill Companies, Inc., 2008