Anda di halaman 1dari 64

Duality & The Dual Simplex

Method & Sensitivity Analysis


for Linear Programming

Investigacin de M. En C. Eduardo Bustos Farias 1


Operaciones
Duality

Investigacin de M. En C. Eduardo Bustos Farias 2


Operaciones
Duality
Every LP problem has a twin problem
associated with it. One problem is called
primal, while the other is called dual.
These problems possess very closely related
properties so that the optimal solution of
one problem can yield complete information
about the optimal solution of the other
problem!
Investigacin de M. En C. Eduardo Bustos Farias 3
Operaciones
Duality
In certain cases, these relationships may
prove useful in reducing the computational
effort associated with solving LP problems

Investigacin de M. En C. Eduardo Bustos Farias 4


Operaciones
Duality
Primal Dual
n
Max Zx = cj x j
m
Min Z y = bi yi
j =1 i =1
n m
s.t. a x
j =1
ij j bi , i =1,2,..,m s.t. a y c , j = 1,2,..,n
ij i j
i =1

x j 0, j=1,2,...,n yi 0, i = 1,2,...,m

Investigacin de M. En C. Eduardo Bustos Farias 5


Operaciones
Construction of the Dual
The dual problem is constructed from the
primal problem as follows:

Each constraint in one problem corresponds


to a variable in the other problem
The elements of the resources of the
constraints in one problem are equal to the
respective coefficients of the objective
function in the other problem
Investigacin de M. En C. Eduardo Bustos Farias 6
Operaciones
Construction of the Dual
The maximization problem has (<)
constraints, and the minimization problem
has (>) constraints
The variables in both problems are non-
negative (> 0)
From symmetry of the two problems, the
dual of the dual is the primal

Investigacin de M. En C. Eduardo Bustos Farias 7


Operaciones
Primal
Max Z x = 5 x1 + 6 x2

Dual Variables
s.t. x1 + 9 x2 60 : y1
2 x1 + 3 x2 45 : y2
Example
5 x1 2 x2 20 : y3
x2 30 : y4
Dual
x1 , x2 0
Min Z y = 60 y1 + 45 y2 + 20 y3 + 30 y4

Primal Variables
s.t. y1 + 2 y2 + 5 y3 5 : x1
9 y1 + 3 y2 2 y3 + y4 6 : x2
y1 , y2 , y3 , y4 0
Investigacin de M. En C. Eduardo Bustos Farias 8
Operaciones
Primal in Standard Form
Example
Max Z x = 5 x1 + 6 x2
s.t. x1 + 9 x2 + s1 = 60 : y1

Dual Variables
2 x1 + 3 x2 + s2 = 45 : y2
5 x1 2 x2 + s3 = 20 : y3
x2 + s4 = 30 : y4
x1 , x2 , s1 , s2 , s3 , s4 0
Dual in Standard Form
Max Z 'y = 60 y1 45 y 2 20 y 3 30 y 4 MA1 MA 2

Variables
s.t . y1 + 2 y 2 + 5 y 3 s1 + A1 =5 : x1

Primal
9 y1 + 3 y 2 2 y 3 + y 4 s 2 + A2 = 6 : x2

Investigacin de
y1 , y2 , y3 , y4 , s1 , A1 , s2 , A2 0
M. En C. Eduardo Bustos Farias 9
Operaciones
Observations
Notice in the preceding example, the dual
problem has fewer constraints than the
primal, and may be computationally more
efficient to solve than the primal
Computational difficulty in LPs is mainly
associated with the number of constraints
rather than the number of variables

Investigacin de M. En C. Eduardo Bustos Farias 10


Operaciones
Primal-Dual Relationships
The optimal solution of the primal (dual)
gives, directly the optimal solution of the
dual (primal)
The following two rules are used to
determine the optimal solution of one
problem from the optimal (simplex)
solution of the other problem

Investigacin de M. En C. Eduardo Bustos Farias 11


Operaciones
Rule 1
If the dual variable corresponds to a slack
holgura
starting variable in the primal problem, its
optimum value is given directly by the
coefficient of this slack variable in the
optimal Z-equation row

Investigacin de M. En C. Eduardo Bustos Farias 12


Operaciones
Example
Primal in Standard Form

Max Z x = 5x1 + 6 x2
s. t . x1 + 9 x2 + s1 = 60 : y1

Dual Variables
2 x1 + 3x2 + s2 = 45 : y2
5x1 2 x2 + s3 = 20 : y3
x2 + s4 = 30 : y4
x1 , x2 , s1 , s2 , s3 , s4 0
Investigacin de M. En C. Eduardo Bustos Farias 13
Operaciones
Simplex Solution of the Primal
Dual variables
y1 y2 y3 y4
Z x1 x2 s1 s2 s3 s4 b
Z 1 0 0 .85 0 .83 0 67.66
x2 0 0 1 .11 0 .02 0 596
.
s2 0 0 0 .41 1 .32 0 14.36
x1 0 1 0 .04 0 .19 0 638 .
s4 0 0 0 .11 0 .02 1 24.04
Investigacin de M. En C. Eduardo Bustos Farias 14
Operaciones
Rule 2
If the dual variable corresponds to an
artificial starting variable in the primal
problem, its optimal value is given by the
coefficient of this artificial variable in the
optimal Z-equation row of the simplex
tableau, ignoring any Big M term

Investigacin de M. En C. Eduardo Bustos Farias 15


Operaciones
Example
Dual in Standard Form

Primal Variables
Max Z 'y = 60 y1 45 y 2 20 y 3 30 y 4 MA1 MA2
s. t . y1 + 2 y 2 + 5 y 3 s1 + A1 =5 : x1
9 y1 + 3 y 2 2 y 3 + y 4 s2 + A2 =6 : x2
y1 , y 2 , y 3 , y 4 , s1 , A1 , s2 , A2 0

Investigacin de M. En C. Eduardo Bustos Farias 16


Operaciones
Simplex Solution of the Dual
Primal Variables

x1 x2
Z ' y1 y2 y3 y4 s1 A1 s2 A2 b
Z' 1 0 14.36 0 24.04 6.38 M 6.38 596
. M 596
. 67.66
y3 0 0 .32 1 .02 .19 .19 .02 .02 .
083
y1 0 1 .40 0 .11 .04 .04 .11 .11 .
085

Investigacin de M. En C. Eduardo Bustos Farias 17


Operaciones
Sensitivity Analysis

Investigacin de M. En C. Eduardo Bustos Farias 18


Operaciones
Sensitivity Analysis
Coefficients in an LP formulation are
assumed to be known with absolute
certainty!
Sensitivity analysis provides an approach
for studying the effect upon the optimal
solution of variations in the cost/profit
coefficients in the objective function, or in
the resource availabilities of the constraints.

Investigacin de M. En C. Eduardo Bustos Farias 19


Operaciones
General Form of a
Linear Programming (LP) Problem
MAX (or MIN): c1X1 + c2X2 + + cnXn
Subject to: a11X1 + a12X2 + + a1nXn <= b1
:
ak1X1 + ak2X2 + + aknXn <= bk
:
am1X1 + am2X2 + + amnXn = bm

How sensitive is a solution to changes


in the ci, aij, and bi?
Investigacin de M. En C. Eduardo Bustos Farias 20
Operaciones
Sensitivity Problem 1
A Change in objective function coefficients

The goal of this sensitivity analysis is to


determine the range of variation in each of
the objective function coefficients that will
keep
mantendr
the current optimum corner point of
the feasible solution space unchanged.

Investigacin de M. En C. Eduardo Bustos Farias 21


Operaciones
Blending Problem Example
Consider the following example to illustrate
sensitivity problem 1
Max Z = 3x1 + 4x2
s.t. 5x1 + 4x2 200
3x1 + 5x2 150
5x1 + 4x2 100
8x1 + 4x2 80
x1 0, x2 0
Investigacin de M. En C. Eduardo Bustos Farias 22
Operaciones
Example - Blending Problem
Max Z = 3x1 + 4 x2
x2 60 s.t. 5 x1 + 4 x2 200
50 3x1 + 5 x2 150
40 5 x1 + 4 x2 100
8 x1 + 4 x2 80
30 Optimal Solution
x1 0, x2 0
20 Max Z = 138.5
x1=30.77, x2=11.54
10

x1
10 20 30 40 50 60
2
3 1
4

Investigacin de M. En C. Eduardo Bustos Farias 23


Operaciones
Example
In the previous example, if p2 is held
constant at 4, we can determine the
permissible range values on p1 so that the
current solution remains optimal as follows:
3 p1 5

5 4 4
12
p1 5
5
Investigacin de M. En C. Eduardo Bustos Farias 24
Operaciones
Example
Similarly, if p1 is held constant at 3, then
3 3 5

5 p2 4
5 p2 4
or
3 3 5
12
p2 5
so 5
Investigacin de M. En C. Eduardo Bustos Farias 25
Operaciones
Sensitivity Problem 2
How much is a resource unit worth?
vale

The goal of this analysis is to study the


sensitivity of the optimum solution to
changes in the right hand sides (r.h.s,) of
the constraints, i.e., the bis

Investigacin de M. En C. Eduardo Bustos Farias 26


Operaciones
Sensitivity Problem 2
This amounts to changing the availability of
a resource. The results are given as
predetermined ranges of the r.h.s. within
which the optimum objective value will
increase or decrease at a given, constant
rate.

Investigacin de M. En C. Eduardo Bustos Farias 27


Operaciones
Example - Blending Problem
Suppose the amount of Crude B is varied from
the 150 units available. This is reflected by
constraint inequality 2
3 x1 + 5 x2 150
Increasing or decreasing the availability of
Crude B has the effect of moving the constraint
line parallel to itself
We wish to determine the range of r.h.s. values
so that the optimal solution is determined by the
intersection of constraints 1 and 2
Investigacin de M. En C. Eduardo Bustos Farias 28
Operaciones
Example - Blending Problem
Thus, the acceptable range on Crude B is:
120 Crude B 250
If the availability of Crude B were increased
by 50 units (to a total of 200 units), then profit
would increase by:
50(0.6154) = 30.77, or a total of
Z = 1385
. + 30.77 = 169.27
These values are called dual prices or shadow
prices and are defined as the worth per unit of
valor

resource values. M. En C. Eduardo Bustos Farias


Investigacin de 29
Operaciones
Shadow Prices
Goods (resources) having positive shadow
prices are called scarce goods

Goods (resources) having zero shadow


prices are called free goods

Investigacin de M. En C. Eduardo Bustos Farias 30


Operaciones
Blending Example
Primal in Standard Form

Max Z x = 3x1 + 4 x2 MA1 MA2


s. t . 5x1 + 4 x2 + s1 = 200 : y1

Dual Variables
3x1 + 5x2 + s2 = 150 : y2
5x1 + 4 x2 s3 + A3 = 100 : y3
8 x1 + 4 x2 s4 + A4 = 80 : y4
x1 , x2 , s1 , s2 , s3 , A3 , s4 , A4 0
Investigacin de M. En C. Eduardo Bustos Farias 31
Operaciones
Simplex Solution of the Primal
y1 y2 y3 y4
Z x1 x2 s1 s2 s3 A3 s4 A4 b
Z 1 0 0 .23 .62 0 M 0 M 138.46
x1 0 1 0 .38 .31 0 0 0 0 30.77
s3 0 0 0 1 0 1 1 0 0 100
s4 0 0 0 2.15 .92 0 0 1 1 212.3
x2 0 0 1 .23 .38 0 0 0 0 1154.

Shadow Prices
(ignore Ms)
Investigacin de M. En C. Eduardo Bustos Farias 32
Operaciones
Blending Example
Dual in Standard Form

Primal Variables
Max Z 'y = 200 y1 150 y 2 + 100 y 3 + 80 y 4 MA1 MA2
s. t . 5 y1 + 3 y 2 5 y 3 8 y 4 s1 + A1 =3 : x1
4 y1 + 5 y 2 4 y 3 4 y 4 s2 + A2 =4 : x2
y1 , y 2 , y 3 , y 4 , s1 , A1 , s2 , A2 0

Investigacin de M. En C. Eduardo Bustos Farias 33


Operaciones
Simplex Solution of the Dual
x1 x2
Z' y1 y2 y3 y4 s1 A1 s2 A2 b
Z' 1 0 0 100 212.31 3077
. M 3077
. .
1154 M 1154
. 13846
.
y1 0 1 0 1 215
. .38 .38 .23 .23 .
023
y2 0 0 1 0 .92 .31 .31 .38 .38 .
062

Investigacin de M. En C. Eduardo Bustos Farias 34


Operaciones
Sensitivity Analysis in Simplex
MAXIMUM CHANGE IN RESOURCE
AVAILABILITY
A change in the resource availabilities (bis) will
only change the r.h.s. of the tableau (b column),
which means that such a change can only affect
the feasibility of the solution.

Investigacin de M. En C. Eduardo Bustos Farias 35


Operaciones
Sensitivity Analysis in Simplex
CHANGES IN MARGINAL COST/PROFIT
Changes in the coefficients of the objective function
will affect only the objective function equation (Z-
equation row) in the optimal tableau.

Such changes can affect only the optimality of the


current solution.

Goal of sensitivity analysis is to determine the range of


variation for the objective coefficients (one at a time)
for which the current optimum solution remains
unchanged!
Investigacin de M. En C. Eduardo Bustos Farias 36
Operaciones
Approaches to Sensitivity Analysis
enfoques

Change the data and re-solve the model!


Sometimes this is the only practical
approach.
Solver also produces sensitivity reports that can
answer various questions
When solving LP problems, be sure to select
the Assume Linear Model option in the
Solver Options dialog box.

Investigacin de M. En C. Eduardo Bustos Farias 37


Operaciones
The Wyndor Glass Problem
Max Z = 3x1 + 5x2
s. t . x1 4
x2 6
3x1 + 2 x2 18
x1 , x2 0

Investigacin de M. En C. Eduardo Bustos Farias 38


Operaciones
Wyndor Glass EXCEL Solution

Investigacin de M. En C. Eduardo Bustos Farias 39


Operaciones
Solver creates Worksheet tabs when these options are clicked
Investigacin de M. En C. Eduardo Bustos Farias 40
Operaciones
Wyndor Glass Answer Report

Investigacin de M. En C. Eduardo Bustos Farias 41


Operaciones
Wyndor Glass Sensitivity Analysis

Investigacin de M. En C. Eduardo Bustos Farias 42


Operaciones
Solvers Sensitivity Report
Answers questions about:
Amounts by which objective function coefficients
can change without changing the optimal solution.
The impact on the optimal objective function value
of changes in constrained resources.
The impact on the optimal objective function value
of forced changes in decision variables.
The impact changes in constraint coefficients will
have on the optimal solution.
Investigacin de M. En C. Eduardo Bustos Farias 43
Operaciones
Blue Ridge Hot Tubs Example...
MAX: 350X1 + 300X2 } profit
S.T.: 1X1 + 1X2 <= 200 } pumps
9X1 + 6X2 <= 1566 } labor
12X1 + 16X2 <= 2880 } tubing
X1, X2 >= 0 } non-negativity

Investigacin de M. En C. Eduardo Bustos Farias 44


Operaciones
Answer Report
Microsoft Excel 9.0 Answer Report
Worksheet: [Solver Class Examples Solved.xls]Blue Ridge
Report Created: 7/17/2005 2:56:10 PM

Target Cell (Max)


Cell Name Original Value Final Value
$D$6 Unit Profits Total Profit $66,100 $66,100

Adjustable Cells
Cell Name Original Value Final Value
$B$5 Number to Make Aqua-Spas 122 122
$C$5 Number to Make Hydro-Luxes 78 78

Constraints
Cell Name Cell Value Formula Status Slack
$D$10 - Labor Req'd Used 1566 $D$10<=$E$10 Binding 0
$D$11 - Tubing Req'd Used 2712 $D$11<=$E$11 Not Binding 168
$D$9 - Pumps Req'd Used 200 $D$9<=$E$9 Binding 0
Investigacin de M. En C. Eduardo Bustos Farias 45
Operaciones
Sensitivity Report
Microsoft Excel 9.0 Sensitivity Report
Worksheet: [Solver Class Examples Solved.xls]Blue Ridge
Report Created: 7/17/2005 2:56:10 PM

Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$5 Number to Make Aqua-Spas 122 0 350 100 50
$C$5 Number to Make Hydro-Luxes 78 0 300 50 66.66667

Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$D$10 - Labor Req'd Used 1566 16.6666667 1566 234 126
$D$11 - Tubing Req'd Used 2712 0 2880 1E+30 168
$D$9 - Pumps Req'd Used 200 200 200 7 26
Investigacin de M. En C. Eduardo Bustos Farias 46
Operaciones
Changes in Objective Function Coefficients

Values in the Allowable Increase &


Allowable Decrease columns for the
Changing Cells indicate the amounts by which
an objective function coefficient can change
without changing the optimal solution,
assuming all other coefficients remain
constant.

Investigacin de M. En C. Eduardo Bustos Farias 47


Operaciones
Alternate Optimal Solutions

Values of zero (0) in the Allowable


Increase or Allowable Decrease columns
for the Changing Cells indicate that an
alternate optimal solution exists.

Investigacin de M. En C. Eduardo Bustos Farias 48


Operaciones
Changes in Constraint RHS Values

The shadow price of a constraint indicates the


amount by which the objective function value
changes given a unit increase in the RHS value
of the constraint, assuming all other
coefficients remain constant.

Investigacin de M. En C. Eduardo Bustos Farias 49


Operaciones
Changes in Constraint RHS Values
Shadow prices hold only within RHS changes
falling within the values in Allowable Increase
and Allowable Decrease columns.

Shadow prices for nonbinding


No vlidas
constraints are
always zero.

Investigacin de M. En C. Eduardo Bustos Farias 50


Operaciones
Comments About Changes
in Constraint RHS Values
Shadow prices only indicate the changes that occur in
the objective function value as RHS values change.
Changing a RHS value for a binding constraint also
obligatorias
changes the feasible region and the optimal solution (see
graph on following slide).
To find the optimal solution after changing a binding
No vlidas
RHS value, you must re-solve the problem.

Investigacin de M. En C. Eduardo Bustos Farias 51


Operaciones
Other Uses of Shadow Prices
Suppose a new Hot Tub (the Typhoon-Lagoon) is being
considered. It generates a marginal profit of $320 and
requires:
1 pump (shadow price = $200)
8 hours of labor (shadow price = $16.67)
13 feet of tubing (shadow price = $0)
Q: Would it be profitable to produce any?
A: $320 - $200*1 - $16.67*8 - $0*13 = -$13.33 = No!

Investigacin de M. En C. Eduardo Bustos Farias 52


Operaciones
Analyzing Changes in Constraint Coefficients

Q: Suppose a Typhoon-Lagoon required only 7 labor


hours rather than 8. Is it now profitable to
produce any?
A: $320 - $200*1 - $16.67*7 - $0*13 = $3.31 = Yes!
Q: What is the maximum amount of labor Typhoon-
Lagoons could require and still be profitable?
A: We need $320 - $200*1 - $16.67*L3 - $0*13 >=0
The above is true if L3 <= $120/$16.67 = $7.20

Investigacin de M. En C. Eduardo Bustos Farias 53


Operaciones
Key Points - I
The shadow prices of resources equate the
marginal value of the resources consumed with the
marginal benefit of the goods being produced.
Resources in excess supply have a shadow price
(or marginal value) of zero.

Investigacin de M. En C. Eduardo Bustos Farias 54


Operaciones
Key Points-II
The reduced cost of a product is the difference
between its marginal profit and the marginal value
of the resources it consumes.
Products whose marginal profits are less than the
marginal value of the goods required for their
production will NOT be produced in an optimal
solution.

Investigacin de M. En C. Eduardo Bustos Farias 55


Operaciones
Ejercicio para resolver

ANLISIS DE SENSIBILIDAD

Investigacin de M. En C. Eduardo Bustos Farias 56


Operaciones
PROBLEMA
Una empresa fabrica 2 tipos de productos qumicos, el primero de ellos
aporta a las utilidades $ 5.00 por galn y el segundo $ 3.00.
Esta compaa tiene dos tipos de restricciones: el personal y el
presupuesto para costos variables de produccin. En lo que se refiere a
la primera, se tiene un mximo de 15 obreros mientras que en la
segunda se cuenta, cuando ms, con $10.00/hr de trabajo. Los
coeficientes tecnolgicos estn dados por:

Suponer que debido a la mala situacin econmica, el nmero de


empleados debe reducirse en 10 personas y el presupuesto
de produccin en $5.00/hora. Aplicar el anlisis de sensibilidad.
Investigacin de M. En C. Eduardo Bustos Farias 57
Operaciones
Ejercicio para resolver

Anlisis de sensibilidad

Investigacin de M. En C. Eduardo Bustos Farias 58


Operaciones
La empresa KZ se dedica a la fabricacin de tres producto; A, B y C. El
procedimiento de produccin involucra tres operaciones: formacin, acabado e
inspeccin. El departamento de ingeniera industrial, ha establecido los siguientes
estndares de produccin en cada operacin.
Datos de produccin para la compaa (minutos por producto)
El departamento de contabilidad por su parte, pronostica los siguientes costos e
ingresos para la compaa.
Datos de costo e ingreso para la compaa
Se desea saber el nmero de cada tipo de producto que debern producirse de tal
manera que se optimice el beneficio por las 8 horas de trabajo del da.
Considerando la informacin, plantear el modelo de programacin lineal:

Investigacin de M. En C. Eduardo Bustos Farias 59


Operaciones
Con esos datos:

1. Determine los rangos de variacin de las variables bsicas en


donde la base actual permanece
2. Cul es el rango de los recursos en donde la base actual
permanece?
3. En cules de las operaciones recomendara usted contratar
tiempo extra y por que?
4. Que pasara si se programaran 20 minutos extras en el
departamento de inspeccin, cambiara la funcin objetivo?
5. En cunto se incrementara la utilidad ptima actual si se
programan 50 minutos en el departamento de formado?
6. Qu pasara con la solucin ptima actual si se programaran
30 minutos de mantenimiento en el departamento de
acabado?

Investigacin de M. En C. Eduardo Bustos Farias 60


Operaciones
Ejercicio para resolver

ANLISIS DE SENSIBILIDAD

Investigacin de M. En C. Eduardo Bustos Farias 61


Operaciones
Ejercicio
Considrese el problema lineal:

MAX Z= 7.5X1 + 15X2 + 10X3


Sujeto a:
2X1 + 2X3 8
X1 + 2X2 + 1X3 3
1X1 + 1X2 + 2X3 6
X1, X2, X3 0

a) Obtener la solucin ptima.


b) Cul ser el efecto de un aumento de 5 unidades en C3?
c) Cunto cambiara el valor de la f. o. si se aumenta b1 de 8 a 9?
d) Cunto cambiara el valor de la f. o. si se aumenta b2 de 3 a 4?

Investigacin de M. En C. Eduardo Bustos Farias 62


Operaciones
Ejercicio para resolver

ANLISIS DE SENSIBILIDAD

Investigacin de M. En C. Eduardo Bustos Farias 63


Operaciones
Ejercicio
Supngase que en un problema de mezcla de productos X1, X2, X3 y X4
representan las unidades de los
productos 1, 2, 3 y 4, respectivamente, se tiene que:

MAX Z= 4X1 + 6X2 + 3X3 + 1X4


Sujeto a:
1.5X1 + 2X2 + 4X3 + 3X4 550 Horas de la mquina A
4X1 + 1X2 + 2X3 + 1X4 700 Horas de la mquina B
2X1 + 3X2 + 1X3 + 2X4 200 Horas de la mquina C
X1,X 2, X3 0

a) Plantee el dual del problema anterior.


b) Resolver el problema primal.
c) Resolver el problema dual.
d) Analizar las variables duales; Cul es su interpretacin?
Investigacin de M. En C. Eduardo Bustos Farias 64
Operaciones

Anda mungkin juga menyukai