solving linear programming models

31
Solving Linear Programming Models

Upload: libba

Post on 05-Jan-2016

42 views

Category:

Documents


1 download

DESCRIPTION

Solving Linear Programming Models. Topics. Computer Solution Sensitivity Analysis. Product mix problem - Beaver Creek Pottery Example (1 of 2). Product mix problem - Beaver Creek Pottery Company - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Solving Linear Programming Models

Solving Linear Programming

Models

Page 2: Solving Linear Programming Models

Topics

Computer Solution

Sensitivity Analysis

Page 3: Solving Linear Programming Models

Product mix problem - Beaver Creek Pottery Example (1 of 2)

Product mix problem - Beaver Creek Pottery Company How many bowls and mugs should be produced to maximize

profits given labor and materials constraints? Resource Availability: 40 hrs of labor per day (labor

constraint) 120 lbs of clay (material constraint)

Resource Requirements

ProductLabor

(Hr./Unit)Clay

(Lb./Unit)Profit($/Unit)

Bowl 1 4 40

Mug 2 3 50

Page 4: Solving Linear Programming Models

Product mix problem - Beaver Creek Pottery Example (2 of 2)

Complete Linear Programming Model:

x1 = number of bowls to produce per day x2 = number of mugs to produce per day

Maximize Z = $40x1 + $50x2

subject to: 1x1 + 2x2 404x2 + 3x2 120x1, x2 0

Page 5: Solving Linear Programming Models

Beaver Creek Pottery ExampleExcel Spreadsheet – Data Screen (1 of 5) Click on “Data”

tab to invoke “Solver.”

=C6*B10+D6*B11 =G6-E6

=G7-E7

=C7*B10+D7*B11

Decision variable—bowls (x1)=B10; mugs (x2)=B11Objective

function =C4*B10+D4*B11

Page 6: Solving Linear Programming Models

Beaver Creek Pottery Example“Solver” Parameter Screen (2 of 5)

Solver parameters

Objective function

Decision variables Click on “Add”

to add model contraints.

=C6*B10+D6*B11<40

=C7*B10+D7*B11<20

x1, x2 >0

Select “Simplex LP” method

Page 7: Solving Linear Programming Models

Labor constraint

Beaver Creek Pottery ExampleAdding Model Constraints (3 of 5)

=C6*B10+D6*B11

=40

Page 8: Solving Linear Programming Models

Beaver Creek Pottery Example“Solver” Settings (4 of 5)

Solution screen

Slack S1 = 0and S2 = 0

Slack—S1=0 and S2=0

Page 9: Solving Linear Programming Models

Answer report

Beaver Creek Pottery ExampleSolution Screen (5 of 5)

Page 10: Solving Linear Programming Models

Maximize Z = $40x1 + $50x2

subject to: x1 + 2x2 40 4x1 + 3x2 120

x1, x2 0

Optimal solution

point

Beaver Creek Pottery ExampleGraphical Solution

Page 11: Solving Linear Programming Models

Sensitivity analysis determines the effect on the optimal solution of changes in parameter values of the objective function and constraint equations.

Changes may be reactions to anticipated uncertainties in the parameters or to new or changed information concerning the model.

Sensitivity Analysis

Page 12: Solving Linear Programming Models

The sensitivity range for an objective function coefficient is the range of values over which the current optimal solution point will remain optimal.

Objective Function CoefficientSensitivity Range

objective function Z = $40x1 + $50x2 sensitivity range for:

x1: 25 c1 66.67 x2: 30 c2 80

Page 13: Solving Linear Programming Models

Solver results screen

Objective Function Coefficient RangesExcel “Solver” Results Screen

Page 14: Solving Linear Programming Models

Objective Function Coefficient RangesBeaver Creek Example Sensitivity Report

Sensitivity ranges for objective function coefficients

sensitivity range for:x1: 25 c1 66.67 x2: 30

c2 80

Page 15: Solving Linear Programming Models

Changes in Constraint Quantity ValuesSensitivity Range

The sensitivity range for a right-hand-side value is the range of values over which the quantity’s value can change without changing the solution variable mix, including the slack variables.

Recall the Beaver Creek Pottery example. Maximize Z = $40x1 + $50x2 subject to:

x1 + 2x2 40 hr of labor4x1 + 3x2 120 lb of clay

x1, x2 0

Page 16: Solving Linear Programming Models

Constraint Quantity Value Ranges by ComputerExcel Sensitivity Range for Constraints

Sensitivity ranges for constraint quantity values

the sensitivity range for the labor hours q1 is 30 ≤q1 ≤80 hr.

the sensitivity range for clay quantity q2 is 60≤ q2 ≤160 lb.

Page 17: Solving Linear Programming Models

Maximize Z = $40x1 + $50x2 subject to: x1 + 2x2 40 hr of labor4x1 + 3x2 120 lb of clay

x1, x2 0

Excel Sensitivity Report for Beaver Creek PotteryShadow Prices Example

Shadow prices (dual values)

The shadow price (or marginal value) for labor is $16 per hour, and the shadow price for clay is $6 per pound. This means that for every additional hour of labor that can be obtained, profit will increase by $16 and for every additional lb of clay the profit increases by $6. The upper limit of the sensitivity range for the labor & clay are 80 hours & 160 lb and the lower limits are 30 hours & 60 lb, before the optimal solution mix changes.

Page 18: Solving Linear Programming Models

Shadow price is also called as the marginal value of one additional unit of resource.

The sensitivity range for a constraint quantity value is also the range over which the shadow price is valid.

Duality (Shadow Prices)

With every linear programming problem, there is associated another linear programming problem which is called the dual of the original (or the primal) problem.

Page 19: Solving Linear Programming Models

The Primal-Dual Relationship

Page 20: Solving Linear Programming Models

Primal and Dual problems for Beaver

Creek Pottery Example Primal Problem

Maximize Z = $40x1 + $50x2 subject to:

x1 + 2x2 40 4x1 + 3x2 120

x1, x2 0

Dual Problem

Minimize P = 40y1 + 120y2 subject to:

y1 + 4y2 ≥ 40 2y1 + 3y2 ≥ 50

y1, y2 0

Page 21: Solving Linear Programming Models

Flair Furniture CompanyThe Flair Furniture Company produces tables and chairs. The production process for each is similar in that both require a certain number of hours of carpentry work and a certain number of labor hours in the painting and varnishing department. Each table takes 4 hours of carpentry and 2 hours in the painting and varnishing shop. Each chair requires 3 hours in carpentry and 1 hour in painting and varnishing. During the current production period, 240 hours of carpentry time are available and 100 hours in painting and varnishing time are available. Each table sold yields a profit of $70; each chair produced is sold for a $50 profit.Formulate the LP Model.Solve the model graphically.Solve this model by using Excel.

Page 22: Solving Linear Programming Models

Flair Furniture CompanyT = number of tables to be produced per weekC = number of chairs to be produced per week

Maximize profit Z= $70T + $50Csubject to the constraints4T + 3C ≤ 240 (carpentry constraint)2T + 1C ≤ 100 (painting and varnishing constraint)T, C ≥0 (non-negativity constraints)

Page 23: Solving Linear Programming Models

Flair Furniture Company- Solver Solution

Target Cell (Max)Cell Name Original Value Final Value

$B$12 Profit= 0 4100

Adjustable CellsCell Name Original Value Final Value

$B$10 Tables= 0 30$B$11 Chairs= 0 40

ConstraintsCell Name Cell Value Formula Status Slack

$E$6 Carpentry Usage 240$E$6<=$G$6 Binding 0$E$7 Painting Usage 100$E$7<=$G$7 Binding 0

Page 24: Solving Linear Programming Models

Sensitivity Report

sensitivity range for T: 66.7 c1 100 C: 35 c2 52.5The sensitivity range for the carpentry hours q1 is 200 ≤q1 ≤ 300The sensitivity range for painting hours q2 is 80≤ q2 ≤120

The shadow price (or marginal value) for carpentry is $15 per hour, and the shadow price for painting is $5 per hour. This means that for every additional hour of carpentry that can be obtained, profit will increase by $15 and for every additional hour of painting the profit increases by $5.

Adjustable Cells    Final Reduced Objective Allowable Allowable

Cell Name Value Cost Coefficient Increase Decrease$B$10 Tables= 30 0 70 30

3.333333333

$B$11 Chairs= 40 0 50 2.5 15

Constraints    Final Shadow Constraint Allowable Allowable

Cell Name Value Price R.H. Side Increase Decrease

$E$6Carpentry Usage 240 15 240 60 40

$E$7 Painting Usage 100 5 100 20 20

Page 25: Solving Linear Programming Models

Transportation Problem – 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. 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.

Page 26: Solving Linear Programming Models

Demand & SupplyEach warehouse has the following supply of televisions available for shipment each month:Warehouse Supply (sets)1. Cincinnati 3002. Atlanta 2003. Pittsburgh 200

700Each retail store has the following monthly demand for television sets:Store Demand (sets)A. New York 150B. Dallas 250C. Detroit 200

600

Page 27: Solving Linear Programming Models

Cost MatrixCosts of transporting television sets from the warehouses to the retail stores vary as a result of differences in modes of transportation and distances. The shipping cost per television set for each route is as follows:

To StoreFromWarehouse A B C

1 $16 $18 $112 14 12 133 13 15 17

Page 28: Solving Linear Programming Models

Model Summaryminimize Z = $16x1A + 18x1B + 11x1C + 14x2A + 12x2B + 13x2C + 13x3A + 15x3B + 17x3Csubject to

The transportation model can also be optimally solved by Linear Programming

Page 29: Solving Linear Programming Models

Computer Solution with Excel

Page 30: Solving Linear Programming Models

Computer Solution with Excel

Page 31: Solving Linear Programming Models

Computer Solution with Excel

The solution isx1C = 200 TVs shipped from Cincinnati to Detroitx2B = 200 TVs shipped from Atlanta to Dallasx3A = 150 TVs shipped from Pittsburgh to New Yorkx3B = 50 TVs shipped from Pittsburgh to DallasZ = $7,300 shipping cost