03.2 Chapter3_SensitivityAnalysis.pdf

Embed Size (px)

Citation preview

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    1/54

    Chapter 3

    Sensitivity AnalysisCompanion slides of

    Applied Mathematical Programming

    by Bradley, Hax, and Magnanti(Addison-Wesley, 1977)

    prepared by

    Jos Fernando Oliveira

    Maria Antnia Carravilla

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    2/54

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    3/54

    The custom-molder problem

    Suppose that a custom molder has one injection-moldingmachine and three different dies to fit the machine.

    Due to differences in number of cavities and cycle times,with the first die he can produce 100 cases of six-ounce

    juice glasses in six hours, while with the second die he canproduce 100 cases of ten-ounce fancy cocktail glasses infive hours and with the third die he can produce 100 casesof champagne glasses in eight hours. He prefers to operateonly on a schedule of 60 hours of production per week.

    He stores the weeks production in his own stockroomwhere he has an effective capacity of 15,000 cubic feet. Acase of six-ounce juice glasses requires 10 cubic feet ofstorage space, while a case of ten-ounce cocktail glassesrequires 20 cubic feet due to special packaging and a caseof champagne glasses requires 10 cubic feet.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    4/54

    The custom-molder problem

    The contribution of the six-ounce juice glasses is$5.00 per case; however, the only customeravailable will not accept more than 800 cases perweek. The contribution of the ten-ounce cocktail

    glasses is $4.50 per case and there is no limit onthe amount that can be sold, which is also truefor the champagne glasses, that have acontribution of $6.00 per case.

    How many cases of each type of glass should beproduced each week in order to maximize thetotal contribution?

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    5/54

    The custom-molder model

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    6/54

    The initial simplex tableau

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    7/54

    And the final (optimal) simplex tableau

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    8/54

    Aims

    We wish to analyze the effect on the optimal solutionof changing various elements of the problem datawithout re-solving the linear program or having toremember any of the intermediate tableaus generated

    in solving the problem by the simplex method. The type of results that can be derived in this way are

    conservative, in the sense that they provide sensitivityanalysis for changes in the problem data small enough

    so that the same decision variables remain basic, butnot for larger changes in the data.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    9/54

    SHADOW PRICES, REDUCED COSTSAND NEW ACTIVITIES

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    10/54

    Shadow prices

    Definition. The shadow price associated with

    a particular constraint is the change in the

    optimal value of the objective function per

    unit increase in the righthand-side value forthat constraint, all other problem data

    remaining unchanged.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    11/54

    Suppose that the production capacity in the

    first constraint of our model is

    increased from 60 to 61 hours:

    Solving a new problem with 1 unit more on

    the right-hand side is algebraically equivalent

    to allow the slack variablex4to take on the

    negative value of -1 in the original problem.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    12/54

    How does the objective function changes

    whenx4is replaced byx4 1 (i.e., from its

    optimal valuex4= 0 tox4= 1)?

    In the optimal solutionx3= x

    4= x

    5= 0 because

    they are nonbasic variables.

    If nowx4= 1, the profit increases by 11/14

    hundred dollarsthe shadow price

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    13/54

    The shadow price for a particular constraint is merelythe negative of the coefficient of the appropriateslack (or artificial) variable in the objective function ofthe final tableau.

    Shadow prices are associated with the constraints ofthe problem and not the variables.

    For our example, the shadow prices are 11/14 hundreddollars per hour of production capacity, 1/35 hundreddollars per hundred cubic feet of storage capacity, andzero for the limit on six-ounce juice-glass demand.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    14/54

    Reduced costs

    Definition. The reduced cost associated with

    the nonnegativity constraint for each variable

    is the shadow price of that constraint (i.e., the

    corresponding change in the objectivefunction per unit increase in the lower bound

    of the variable).

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    15/54

    The reduced costs can also be obtained directlyfrom the objective equation in the final tableau:

    Increasing the righthand side ofx3 0 by oneunit tox3 1 forces champagne glasses to beused in the final solution. Therefore, the optimalprofit decreases by 4/7.

    Increasing the righthand sides ofx1 0 andx2 0by a small amount does not affect the optimalsolution, so their reduced costs are zero.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    16/54

    In every case, the shadow price for the

    nonnegativity constraint on a variable

    (reduced cost of the variable) is the objective

    coefficient for this variable in the finalcanonical form. For basic variables, these

    reduced costs are zero.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    17/54

    Pricing out an activity

    The operation of determining the reduced

    cost of an activity from the shadow price and

    the objective function is generally referred to

    aspricing out an activity.

    In this view, the shadow prices are thought of

    as the opportunity costs associated with

    diverting resources away from the optimalproduction mix.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    18/54

    Example with variablex3

    Since the new activity of producing champagne glassesrequires 8 hours of production capacity per hundredcases, whose opportunity cost is 11/14 hundred dollarsper hour, and 10 hundred cubic feet of storage capacity

    per hundred cases, whose opportunity cost is 1/35hundred dollars per hundred cubic feet, the resultingtotal opportunity cost of producing one hundred casesof champagne glasses is:

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    19/54

    Now the contribution per hundred cases is only 6hundred dollars so that producing any champagneglasses is not as attractive as producing the currentlevels of six-ounce juice glasses and ten-ounce cocktail

    glasses. Therefore, if resources were diverted from the current

    optimal production mix to produce champagne glasses,the optimal value of the objective function would be

    reduced by 4/7 hundred dollars per hundred cases ofchampagne glasses produced. This is exactly thereduced cost associated with variablex3.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    20/54

    Generalization

    Objective function in the optimal solution

    Shadow prices

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    21/54

    Relationship between shadow prices,

    reduced costs and the problem data

    Recall that, at each iteration of the simplex

    method, the objective function is transformed

    by subtracting from it a multiple of the row in

    which the pivot was performed.

    Consequently, the final form of the objective

    function could be obtained by subtracting

    multiples of the original constraints from theoriginal objective function.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    22/54

    Relationship between shadow prices,

    reduced costs and the problem data

    Consider first the final objective coefficientsassociated with the original basic variablesxn+1,

    xn+2, . . . ,xn+mand let1, 2, . . . , nbe themultiples of each row that are subtracted from

    the original objective function to obtain its finaloptimal form.

    Sincexn+iappears only in the ith constraint andhasa+1 coefficient, we should have:

    which, combined with means that

    The shadow prices yi

    are the multiples

    i

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    23/54

    The multiples can be used to obtain every objectivecoefficient in the final form.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    24/54

    Since

    for the m basic variables of the optimal solution, we

    have:

    This is a system of m equations in m unknowns that

    uniquely determines the values of the shadow pricesyi.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    25/54

    VARIATIONS IN THE OBJECTIVECOEFFICIENTS

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    26/54

    Variations in the objective coefficients

    How much the objective-function coefficients

    can vary without changing the values of the

    decision variables in the optimal solution?

    We will make the changes one at a time,

    holding all other coefficients and righthand-

    side values constant.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    27/54

    Variation of objective coefficient ofx3,

    a nonbasic variable in our example

    Suppose that we increase the objective function

    coefficient ofx3in the original problem formulation

    by c3:

    In applying the simplex method, multiples of the

    rows were subtracted from the objective function to

    yield the final system of equations.

    Therefore, the objective function in the final tableau

    will remain unchanged except for the addition

    of c3x3.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    28/54

    x3 will become a candidate to enter the optimal solution at apositive level, i.e., to enter the basis, only when its objective-

    function coefficient is positive. The optimal solution remains

    unchanged so long as:

    Equivalently, we know that the range on the original objective-

    function coefficient ofx3, say c3new, must satisfy

    < c3new

    6 4/7 if the optimal solution is to remain unchanged.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    29/54

    Variation of objective coefficient ofx1,

    a basic variable in our example

    Suppose now that we increase the objective function

    coefficient ofx1in the original problem formulation

    by c1:

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    30/54

    Asx1is basic, this tableau is not canonical and

    therefore a pivot operation has to be made.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    31/54

    In order to have the current solution remainunchanged:

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    32/54

    Taking the most limiting inequalities, the

    bounds on c1are:

    If we let c1new= c1+ c1be the objective-

    function coefficient ofx1

    in the initial tableau,

    then:

    Which variables will enter and leave the basis

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    33/54

    Which variables will enter and leave the basis

    when the new cost coefficient reaches either

    of the extreme values of the range?

    When c1new= 5 2/5:

    the objective coefficient ofx5in the final tableau

    becomes 0; thusx5enters the basis for any furtherincrease ofc1

    new

    by the usual ratio test of the simplex method

    variablex6leaves the basis:

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    34/54

    When c1new= 4 7/11:

    the objective coefficient ofx3in the final tableau

    becomes 0; thusx3enters the basis for any further

    decrease ofc1new by the usual ratio test of the simplex method

    variablex1leaves the basis.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    35/54

    VARIATIONS IN THE RIGHTHAND-SIDE VALUES

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    36/54

    Overview

    When changing a righthand-side, the values ofthe decision variables are clearly modified!

    But any change in the righthand-side values that

    keep the current basis, and therefore thecanonical form, unchanged has no effect uponthe objective-function coefficients.

    Consequently, the righthand-side ranges are such

    that the shadow prices and the reduced costsremain unchanged for variations of a single valuewithin the stated range.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    37/54

    Varying the righthand-side value for the

    demand limit on six-ounce juice glasses

    If we add an amount b3to the righthand side

    of this constraint, the constraint changes to:

    x1is nonbasic (equal to zero) andx6was basic

    in the initial tableau and is basic in the optimal

    tableau, thereforex6is merely increased or

    decreased by b3. In order to keep thesolution feasible:

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    38/54

    This implies that:

    or, equivalently, that:

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    39/54

    Varying the righthand-side value for the

    storage-capacity constraint

    If we add an amount b2to the righthand side

    of this constraint, the constraint changes to:

    This is equivalent to decreasing the value of

    the slack variablex5of the corresponding

    constraint byb2; that is, substitutingx5 b2

    forx5in the original problem formulation.

    In this case,x5, which is zero in the final

    solution, is changed tox5= b2.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    40/54

    Making these substitutions in the final tableau

    provides the following relationships:

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    41/54

    In order for the current basis to remain optimal, it

    need only remain feasible, since the reduced costs

    will be unchanged by any such variation in the

    righthand-side value:

    which implies:

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    42/54

    All these computations can be carried out

    directly in terms of the final tableau

    When changing the ithrighthand-side by bi , we

    simply substitute bifor the slack variable in the

    corresponding constraint and update the current

    values of the basic variables accordingly:Example for b2

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    43/54

    Variable transitions

    When changing demand on six-ounce juiceglasses, we found that the basis remains optimalif b3

    new6 3/7 and that for b3new< 6 3/7 , the

    basic variablex6

    becomes negative.

    In the later casex6has to leave the basis, sinceotherwise it would become negative.

    What variable would then enter the basis to take

    its place? In order to have the new basis be anoptimal solution, the entering variable must bechosen so that the reduced costs are not allowedto become positive.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    44/54

    Regardless of which variable enters the basis,

    the entering variable will be isolated in row 2

    of the final tableau to replacex6, which leaves

    the basis.

    To isolate the entering variable, we must

    perform a pivot operation, and a multiple, say

    t, of row 2 in the final tableau will besubtracted from the objective-function row.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    45/54

    Assuming that b3newwere set equal to 6 3/7 in

    the initial tableau the final tableau would be:

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    46/54

    In order that the new solution be an optimalsolution, the coefficients of the variables in the

    objective function of the final tableau must benonpositive:

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    47/54

    Since the coefficient ofx3is most constrainingon t, x3will enter the basis. Note that therange on the righthandside value and the

    variable transitions that would occur if thatrange were exceeded by a small amount areeasily computed.

    However, the pivot operation actually

    introducingx3into the basis and eliminatingx6need not be performed.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    48/54

    ALTERNATIVE OPTIMAL SOLUTIONSAND SHADOW PRICES

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    49/54

    Alternative optimal solutions

    As in the case of the objective function and

    righthand-side ranges, the final tableau of the

    linear program tells us something conservative

    about the possibility of alternative optimalsolutions

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    50/54

    If all reduced costs of the nonbasic variablesare strictly negative (positive) in amaximization (minimization) problem, then

    there is no alternative optimal solution,because introducing any variable into thebasis at a positive level would reduce(increase) the value of the objective function.

    If one or more of the reduced costs are zero,there may exist alternative optimal solutions.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    51/54

    Example

    x3could be introduced into the basis without changing

    the value of the objective function. By the minimum ratiox1leaves the basis.

    The alternative optimal solution is then found bycompleting the pivot that introducesx3and eliminatesx1.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    52/54

    Alternative shadow prices

    Independent of the question of whether or

    not alternative optimal solutions exist in the

    sense that different values of the decision

    variables yield the same optimal value of theobjective function, there may exist alternative

    optimal shadow prices.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    53/54

    If all righthand-side values in the final tableau

    are positive, then there do not exist

    alternative optimal shadow prices.

    If one or more of these values are zero, thenthere mayexist alternative optimal shadow

    prices.

  • 8/10/2019 03.2 Chapter3_SensitivityAnalysis.pdf

    54/54

    Example

    Since the righthand-side value in row 2 is zero, it is possibleto dropx6(basic variable in row 2) from the basis as long as

    there is a variable to introduce into the basis. The variable to be introduced into the basis can be

    determined from the entering variable condition: