sensitivity

Upload: ankit-sinha

Post on 09-Mar-2016

214 views

Category:

Documents


0 download

DESCRIPTION

Sensitivity AnalysisDual AnalysisDecision Theory

TRANSCRIPT

  • Dual formation and Sensitivity Analysis

  • Panchatantra Revisited

    Max 0.90 L + 0.60 S

    Subject to

    0.2 L + (1/12) S

  • How much does Jataka pay?

    Total payment: 3000PLoom+2400P40+480P60+11000PLS+22000PSS

    where Px is the price paid per unit of resource x.

    Jatakas Objective: minimize total payment.

    Constraints?

  • Jatakas Constraints

    Jataka decides to buy the resources from Panchatantra and they want to set unit prices for each of the inputs. Their objective is to minimize the total cost of procuring the set amounts of inputs.

    Panchatantra would accept the deal only if the resources are valued such that it provides them with a lower bound on the unit price of each of their output.

    Therefore, the constraints are

  • Jatakas Constraints

    1. Lungi valuation (one metre):

    0.2PLoom+0.06P40+0.04P60+PLS+0PSS 0.9

    2. Shirting valuation (one metre):

    (1/12)PLoom+0.1P40+0P60+0PLS+PSS 0.6

    3. All prices 0.

    Solve it.

  • Resource Allocation vs Resource Valuation

    So far we considered resource allocation problems (primal)

    Corresponding to every resource allocation problem there exists an equivalent resource valuation (dual) problem

    Every linear program can be converted into the dual form

    In case of linear programs, the optimal solution of a primal and the corresponding dual problem coincide

  • Primal Formulation

    What are we trying to do? Allocate resources in an optimal manner to maximize the

    revenues

    Revenue maximization or resource allocation

  • Dual Formulation

    What are we trying to do in the above formulation? Valuate the resources in an optimal manner to minimize expenditure

    Primal problem involves physical quantities while dual problem involves economic values

    Optimal value of a dual variable represents the shadow price of the corresponding resource

    Dual of the dual is the primal.

  • Writing Dual of a Primal

    When your primal is in the standard form, in the dual Objective function is to be minimized

    All variables should be non-negative

    All constraints should be of less than or equal to type

    For example, the following (primal) problem is in the standard form

    Max. Z=3X1+5X2 so that

    X14

    2X212

    3X1+2X218

    X10, X20

  • Primal-Dual Relationship for Standard Forms

    Primal ProblemObjective: Max

    Constraint i :

    = 0

    Dual ProblemObjective: Min

    Variable i :

    yi >= 0

    Constraint j:

    >= form

  • Writing Dual of a Primal

    Primal Problem Dual Problem

    ,53 21 xx ,18124 321 yyy

    1823 21 xx

    122 2 x

    41x

    0,0 21 xx

    522 32 yy

    33 3 y1y

    0y,0y,0y 321

    Max

    Subject to

    Min

    Subject to

  • Primal Problem Dual Problem

    Max

    Subject to

    Min

    Subject to

    Flip and Switch

    ,5,32

    1

    x

    xZ

    18

    12

    4

    2

    2

    0

    3

    0

    1

    2

    1

    x

    x

    .0

    0

    2

    1

    x

    x .

    0

    0

    0

    3

    2

    1

    y

    y

    y

    5

    3

    220

    301

    3

    2

    1

    y

    y

    y

    3

    2

    1

    18,12,4

    y

    y

    y

    W

    Flip

    Switch

  • Writing Dual of a Primal

    Primal in standard form Dual in standard form

    0,...,,

    ...

    ... ... ... ...

    ... ... ... ...

    ...

    ...

    21

    2211

    22222121

    11212111

    n

    mnmnmm

    nn

    nn

    xxx

    bxaxaxa

    bxaxaxa

    bxaxaxa

    nx

    ncxcxc ...

    22

    11Max

    ..ts

    0,,,

    ... ... ... ...

    ... ... ... ...

    21

    2211

    22222112

    11221111

    m

    nmmnnn

    mm

    mm

    yyy

    cyayaya

    cyayaya

    cyayaya

    Min

    ..ts

    my

    mbybyb ...

    22

    11

  • Writing Dual of a Primal

    Primal in standard form Dual in standard form

    1 2

    ; 1, 2,

    , ,..

    .

    .,

    ,

    0

    j

    n

    jb mAx j

    x x x

    Tc xMax

    ..ts

    1 2

    ; 1, 2,

    , , , 0

    .i

    m

    T

    iy nA c i

    y y y

    Min

    ..ts

    Tb y

  • Forming the Dual

    Primal for

    Panchantantra

    Dual for Panchantantra

    Max 0.90L + 0.60S

    s.t.: 0.2L + (1/12)S

  • What if Primal is not in standard form?

    Convert it into standard form as follows: If objective is to Minimize 5 x1 - 2 x2

    Replace it by Maximize -5 x1 + 2 x2

    If a constraint is 4 x1 - 7 x2 0

    Replace it by 4 x1 - 7 x2 0

    If a variable is negative x2 0

    Define a new variable x2 = -x2 which implies x2 0, replace x2 by -x2

    If x1 is unrestricted

    Define new variables u1 0, u2 0 such that x1=u1-u2 , replace x1 by u1-u2

    If a constraint is 3 x1 - 5 x2 = 0

    Replace it with two constraints, 3 x1 - 5 x2 0, 3 x1 - 5 x2 0

    Convert both to less than or equal to type 3 x1 - 5 x2 0, - 3 x1 + 5 x2 0

  • Write the dual

    Max

    ..ts

    0 ,0,

    155672

    104849

    253535

    04520302

    4321

    4321

    4321

    4321

    4321

    xfree,xxx

    xxxx

    xxxx

    xxxx

    xxxx

    Primal Formulation

  • Primal-Dual Relationship in General

    Primal ProblemObjective: Max

    Constraint i :

    = form

    Variable j:

    xj >= 0

    xj free

    xj = 0

    yi free

    yi = form

    = form

  • Laws of Duality

    Weak Law of Duality:Each feasible solution for the primal(maximization) problem has an objective valuethat is less than or equal to the objective value ofevery feasible solution to the dual (minimization)problem.

    In other words: ybxc TT

  • Laws of Duality

    Strong Law of Duality:If the primal problem has a finite optimum,then at the optimum:Objective value of Primal = Objective value of Dual

    In other words:

    Primal Unbounded Dual Infeasible Primal Infeasible Dual Unbounded or Infeasible

    ** ybxc TT

  • Complementary Slackness

    Consider at an optimal solution to the primal problem:

    Primal Constraint Corresponding Dual Variable (Shadow Price)

    Non-binding (Slack0) 0

    Binding (Slack=0) Non-zero

    Slack Shadow Price = 0

    Complementary slackness: The above conditions always holds at the optimum

    Both ways implication: If x and y satisfy the above complementary slackness conditions then they are the optimal solutions

  • Reduced Costs

    The reduced cost for a decision variable at its Lower or Upper Bound in the optimal solution indicates by how much its coefficient in the objective function must be improved before that variable enters a positive level.

  • Some Properties

    What is the reduced cost for a decision variable already at non-zero value in an optimal solution?

    Can a decision variable at zero level have a reduced cost of zero?

    Is there any relation between a primal constraint and the reduced cost of the corresponding dual variable?

    -> Validate these by looking at the sensitivity reports of Panchatantra and Jatakas problems.

    Zero!

    Yes. If it does, that indicates multiple solutions. (not vice versa.)

    Yes. Slack in a constraint equals the reduced cost of the corresponding

    dual variable.

  • Multiple Solutions

    Only happens when the objective function is parallel to one of the constraints.

    At optimal, the objective function will coincide with that constraint.

    How much can I change the slope coefficients before the optimal product mix is disturbed?

    Ans: not at all (at least in one direction)

    if multiple optimal solutions exist!

  • Another Pointer towards multiple solution

    If the dual problem has degenerate solutions (i.e. more than two constraints intersect at the optimal solution) then the primal problem has multiple solutions.

    Proof is a little advanced for this class and hence skipped.

  • Summary: Sensitivity Analysis

    Sensitivity analysis tells us the maximum amount by which we can change any of the coefficients in a linear program such that the set of constraints that determine an optimal solution does not change.

    We are concerned with changing only one coefficient and keeping all others fixed.

    We are bothered only about the set of constraints that define the optimal solution they should not change. But, the optimal solution can change, the objective function value can change.