1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of...

33
1 The Dual in Linear Programming In LP the solution for the profit-maximizing combination of outputs automatically determines the input amounts that must be used in the production process.

Transcript of 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of...

Page 1: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

11

The Dual in Linear Programming

In LP the solution for the profit-maximizing combination of outputs automatically determines the input amounts that must be used in the production process.

Page 2: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

22

If the optimal output combination, suggested by the LP solution, uses up all available inputs, we say that the capacity constraints are binding.

Page 3: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

33

Under this condition, any reduction/increase in the use of inputs will reduce/increase the firm’s profits.

marginal opportunity cost of using the inputHow much profit do we lose not having one more unit of an input?

Page 4: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

44

Finding the Opportunity Costs

For every maximization problem in LP there exists a symmetrical minimization problem and vice versa

The problems are called the primal problem and the dual problem

Page 5: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

55

Primal Problem and Dual Problem

optimal solutions for these two problems are always the same

objective of the dual problem is to find shadow prices (= dual prices)

shadow prices can be used to decide whether the firm should employ an additional unit of a resource or not

Page 6: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

66

Primal Problem

Gross profit:

Max GP = 50X + 30Y

st. 5X + 2Y 220

3X + 2Y 180

X, Y 0

Dual Problem*

Total opportunity cost:Min C = 220a + 180p st. 5a + 3p 50

2a + 2p 30 a, p 0

Production Data for the Making of PCs and Printers by A-1 CloneAssembly time Packaging timeper unit (hr.) per unit (hr.) Number of items Profit

(site 1) (site 2) to be made per unitPCs 5 3 X $50

Printers 2 2 Y $30

Labor available 220 hours 180 hoursfor production

Example: Primal and Its Dual

*John von Neumann proved the Duality Theorem

Page 7: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

77

Coefficient matrix of a dual problem is a transpose of the primal’s coefficient matrix

a = opportunity cost of using an additional unit of labor for the assembly of PCs and printers

p = opportunity cost of using an additional unit of labor for the packaging of PCs and printers

C 180 220

30 2 2

50 3 5

GP 30 50

180 2 3

220 2 5 X Y RHS a p RHS

Page 8: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

88

The solution for the above problem is:

GP = 2800, X = 20 and Y = 60

a = 2.50 and p = 12.50

Page 9: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

99

Linear Programming: Sensitivity Analysis

Postoptimality analysis

Sensitivity analysis is the study of how changes

in the coefficients of a linear program affect the optimal solution

or in the value of right hand sides of

the problem affect the optimal solution

Page 10: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

1010

Sensitivity Analysis continued

Using sensitivity analysis we can answer questions such as:

1. How will a change in a coefficient of the objective function affect the optimal solution?

We can define a range of optimality for each objective function coefficient by changing the objective function coefficients, one at a time

Page 11: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

1111

Sensitivity Analysis continued

2. How will a change in the right-hand-side value for a constraint affect the optimal solution?

The feasible region may change when RHSs (one at a time) are changed and perhaps cause a change in the optimal solution to the problem

Page 12: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

1212

■ Sensitivity analysis is important since real world problems exist in a changing environment:

prices of raw materials change, product demand changes, new machinery is bought to replace old, stock prices fluctuate, employee turnover occurs, etc.

we can expect some of the coefficients to change over time

Sensitivity analysis can also be used to determine which coefficients are crucial

Page 13: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

1313

Graphical Sensitivity Analysis

1. Change in the slope of the objective function (change in the coefficients of the objective function)

The shaded region defines the range in which the objective function coefficients can vary without changing the optimal solution for the problem:

the output combination does not change but the value of the objective function naturally changes…

Page 14: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

1414

Page 15: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

1515

Graphical Sensitivity Analysis continued

2. Changing the right-hand-side of a constraint

The shaded region is an increase in the feasible set resulting from a change in the RHS of one of the constraints:

increasing the availability of one input (resource)

Page 16: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

1616

Page 17: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

1717

Interpretation of Computer Output

We will use Solver with Excel to solve LP-problems

On the spreadsheet after using Solver we can find the optimal value for the objective function and the decision variable values associated with this particular solution, as well as the right-hand-side values for the constraints

Page 18: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

1818

An Example: What to Plant?

A farmer owns a 100 acre farm

He plans to plant at most three crops. The seed for crop A, B, and C cost $40, $20, and $30 per acre, respectively

A maximum of $3,200 can be spent on seed

Crop A, B, and C require 1, 2, and 1 workdays per acre, respectively, and there are a maximum of 160 workdays available

If the farmer can make a profit of $100 per acre on crop A, $300 per acre on crop B, and $200 per acre on crop C, how many acres of each crop should be planted to maximize profit?

Page 19: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

1919

Excel Spreadsheet with Solver

What to plant?

Decision variables A B C0 60 40

Objective function 100 300 200 26000 RHSConstraint Budget 40 20 30 2400 <= 3200

Labor 1 2 1 160 <= 160Land 1 1 1 100 <= 100

Page 20: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

2020

More detailed information about the solution can be found on the Answer and Sensitivity Reports:

Slack tells how much, if any, of a resource has been left unused

Reduced Costs indicate how much the objective function coefficient of each decision variable would have to improve before it would be possible for that variable to assume a positive value in the optimal solution

Page 21: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

2121

Worksheet: [LP-wine.xls]Sheet2Report Created: 4.2.2001 12:26:13

Target Cell (Max)Cell Name Original Value Final Value

$F$5 Objective function 0 26000

Adjustable CellsCell Name Original Value Final Value

$C$4 A 0 0$D$4 B 0 60$E$4 C 0 40

ConstraintsCell Name Cell Value Formula Status Slack

$F$6 Constraint Budget 2400 $F$6<=$H$6 Not Binding 800$F$7 Labor 160 $F$7<=$H$7 Binding 0$F$8 Land 100 $F$8<=$H$8 Binding 0

Page 22: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

2222

Microsoft Excel 8.0e Sensitivity ReportWorksheet: [LP-wine.xls]Sheet2Report Created: 4.2.2001 12:26:13

Adjustable CellsFinal Reduced Objective Allowable Allowable

Cell Name Value Cost Coefficient Increase Decrease$C$4 A 0 -100 100 100 1E+30$D$4 B 60 0 300 100 100$E$4 C 40 0 200 100 50

ConstraintsFinal Shadow Constraint Allowable Allowable

Cell Name Value Price R.H. Side Increase Decrease$F$6 Constraint Budget 2400 0 3200 1E+30 800$F$7 Labor 160 100 160 40 60$F$8 Land 100 100 100 20 20

Page 23: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

2323

Sensitivity Analysis in the Computer Output

Allowable Increase and Decrease in the “Adjustable Cells” tells the ranges in which the coefficients of the objective function can vary without changing the optimal solution i.e. the values of decision variables in optimal solution; the value of the objective function itself will naturally changes when the coefficients change

Page 24: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

2424

Sensitivity Analysis in the Computer Output continued

Shadow Price tells how much a one unit increase/decrease in the RHS of a constraint would increase/decrease the value of the objective function

Allowable Increase and Decrease in the “Constraint R.H. sinde” tells the ranges in which the RHSs can vary without changing the basis of the optimal solution (= the set of variables with a positive value)

Page 25: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

2525

Example: Resource Allocation Problem

Let’s consider a manufacturing facility that produces five different products using four machines

The scarce resources are the times available on the machines and the alternative activities are the individual production volumes

The machine requirements in hours per unit are shown for each product in the table

The unit profits are also shown in the table The facility has four machines of type 1, five of

type 2, three of type 3 and seven of type 4 Each machine operates 40 hours per week

The problem is to determine the optimum weekly production quantities for the products

The goal is to maximize total profit

Page 26: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

2626

Machine data and processing requirements (hrs./unit)

Machine Quantity Product 1 Product 2 Product 3 Product 4 Product 5

M1 4 1.2 1.3 0.7 0.0 0.5

M2 5 0.7 2.2 1.6 0.5 1.0

M3 3 0.9 0.7 1.3 1.0 0.8

M4 7 1.4 2.8 0.5 1.2 0.6

Unit profit, $

—— 18 25 10 12 15

 

The number of hours available on each machine type is 40 times the number of machines.

Page 27: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

2727

Machine Availability Constraints

M1 : 1.2P1 + 1.3P2 + 0.7P3 + 0.0P4 + 0.5P5 < 160

M2 : 0.7P1 + 2.2P2 + 1.6P3 + 0.5P4 + 1.0P5 < 200

M3 : 0.9P1 + 0.7P2 + 1.3P3 + 1.0P4 + 0.8P5 < 120

M4 : 1.4P1 + 2.8P2 + 0.5P3 + 1.2P4 + 0.6P5 <

280

Nonnegativity Pj > 0 for j = 1,...,5

Objective Function  

Max Z = 18P1+ 25P2 + 10P3 + 12P4 + 15P5

 

Page 28: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

2828

Page 29: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

2929

Quiz

1. Explain the meaning of Reduced Cost in this context.

2. Explain the meaning of ranges in Variable Analysis. Note! What do they mean in this context?

3. Explain the meaning of Shadow Price in this context.

4. Explain the meaning of ranges in Constraint Analysis. Again in this context!

Page 30: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

3030

Variable Analysis: Reduced Cost

Reduced cost $13.53 means that the coefficient of P3 (its unit profit) had to increase by this amount before it would be profitable to start producing product 3

The "reduced cost" column indicates the increase in the objective function per unit change in the value of the associated variable Reduced cost of P3 indicates that if this

variable were increased from 0 to 1, i. e. if we would produce on unit of product P3, the objective function value (profit) will decrease by $13.53

It is not surprising that the reduced cost is negative since the optimum value of P3 is zero

Page 31: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

3131

Variable Analysis: Reduced cost continued

The ranges at the right of the display indicate how far the associated objective coefficient may change before the current solution values (P1 through P5) must change to maintain optimality

For example, the unit profit on P1 may assume any value between 13.26 and 24.81

The "---" used for the lower limit of P3 indicates an indefinite lower bound

Since P3 is zero at the optimum, reducing its unit profit by any amount will make it even less appropriate to produce that product

Page 32: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

3232

Constraint Analysis

A shadow price indicates the increase in the objective function value resulting from an unit increase of the associated constraint (resource)

From the table we see that increasing the hour limit of 120 for M3 increases the objective function value by the most ($8.96), while increasing the limit for M4 increases the objective function value by the least ($0.36)

Page 33: 1 The Dual in Linear Programming In LP the solution for the profit- maximizing combination of outputs automatically determines the input amounts that must.

3333

Constraint Analysis: Shadow Price continued

The ranges at the right of the display indicate how far the limiting value may change while keeping the same optimum basis

The shadow prices remain valid within this range

As an example consider M1. For the solution, there are 160 hours of capacity for this machine. The capacity may range from 99.35 hours to 173 hours while keeping the same basis optimal. Changes above 160 cause an increase in profit of $4.82 per unit, while changes below 160 cause a reduction in profit by $4.82 per unit.