Lp.formulation

23
Linear Programming Agenda 1. Forecasting projects due 2. Interfaces presentations 3. Plan for manufacturing chairs and tables using Legos (legoexercise.ppt) 4. Formulate the problem algebraically (Page 4) Variable definition Objective Linearity Proportionality (see Pages 11 – 17 for bad proportionality) Additivity Constraints Linearity Proportionality Additivity Nonnegativity 5. Solve using QM for Windows (displayed in QM and on Page 5) Solution Variable values Total Profit Dual Values Ranging Table (page 5 – 7) Constraints Dual values & range (upper and lower bounds) Slack Objective Reduced cost Objective function ranging (upper and lower bounds) Graph 6. Possible outcomes Unique solution (original example) Multiple solutions (change profit from 17 to 20) document.doc Page 1

description

Linear Programming interpretation

Transcript of Lp.formulation

Page 1: Lp.formulation

Linear ProgrammingAgenda

1. Forecasting projects due

2. Interfaces presentations

3. Plan for manufacturing chairs and tables using Legos (legoexercise.ppt)

4. Formulate the problem algebraically (Page 4)Variable definitionObjective

LinearityProportionality (see Pages 11 – 17 for bad proportionality)Additivity

ConstraintsLinearity

ProportionalityAdditivity

Nonnegativity

5. Solve using QM for Windows (displayed in QM and on Page 5)Solution

Variable valuesTotal ProfitDual Values

Ranging Table (page 5 – 7)Constraints

Dual values & range (upper and lower bounds)Slack

ObjectiveReduced costObjective function ranging (upper and lower bounds)

Graph

6. Possible outcomesUnique solution (original example)Multiple solutions (change profit from 17 to 20)Unbounded solution (change <= constraints to >= constraints)No feasible solution (add constraint # tables >=10)

7. More examples (pages 8-10)

document.doc Page 1

Page 2: Lp.formulation

Overview of next five chapters and next four lectures

For the next three weekends we will be talking about optimization models. Chapters 7, 8 and 9 present linear programming. Chapter 7 introduces linear programming and explains how to solve a problem graphically. Since we use software to solve problems our main concern is with the formulation and structure of linear programming. Thus you should pay particular attention to sections 7.1, 7.2 & 7.3. Chapter 8 contains a very wide set of examples of how linear programming models can be used. Through the examples and the homework problems in this chapter you will hopefully appreciate the usefulness of linear programming. Chapter 9, which is not on the syllabus, contains the algebraic solution method for solving linear programming problems. Since we use software we are not interested in this chapter. Chapter 10 contains two special cases of linear programming models – the transportation model and the assignment model. Finally, Chapter 11 contains integer models that look identical to linear programs but have computational difficulties that need to be explained.

Assignments

The only way to both learn how to formulate linear programs and to appreciate the wide variety of problems that can be approached using linear programming is to formulate as many problems as possible. Chapter 7 has relatively simple formulations. Our main interest is in Chapter 8, which presents many of the applications of linear programming.

In addition to being able to formulate linear programs so that they can be solved it is important to understand the meaning and understanding of the complete solution. The book discusses this in the chapter but I think you will find this week’s lecture and the materials I have posted to be clearer than the textbook. You have an individual assignment and a team assignment due for me that will help you to learn about the interpretation of the results.

In order to keep the workload reasonable, I am splitting up the formulations over several weeks as shown below. Formulate each of the problems listed below. As a partial check of your formulation, you should solve the problem and see if the answers seem reasonable. I do not collect homework but looking at these problems will give you an appreciation of the wide variety of problems for which linear programming is useful.

Also, please note that the bulk of the homework over the coming weeks is represented by the problems below but that additional homework will be assigned in the coming weeks. These problems represent only the formulations.

It is quite possible (maybe even likely) that some of these formulations will give you trouble. However, for each of these problems you should be able to identify the (decision) variables. Limit your formulation work (no more than 15 minutes per problem) but be sure that even if you can not derive the algebraic formulation that you are very familiar with the problems in order that the posted solution will be meaningful.

document.doc Page 2

Page 3: Lp.formulation

Due AssignmentSun (Feb 6) Chapter 7, problems 14, 15, 16, 17, 18, 19, 20, 21, 25 Sun (Feb 6) First (individual) Linear Program interpretation is due (by email by 8pm)

Fri Feb 11 Be sure Excel’s Solver is an option underTools in Excel 2003 and on the Data tab in Excel 2007/2010. We will be using Solver in our next class.

Sun (Feb 20) Chapter 8, problems 1, 2, 3, 4, 5 (LP or Assignment), 6, 7Sun (Feb 20) Second (team) linear programming interpretation is due (by email by 8pm)Sat Feb 26 Chapter 8, problems 8, 9 (LP or transportation), 10, 11, 12, 13, 14Sat Feb 26 Chapter 8, problems 15, 16, (17), 18, 19, 21, 22, 23

Reminder: No more than 15 minutes per problem.

document.doc Page 3

Page 4: Lp.formulation

Linear Programming Formulation Examples

Example 1: Resource Allocation/Product Mix

A furniture manufacturer produces chairs and tables from the same raw materials - small blocks and large blocks. The resource requirements for each product and the total resources available are as follows:

Resources/unit Small blocks Large blocks

Chair 2 1

Table 2 2

AVAILABLE (per day) 8 6

Each chair produced results in a profit of $10, and each table earns $17 in profit. Determine the number of chairs and tables to produce each week in order to maximize profit.

document.doc Page 4

Page 5: Lp.formulation

Output screens from QM for Windows

Linear Programming Results Screen

  Tables Chairs RHS DualMaximize 17 10      Small 2 2 <= 8 1.5Large 2 1 <= 6 7Solution-> 2 2   54  

Ranging Screen

Variable Value Reduced Cost Original Val Lower Bound Upper BoundTables 2 tables $0 $17 $10 $20Chairs 2 chairs $0 $10 $8.5 $17Constraint Dual Value Slack/Surplus Original Val Lower Bound Upper BoundSmall $1.5 0 small blocks 8 small blocks 6 small blocks 12 small blocksLarge $7 0 large blocks 6 large blocks 4 large blocks 8 large blocks

Revised Profit on Tables

Linear Programming Results Screen

  Tables Chairs RHS DualMaximize 21 10      Small 2 2 <= 8 0Large 2 1 <= 6 10.5Solution-> 3 0   63  

Ranging Screen

Variable ValueReduced Cost

Original Val

Lower Bound

Upper Bound

Tables 3 0 21 20 InfinityChairs 0 0.5 10 =-Infinity 10.5

ConstraintDual Value

Slack/Surplus

Original Val

Lower Bound

Upper Bound

Small 0 2 8 6 InfinityLarge 10.5 0 6 0 8

document.doc Page 5

Page 6: Lp.formulation

Output screens from QM for Windows

Linear Programming Results Screen

  Tables Chairs RHS DualMaximize 17 10      Small 2 2 <= 8 1.5Large 2 1 <= 6 7Solution-> 2 2   54  make 2 tables and 2 chairs Total profit is 54

Ranging Screen

Variable ValueReduced Cost

Original Val

Lower Bound

Upper Bound

Tables 2 0 17 10 20 Note: Total profit does not appear in the Chairs 2 0 10 8.5 17 ranging table but can be computed by

ConstraintDual Value

Slack/Surplus

Original Val

Lower Bound

Upper Bound multiplying the values*original profits and

Small 1.5 0 8 6 12summing. 54    

Large 7 0 6 4 8 =SUMPRODUCT(B15:B16,D15:D16)

The reduced costs apply only to items we should NOT make. Since we should make tables and chairs theydo not apply here.                If the profit per unit on the table is between $10 and $20 and the profit per unit remains the same for the chairs then our product mix (2 tables, 2 chairs) should not change. (The total profit would change).  Similarly, if the profit per unit on the chair is between $8.50 and $17 and the profit per unit remains the samefor the tables then our product mix (2 tables, 2 chairs) should not change. (The total profit would change). If we had one MORE small block our profit would INCREASE by $1.5 (to $55.5)If we had one LESS small block our profit would DECREASE by $1.5 (to $53.5)The above statements holds true for a total number of small blocks between 6 and 12. Since we started with 8 blocks the statements hold for an increase of 4 (12-8) small blocks or a decrease of 2 (8-6)small blocksIf we had one MORE large block our profit would INCREASE by $7 (to $61)  If we had one LESS large block our profit would DECREASE by $7 (to $$47)The above statements holds true for a total number of large blocks between 4 and 8 Since we started with 6 blocks the statements hold for an increase of 2 (8-6) large blocks or a decrease of 2 (6-4) large blocksWe have no remaining small or large blocks. That is, we use all of the materials to make the products.

document.doc Page 6

Page 7: Lp.formulation

Lego revised

Output screens from QM for Windows

Linear Programming Results Screen

  Tables Chairs RHS DualMaximize 21 10      Small 2 2 <= 8 0Large 2 1 <= 6 10.5Solution-> 3 0   63  make 3 tables and 0 chairs Total profit is 63

Ranging Screen

Variable ValueReduced Cost

Original Val

Lower Bound

Upper Bound

Tables 3 0 21 20 Infinity Note: Total profit does not appear in the Chairs 0 0.5 10 =-Infinity 10.5 ranging table but can be computed by

ConstraintDual Value

Slack/Surplus

Original Val

Lower Bound

Upper Bound multiplying the values*original profits and

Small 0 2 8 6 Infinitysumming. 63    

Large 10.5 0 6 0 8 That is, 21*3 +10*0    

The reduced cost does not apply to tables but for chairs the meaning is that if we make a chair (even thoughwe should not) our profit will be reduced by $.50          If the profit per unit on the table is $20 or higher and the profit per unit remains the same for the chairs then our product mix (3 tables, 0 chairs) should not change. (The total profit would change).  Similarly, if the profit per unit on the chair is less than $10.50 and the profit per unit remains the samefor the tables then our product mix (3 tables, 0 chairs) should not change. (The total profit would change). We have 2 small blocks left over. If we had one more small block our profit would not change.Since we have 2 small blocks left over we could get rid of the 2 (8-6) blocks and our profit would not changeThe above statements holds true for a total number of small blocks greater than or equal to 6.  We have no remaining large blocks.        If we had one more large block our profit would INCREASE by $10.50 (to $74.50)If we had one less large block our profit would DECREASE by $10.50 (to $52.50)The above statements holds true for a total number of large blocks between 0 and 8. Since we started with 6 blocks the statements hold for an increase of 2 (8-6) large blocks or a decrease of 6 (6-0) largel blocks

document.doc Page 7

Page 8: Lp.formulation

Example 2: Diet problem

Andy Reid has decided to trim down and is about to begin the Fourth and 15 diet. In this diet one should eat only Oatmeal, Pasta, Peanut Butter and Green Beans. His doctors have told him that to maintain his stamina he should be sure to have 100% of the minimum daily requirements of four nutrients – Protein, Iron, Fiber and Niacin. The calories and nutrients according to http://www.nutritiondata.com are listed on the next page. An adult male should have at least 40 grams of protein per day. (e.g., see http://www.indoorclimbing.com/Protein_Requirement.html) In addition, to the requirements Andy insists on having at least one serving of peanut butter per day and on not having more servings of green beans than servings of pasta.

How many servings of each food should Coach Reid eat in order to meet the minimum daily requirements with a minimum total number of calories?

document.doc Page 8

Page 9: Lp.formulation

Oatmeal Pasta

Peanut Butter Green Beans

document.doc Page 9

Page 10: Lp.formulation

Example 3 – Advertising (including ratios)

A manager of a store is attempting to decide on the types and amounts of advertising to purchase each week. Given below is the information about the three types of ads.

Television Newspaper Radio

Male Reach 10,000 6,000 6,000

Female Reach 15,000 4,000 9,000

Cost per ad $15,000 $4,000 $6,000

The store has the following policy:

a. Reach at least 200,000 customers b. Use at least twice as many newspaper ads as radio commercials.c. Make sure that at least 30% of the audience is women.

Available space limits the number of newspaper ads to 10.

1. Formulate the problem as a linear program.a. Define the (decision) variablesb. Define the objective functionc. Define the constraintsd. Remember the non-negativity restrictions

2. Use software to find the optimal number of each type of ads that minimizes total cost.3. Interpret the ranging table. 4. (Formulate the problem in Excel)

document.doc Page 10

Page 11: Lp.formulation

Examples of Lack of Proportionality

Bad MathJack’s Restaurant and BarLancer’s DinerU.S. Food and Drug Administration

SalesBest Buy

document.doc Page 11

Page 12: Lp.formulation

document.doc Page 12

Page 13: Lp.formulation

document.doc Page 13

Check prices of tapas platters

Page 14: Lp.formulation

/

document.doc Page 14

Check prices of juices

Page 15: Lp.formulation

document.doc Page 15

Page 16: Lp.formulation

document.doc Page 16

Page 17: Lp.formulation

document.doc Page 17