4 - Primal and Dual V1

  • Upload
    harsh

  • View
    220

  • Download
    0

Embed Size (px)

Citation preview

  • 8/19/2019 4 - Primal and Dual V1

    1/36

    REVISED SIMPLEX METHODRevised Simplex Method (5.2,5.3,5.4)

    Dual Introduction (6.1) 

    1/19/2016 1ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    2/36

    Revised Simplex Method

    • Method was motivated for efficient computational purposes

    • Works only with relevant piece of information at each iteration

    • Revised Simplex Method uses Matrix Notation and Matrix

    Manipulations• The insights it provide us are very useful in dual formulation of

    the original LP (which is called primal)

    1/19/2016 2ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    3/36

    Matrix Notation

    1/19/2016 3ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    4/36

    Matrix Notation : Augmented Form

    1/19/2016 4ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    5/36

    Matrix Notation : Augmented Form

    Example – WYNDOR Glass Co.

    1/19/2016 5ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    6/36

    Matrix Notation : Current set of equations

    (Simplex Tableau)

    1/19/2016 6ME 332 – IEOR 2016 Spring

    Current Set of Equations

  • 8/19/2019 4 - Primal and Dual V1

    7/36

    Solving for BFS with Revised Simplex

    • Eliminate non basic variables from

    to obtain the vector of basic variables

    • Eliminate a j columns of Non Basic Variables from

    to obtain the basis matrix

    We want to work only with Basic Variables

    1/19/2016 7ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    8/36

    Solving for BFS with Revised Simplex

    • Basic Variable Values are obtained by:

    • C B is the vector whose elements are objective function

    coefficients corresponding to X B then the value of objectivefunction for the current basic solution is

    1/19/2016 8ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    9/36

    Example - WYNDOR

    1/19/2016 9ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    10/36

    Getting all the other values of current iteration

    through B-1

    Matrix form of current set of equations:

    1/19/2016 10ME 332 – IEOR 2016 Spring

    Premultiply both sides with

  • 8/19/2019 4 - Primal and Dual V1

    11/36

    Simplex tableau in Matrix Form

    • At any iteration:

    1/19/2016 11ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    12/36

    Simplex Tableau – Fundamental Insights

    1/19/2016 12ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    13/36

    Simplex Tableau – Fundamental Insights

    • New row(1) = old row (1)

    • New row(2) = ½ *old row( 2)

    • New row (3) = (-1)* old row (2) + 1*old row (3)

    •  After any iteration , the coeff. of the slack variables in each equation immediately reveal how that equation hasbeen obtained from the initial equations.

    1/19/2016 13ME 332 – IEOR 2016 Spring

    Current itr. Slack Coeff Initial rows 1-3

    =

    New rows 1-3

  • 8/19/2019 4 - Primal and Dual V1

    14/36

    Simplex Tableau – Fundamental Insights

    1/19/2016 14ME 332 – IEOR 2016 Spring

    =

    New row 0

    +

    Initial row 0 initial rows 1 to 3Currentslack vari.

    cost coeff

  • 8/19/2019 4 - Primal and Dual V1

    15/36

    Simplex Tableau – Fundamental Insights

    1/19/2016 15ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    16/36

    Revised Simplex Algorithm

    • Initialize the Problem, Introduce slack variables

    • Obtain

    • Iteration

    • Determine the Entering Basic Variable

    • Determine the Leaving Basic Variable

    • Determine the new BFS

    • Optimality Test

    • Current solution is optimal if all the coeff are non negative

    1/19/2016 16ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    17/36

    Revised Simplex – Summary

    1/19/2016 17ME 332 – IEOR 2016 Spring

    / / 18

  • 8/19/2019 4 - Primal and Dual V1

    18/36

    Dual - Introduction

    • At any iteration simplex method for primal problem, current

    Row 0 is represented as shown in the table

    1/19/2016 18ME 332 – IEOR 2016 Spring

    1/19/2016 19ME 322 IEOR 2016 S i

  • 8/19/2019 4 - Primal and Dual V1

    19/36

    Dual - Introduction

    1/19/2016 19ME 322 – IEOR 2016 Spring

    y

    1/19/2016 20ME 332 IEOR 2016 S i

  • 8/19/2019 4 - Primal and Dual V1

    20/36

    Dual - Introduction

    Iterations Primal Dual

    0 Feasible, Not optimal Infeasible

    1 Feasible, Not optimal Infeasible

    2 Feasible, Optimal Feasible, Optimal

    1/19/2016 20ME 332 – IEOR 2016 Spring

    1/19/2016 21ME 332 IEOR 2016 S i

  • 8/19/2019 4 - Primal and Dual V1

    21/36

    PRIMAL - DUAL

    Dual Formulation (6.1)Primal-Dual Relations (6.1, 6.3)

    Dual Solution (Dual Simplex – 7.1)

    Sensitivity Analysis (6.5)

    Economic Interpretations (6.2)

    1/19/2016 21ME 332 – IEOR 2016 Spring

    1/19/2016 22ME 332 IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    22/36

    Dual - Introduction

    • Every Linear Programming problem is associated with it

    another LP called the Dual , the original is called the Primal

    • When ever we solve LP we are solving two problems

    • Primal Resource Allocation Problem

    • Dual Resource Valuation Problem

    • Primary use of Duality lies in the interpretation and

    implementation of sensitivity analysis – How to trade off

    resources

    • If Primal  has n variables and m constraints, its Dual  has m

    variables and n constraints

    1/19/2016 22ME 332 – IEOR 2016 Spring

    1/19/2016 23ME 332 IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    23/36

    Dual Formulation

    1/19/2016 23ME 332 – IEOR 2016 Spring

    1/19/2016 24ME 332 IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    24/36

    Dual Formulation

    • Number of parameters remain the same

    • Primal obj. coeff. become constraint right hand sides in Dual

    • Primal constraint RHS becomes obj. coeff. in Dual

    • Coeff. of variable in functional constraint of primal problem are

    the coeff in a functional constraint of the Dual

    1/19/2016 24ME 332 – IEOR 2016 Spring

    1/19/2016 25ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    25/36

    Dual Formulation: Rules *

    1/19/2016 25ME 332 – IEOR 2016 Spring

    * Taken from Hamdy A. Taha

    1/19/2016 26ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    26/36

    Dual Formulation: Example 1

    • Try to formulate dual of the dual*

    1/19/2016 26ME 332   IEOR 2016 Spring

    1/19/2016 27ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    27/36

    Dual Formulation: Example 2

    1/19/2016 27ME 332   IEOR 2016 Spring

    1/19/2016 28ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    28/36

    Primal – Dual variables correspondence

    1/19/2016 28ME 332   IEOR 2016 Spring

    1/19/2016 29ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    29/36

    Primal – Dual Relationships

    Theorem Primal Dual

    Weak Duality Property: If x is a

    feasible solution for the primal

    problem and y is a feasible solution

    for the dual problem, then

    cx ≤ yb

    x1 = 3

    x2 = 3

    Z = cx = 24

    y1 = 1

    y2 = 1

    y3 = 2

    W = yb = 36

    Strong Duality Property: if  x* is an

    optimal solution for the primal

    problem and y* is an optimal solution

    for the dual problem, then

    cx* = y*b

    x1 = 2

    x2 = 6

    Z = cx *= 36

    (Primal Maximumfeasible hence optimal)

    y1 = 0

    y2 = 3/2

    y3 = 1

    W = y*b = 36

    (Dual Minimum

    feasible hence

    optimal)

    1/19/2016 29ME 332   IEOR 2016 Spring

    1/19/2016 30ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    30/36

    Primal – Dual Relationships

    Theorem Primal Dual

    Complementary Solutions Property: At each

    iteration , the simplex method simultaneously

    identifies a CPF solution  x for primal and a

    complementary solution y for its dual

    problemcx = yb

    x1 = 0

    x2 = 6

    Z = cx = 30

    y1 = 0

    y2 = 5/2

    y3 = 0

    W = yb = 30

    Complementary Optimal Solutions Property:

    At the final iteration, the simplex method

    simultaneously identifies an optimal solution

     x* for the primal problem and a

    complementary optimal solution y* for the

    dual problem

    cx* = y*b

    x1* = 2

    x2* = 6

    Z *= cx* = 36

    y1* = 0

    y2* = 3/2

    y3* = 1

    W* = y*b = 36

    / / 30  p g

    1/19/2016 31ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    31/36

    Primal – Dual Relationships (Basic Solutions)

    Theorem Primal Dual

    Complementary Basic Solutions Property: 

    Each basic solution in the primal problem has a

    complementary basic solution in the dual

    problem, where their respective objectivefunction values (Z and W) are equal.

    (Basic)

    x3 = 4

    x4 = 12

    x5 = 18

    (Non basic)x1 = 0

    x2 = 0

    (Non basic)

    y1 = 0

    y2 = 0

    y3 = 0

    (Basic)y4 = -3

    y5 = -5

    Complementary Slackness Property:

    The primal basic solution and the complementary

    dual basic solution satisfy the complementary

    slackness relation

    i.e, Basic variables in primal are Non basic

    variables in dual and Vice versa

    Primal Basic

    (0,6,4,0,6)

    Basic: x2,x3,x5

    Non Basic

    x1,x4

    Compl. Dual

    basic

    (0,5/2,0,-3,0)

    Non Basic

    y1,y3,y5 = 0

    Basic

    (y1 + 3y3 - 3)

    (2y2 + 2y3 - 5)

    / / p g

    1/19/2016 32ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    32/36

    Primal - Dual Relationships

    / / p g

    1/19/2016 33ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    33/36

    Simplex on the Dual

    Y1 Y2 Y3 Y4 a1 Y5 a2 Z Coeff Mi

    Z -1 -9996 12 -29982 10000 0 0 10000 -30000 0

    a1 0 1 0 3 -1 1 0 0 3

    a2 0 0 2 2 0 0 -1 1 5

    Y1 Y2 Y3 Y4 a1 Y5 a2 Z Coeff Mi

    Z -1 -9996 -19988 -49982 10000 0 10000 0 -80000 -49982

    a1 0 1 0 3 -1 1 0 0 3 1

    a2 0 0 2 2 0 0 -1 1 5 2.5

    Y1 Y2 Y3 Y4 a1 Y5 a2 Z Coeff Mi

    Z -1 6664.667 -19988 0 -6660.666667 16660.67 10000 0 -30018 -19988

    Y3 0 0.333333 0 1 -0.333333333 0.333333 0 0 1Y2 0 -0.66667 2 0 0.666666667 -0.66667 -1 1 3

    Y1 Y2 Y3 Y4 a1 Y5 a2 Z Coeff Mi

    Z -1 2 0 0 2 9998 6 9994 -36 0

    Y3 0 0.333333 0 1 -0.333333333 0.333333 0 0 1

    Y2 0 -0.33333 1 0 0.333333333 -0.33333 -0.5 0.5 1.5

    1/19/2016 34ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    34/36

    Dual Simplex

    1/19/2016 35ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    35/36

    Why Dual?

    1/19/2016 36ME 332 – IEOR 2016 Spring

  • 8/19/2019 4 - Primal and Dual V1

    36/36

    TO BE UPDATED…