CHAPTER 3: LINEAR PROGRAMMING SENSITIVITY ANALYSIS Sensitivity Analysis What if there is uncertainly about one or more values in the LP model? 1. 2. 3. Raw material changes, Product demand changes, Stock price Sensitivity analysis allows a manager to ask certain hypothetical questions about the problem, such as: How much more profit could be earned if 10 more hours of labour were available? Which of the coefficient in model is more critical? SENSITIVITY ANALYSIS Sensitivity analysis allows us to determine how “sensitive” the optimal solution is to changes in data values. This includes analyzing changes in: 1. An Objective Function Coefficient (OFC) 2. A Right Hand Side (RHS) value of a constraint LIMIT OF RANGE OF OPTIMALITY Max Ax + BY Keeping x, Y same how the object function behaves if A, B are changed. The optimal solution will remain unchanged as long as An objective function coefficient lies within its range of optimality If the OFC changes beyond that range a new corner point becomes optimal. Generally, the limits of a range of optimality are found by changing the slope of the objective function line within the limits of the slopes of the binding constraint lines. Binding constraint Are the constraints that restrict the feasible region GRAPHICAL SENSITIVITY ANALYSIS We can use the graph of an LP to see what happens when: 1. 2. An OFC changes, or A RHS changes Recall the Flair Furniture problem Sensitivity to Coefficients Graphical solution of Example 1 x1 + x2 < 8 Max 5x1 + 7x2 Example 1: Max 5x1 + 7x2 s.t. x1 6 2x1 + 3x2 < 19 x1 + x2 < 8 x1 > 0 and x2 > 0 x1 < 6 Optimal solution: x1 = 5, x2 = 3 2x1 + 3x2 < 19 Feasible region Sensitivity to Coefficients Range of optimality for c1 Compute the range of optimality for c1 in Example 1. The slope of an objective function line, Max c1x1 + c2x2, is c1/c2. The slope of the binding third constraint, x1 + x2 = 8, is -1. The slope of the binding second constraint, 2x1 + 3x2 = 19, is -2/3. Find the range of values for c1 (with c2 staying 7) such that the objective-function line slope lies between that of the two binding constraints: Example 1: -1 < -c1/7 < -2/3 Max 5x1 + 7x2 Multiplying by -1, 1 > c1/7 > 2/3 s.t. x1 < 6 Multiplying by 7, 7 > c1 > 14/3 2x1 + 3x2 < 19 x 1 + x2 < 8 x1 > 0 and x2 > 0 Sensitivity to Coefficients Range of optimality for c2 Likewise, compute the range of optimality for c2 in Example 1. The slope of the binding third constraint is -1. The slope of the binding second constraint is -2/3. Find the range of values for c2 (with c1 staying 5) such that the objective-function line slope lies between that of the two binding constraints: Example 1: -1 < -5/c2 < -2/3 Example 1: Max 5x1 + 7x2 Max 5x + 7x Multiplying by -1, 1 > 5/c2 > 2/3 s.t. x1 < 6 s.t. x < 6 Inverting, 1 < c2/5 < 3/2 2x + 3x < 19 2x1 + 3x 2 < 19 xx1 ++ xx2 << 8 8 , x1x >>00 and and xx2 >>00 Multiplying by 5 5 < c2 < 15/2 1 2 1 1 1 2 1 2 2 Sensitivity to Coefficients Graphical solution of Example 1 1200 Cutting & Dyeing 0,1062 FinishingLine Max 7S + 9D 7/10S+1D<=630 (Cutting & dyeing) 1/2S+5/6D <=600 Sewing 1S+2/3D<=708 Finishing 1/10S+1/4D<=135 Inspection & Packaging 1000 800 0, 630 600 400 200 708,0 0 0 200 400 600 800 900,0 1000 Optimal solution: S=540,D=252 1. objective function 2. Cutting Line 3.Finishing Line This point will be an optimal solution as long as: slope of line A <=slope of the objective function <= slope of line A i.e. the slope of the objective function should be in between these two lines 7/10S+D=630 (C&D) D=-7/10S+630 S+2/3D=708 (Finishing) D=-3/2S+1062 -3/2<=slope of objective function <=-7/10 -3/2<=-Cs/Cd<=-7/10 if we put profit contribution of delux bag same i.e 9 -3/2<=-Cs/9<=-7/10 Cs>=3*9/2 Cs>=27/2 Cs>=13.5 Cs>=63/10 Cs>=6.3 6.3 <=Cs<=13.5 (limits for Cs with same optimal solution) Similarly the keeping profit contribution of S bag constant. Cs=10 6.67<=Cd<=14.29 (range of optimality) If both the Cs, Cd are changed simultaneously (i.e S bags to 13, D bags to 8) Calculate the slope again: -cs/cd =-13/8=-1.625 -3/2<=-Cs/Cs<=-7/10 now -Cs/Cd=-1.625 which is less than -3/2 which is not acceptable according to above equation hence this means if we change the both cofficient than 540 and 252 would not be the optimal solution. EFFECT OF CHANGE OF THE RIGH HAND SIDE OF THE CONSTRAINT. suppose if additional 10 hrs is added to cutting and dyeing constraint 7/10S+1d<=640 ??? Feasible region extended, find extreme point using intersection of two lines S=527.5 ,D=270.75 Max 10S+9D Profit= 7711.75 which is 7711.75-7668.00 =43.75 Increase in profit/hr = DUAL PRICE It is the improvement in the optimal solution per unit increase in the RHS of contraint .if dual price is negative this means value of objective function will not improved rather it would get worse ,if value at rhs of the constrain is increased by 1 unit . for minimization problem it means cost will increase by 10. 100 % RULE FOR OBJECTIVE FUNCTION COFFICIENTS & CONSTRAINT For all the objective functions that are changed the sum of percentages of allowable increase and allowable decrease if does not exceed by 100% then optimal solution will not change. However this does not means that if sum of the percentage is exceed by 100% then optimal solution will change , in that case the problem must be resolved . This rule is equally applicable on the constraints RHS. EXAMPLE S is changed from 10$ to 11.50$; D is reduced from $9 to $8.25 Range of optimality from the sensitivity analysis : allowable upper limit for S= 13.49; Value of S =$10 Allowable increase in S= 13.49-10 =3.49 for the present case D is reduced from $9 to $8.25 the increase in percentage is 1.5*100/3.49=42.86% of allowable increase EXAMPLE For D allowable lower limit is 6.66 Value of D=9 allowable Decrease =9-6.66=2.33 for present case =0.75/2.33*100= 32.14 of allowable decrease. sum of allowable increase and decrease is 42.86% + 32.14% <100% hence optimal solution is still valid S=540 and D-252. FLAIR FURNITURE PROBLEM Max 7T + 5C (profit) Subject to the constraints: 3T + 4C < 2400 (carpentry hrs) 2T + 1C < 1000(painting hrs) C < 450 (max # chairs) T > 100 T, C > 0 (min # tables) (nonnegativity) OBJECTIVE FUNCTION COEFFICIENT (OFC) CHANGES What if the profit contribution for tables changed from $7 to $8 per table? 8 Max 7 T + 5 C (profit) X Clearly profit goes up, but would we want to make more tables and less chairs? (i.e. Does the optimal solution change?) Find the range of optimality with graph. C Original Objective Function 7T + 5 C = $4040 Revised Objective Function 8T + 5 C = $4360 Optimal Corner (T=320, C=360) Still optimal 500 400 300 200 Feasible Region 100 0 0 100 200 300 400 500 T C 1000 What if the OFC became higher? Or lower? 11T + 5C = $5500 Optimal Solution (T=500, C=0) Both have new optimal corner points 600 450 3T + 5C = $2850 Optimal Solution (T=200, C=450) Feasible Region 0 0 100 500 800 T There is a range for each OFC where the current optimal corner point remains optimal. If the OFC changes beyond that range a new corner point becomes optimal. Excel’s Solver will calculate the OFC range. RIGHT HAND SIDE (RHS) CHANGES What if painting hours available changed from 1000 to 1300? 1300 X 2T + 1C < 1000 (painting hrs) This increase in resources could allow us to increase production and profit. CHARACTERISTICS OF RHS CHANGES The constraint line shifts, which could change the feasible region Slope of constraint line does not change Corner point locations can change The optimal solution can change Old optimal corner point (T=320,C=360) Profit=$4040 C 500 Feasible region becomes larger 400 New optimal corner point (T=560,C=180) Profit=$4820 300 200 Original 100 Feasible Region 0 0 100 200 300 400 500 600 T EFFECT ON OBJECTIVE FUNCTION VALUE New profit Old profit Profit increase = $4,820 = $4,040 = $780 from 300 additional painting hours $2.60 in profit per hour of painting Each additional hour will increase profit by $2.60 Each hour lost will decrease profit by $2.60 ANDERSON ELECTRONICS EXAMPLE Decision: How many of each of 4 products to make? Objective: Maximize profit Decision Variables: V = number of VCR’s S = number of stereos T = number of TV’s D = number of DVD players Max 29V + 32S + 72T + 54D (in $ of profit) Subject to the constraints: 3V + 4S + 4T + 3D < 4700 2V + 2S + 4T + 3D < 4500 V + S + 3T + 2D < 2500 V, S, T, D > 0 (elec. components) (nonelec. components) (assembly hours) (nonnegativity) Go to file 4-2.xls RHS Change Questions What if the supply of nonelectrical components changes? What happens if the supply of electrical components increased by 400 (to 5100)? increased by 4000 (to 8700)? What if we could buy an additional 400 elec. components for $1 more than usual? Would we want to buy them? What if would could get an additional 250 hours of assembly time by paying $5 per hour more than usual? Would this be profitable? DECISION VARIABLES THAT EQUAL 0 We are not currently making any VCR’s (V=0) because they are not profitable enough. How much would profit need to increase before we would want to begin making VCR’s? REDUCED COST OF A DECISION VARIABLE (marginal contribution to the obj. func. value) - (marginal value of resources used) = Reduced Cost marginal profit of a VCR = $29 - marginal value of resources = ? Reduced Cost of a VCR = - $1.0 Reduced Cost is: The minimum amount by which the OFC of a variable should change to cause that variable to become non-zero. The amount by which the objective function value would change if the variable were forced to change from 0 to 1. OFC CHANGE QUESTIONS For what range of profit contributions for DVD players will the current solution remain optimal? What happens to profit if this value drops to $50 per DVD player? ALTERNATE OPTIMAL SOLUTIONS May be present when there are 0’s in the Allowable Increase or Allowable Decrease values for OFC values. SIMULTANEOUS CHANGES All changes discussed up to this point have involved only 1 change at a time. What if several OFC’s change? Or What if several RHS’s change? Note: they cannot be mixed THE 100% RULE ∑ (change / allowable change) < 1 RHS Example Electrical components decrease 500 500 / 950 = 0.5263 Assembly hours increase 200 200 / 466.67 = 0.4285 0.9548 The sensitivity report can still be used PRICING NEW VARIABLES Suppose they are considering selling a new product, Home Theater Systems (HTS) Need to determine whether making HTS’s would be sufficiently profitable Producing HTS’s would take limited resources away from other products To produce one HTS requires: 5 electrical components 4 nonelectrical components 4 hours of assembly time Can shadow prices be used to calculate reduction in profit from other products? (check 100% rule) 5/950 + 4/560 + 4/1325 = 0.015 < 1 REQUIRED PROFIT CONTRIBUTION PER HTS elec cpnts 5 x $ 2 = $10 nonelec cpnts 4 x $ 0 = $ 0 assembly hrs 4 x $24 = $96 $106 Shadow Prices Making 1 HTS will reduce profit (from other products) by $106 • Need (HTS profit contribution) > $106 • Cost to produce each HTS: elec cpnts 5 x $ 7 = $35 nonelec cpnts 4 x $ 5 = $20 assembly hrs 4 x $10 = $40 $95 (HTS profit contribution) = (selling price) - $95 So selling price must be at least $201 IS HTS SUFFICIENTLY PROFITABLE? Marketing estimates that selling price should not exceed $175 Producing one HTS will cause profit to fall by $26 ($201 - $175) Go to file 4-3.xls SENSITIVITY ANALYSIS FOR A MINIMIZATION PROBLEM Burn-Off makes a “miracle” diet drink Decision: How much of each of 4 ingredients to use? Objective: Minimize cost of ingredients DATA Units of Chemical per Ounce of Ingredient Ingredient X A 3 B 4 C 8 D 10 > 280 units Y 5 3 6 6 > 200 units Z 10 25 20 40 < 1050 units Chemical $ per ounce of ingredient $0.40 $0.20 $0.60 $0.30 Requirement Min 0.40A + 0.20B + 0.60C + 0.30D ($ of cost) Subject to the constraints A+B+C+D > 36 (min daily ounces) 3A + 4B + 8C + 10D > 280 (chem x min) 5A + 3B + 6C + 6D > 200 (chem y min) 10A + 25B + 20C + 40D < 280 (chem z max) A, B, C, > 0 Go to file 4-5.xls