Dr. Maddah ENMG 500 /9/07 Sensitivity Analysis Changes in the RHS (b) Consider an optimal LP solution. Suppose that the original RHS (b) is changed from b 0 to b new. In the following, we study the affect of this change the optimal solution. First, note that changing b will not affect optimality. Recall that optimality is based on the conditionc B A c z c 0, for all variables x j (for B j j j j max problems). Changing b will not affect z j c j. Hence, changing b will not affect optimality. However; changing b may affect feasibility. To check, whether the LP is still feasible after changing b from b 0 to b new compute x new = B - b new. If x new new 0 (i.e., x 0, for all i), then the LP is still feasible and the optimal solution is x new. i new If x 0, for some i, then the current basic solution is no longer feasible. Then, i the dual simplex method is used to restore feasibility (leading to a new optimal basis). Note that when the LP remains feasible the rate of change of the optimal objective function, Z,as a function of a RHS value b i is y i the corresponding dual variable. This follows by noting that Z b i y i and Z b i y. Therefore, changing the b i by unit will change Z by y i (assuming that this change will not affect feasibility ) i Example. consider the LP max Z = 3x + x + 5x 3 s.t. x + x + x 3 430 3x + x 3 460 x + 4x 40 x, x, x 3 0 Let S, S, S 3 be the slack variables corresponding to the three constraints. Upon solving the LP, the optimal simplex tableau is as follows.
x x x 3 S S S 3 RHS Z 4 0 0 0 350 x -/4 0 / -/4 0 00 x 3 3/ 0 0 / 0 30 S 3 0 0-0 The optimal solution is x = 0, x = 00, x 3 = 30, and Z = 350. 430 500 Suppose that b is changed from 460 to 460. What is the new optimal 40 600 solution? 0 4 500 35 new new 0 x B b 0 460 30 0. 600 60 Since x new is feasible. Then, the new optimal solution is x new = x new. That is, the new optimal solution is x new = 0, x new = 35, x new 3 = 30, and the new optimal objective value is Z new = c B x new = ( 5 35 0) 30 = 40. Note that Z new can 60 also be obtained using duality. From the simplex tableau, the optimal dual solution is y =, y =, y 3 = 0. Then, Z new = Z new + (b b ) y + ( b new b ) y + ( b new 3 b 3 ) y 3 = 350 + (500 430) + (460 460) + (600 40) 0 = 40. 430 450 What if b is changed from 460 to 460? 40 400 0 4 450 0 new 0 x B b 0 460 30. 400 40 In this case, x new is not feasible. The new optimal solution is obtained by applying the dual simplex method. First, change the RHS of the optimal tableau to x new and the 0 objective value to Z(x new ) = c B x new = ( 5 0) 30 370. 40
x x x 3 S S S 3 RHS Z 4 0 0 0 370 x -/4 0 / -/4 0 0 x 3 3/ 0 0 ½ 0 30 S 3 0 0 - -40 Ratio -- -- -- / -- -- -- x x x 3 S S S 3 RHS Z 5 0 0 0 5/ / 350 x /4 0 0 0 /4 00 x 3 3/ 0 0 / 0 30 S - 0 0 -/ -/ 0 The last tableau is optimal (RHS > 0). The new optimal solution x new is x new = 0, x new = 00, x 3 new = 30, and Z new = 350. Range of b i where LP remains feasible In Example, suppose only b is changed to b +. In the following, we find the range of that keeps the LP feasible (and keeps the current basis (x, x 3, S 3 ) optimal). With this change x new =B - b new = 4 0 0 0 430 00 460 30. 40 0 LP remains feasible if x new > 0 00 0 00 0 0 0. Then, LP remains feasible if 00 0, or equivalently 30 b 440. Graphically, Z(b ) 350+(440 430) = 360 350 350 (430 30) = 50 y = y new 30 430 440 b 3
Adding a new Constraint When a new constraint is added, the optimal solution does not improve. If the current optimal solution satisfies the new constraint, the optimal solution does not change. Graphically, x New constraint Otherwise, if the optimal solution does not satisfy the constraint, the current optimal solution becomes infeasible, and a new optimal solution could be obtained using the dual simplex method. Graphically, x x new New constraint Example. Suppose the constraint 3x + x + x 3 500 is added to the LP in Example. What is the new optimal solution? The current optimal solution x = 0, x = 00, and x 3 = 30, satisfies the constraint (since 30 + 00+ 30 = 330 < 500 ). The optimal solution does not change. 4
Suppose the constraint 3x + 3x + x 3 500 is added to the LP in Example. What is the new optimal solution? The current optimal solution does not satisfy the constraint (since 30+300 + 30 = 530 > 500). Then, add the constraint to the simplex tableau, rearrange the tableau (to be in the right form) and proceed with the dual simplex method. Let S 4 be the slack variable corresponding to the new constraint. x x x 3 S S S 3 S 4 RHS Z 4 0 0 0 0 350 x -/4 0 / -/4 0 0 00 x 3 3/ 0 0 / 0 0 30 S 3 0 0-0 0 S 4 3 3 0 0 0 500 Rearrange the tableau so that the basic variables x and x 3 have zero coefficients in the S 4 row (note that S 4 is now considered a basic variable). Then apply dual simplex. l 4 = l 4 l 3l x x x 3 S S S 3 S 4 RHS Z 4 0 0 0 0 350 x -/4 0 / -/4 0 0 00 x 3 3/ 0 0 / 0 0 30 S 3 0 0-0 0 S 4 9/4 0 0-3/ /4 0-30 Ratio -- -- -- /3 -- -- -- x x x 3 S S S 3 S 4 RHS Z / 0 0 0 3/6 0 /3 330 x / 0 0 -/6 0 /3 90 x 3 3/ 0 0 / 0 0 30 S 3-0 0 0 /3-4/3 60 S -3/ 0 0 -/6 0 -/3 0 The last tableau is optimal. The new optimal solution is x new = 0, x new = 90, x 3 new = 30, and Z new = 330. 5
3 Changes in the objective function coefficients (c) Consider an optimal LP tableau. Recall that the RHS is given by B - b. Therefore, changing c will not affect feasibility. It will only affect the optimality conditions given by c B A c z c 0, (for max problems). When c is B j j j j changed from c 0 to c new, two situations could result: new i) The optimality conditions continue to hold (if z c 0, for all j, for max problems). Then, the optimal solution does not change (but the optimal objective value Z new new = c B x could change). new ii) The optimality conditions do not hold anymore ( z c 0, for some j, for max problems). Then, the optimal solution changes. The (usual primal ) simplex method is used to obtain a new optimal solution. j j j j Example 3. In the LP of Example, suppose the objective function is changed from Z = 3x + x + 5x 3 to Z = x + 3x + 4x 3. That is, c is changed from c 0 = (3 5 ) to c new = ( 3 4). What is the new optimal solution? In terms of the current optimal solution basis (x, x 3, S 3 ), c B is changed from 0 c B = ( 5 0) to c new B = (3 4 0). Then z new j c new j for nonbasic variables are x S S 0 4 0 0 0 c new B B - N c new N = (3 4 0) 0 0 3 0 0 0 0 0 = ( 3 5 0) 3 0 0 0 4 = (/4 3/ 5/4) ( 0 0) x S S = 3 3 5 4 4 0. Therefore, the optimal solution remains the same, x = 0, x = 00, x 3 = 30, and 0 6
00 Z new = c new B x = (3 4 0) 30 =0. 0 Suppose now that c is changed from c 0 = (3 5) to c new =(6 3 4). What is the new optimal solution? In this case, c B is changed from c 0 B = ( 5 0) to c new B = (3 4 0), and z new j c new j (j nonbasic) is given by x S S c new B B - N c new N = (/4 3/ 5/4) (6 0 0) = 3 3 5 4 4. The current solution is no longer optimal. Modify the Z-row of the current simplex tableau is as follow. Z new = c new B x 0 = 0 x x x 3 S S S 3 RHS Ratio Z -3/4 0 0 3/ 5/4 0 0 -- x -/4 0 / -/4 0 00 -- x 3 3/ 0 0 / 0 30 460/3 S 3 0 0-0 0 Then, proceed with the simplex method. x x x 3 S S S 3 RHS Z 0 0 0 3/4 3/8 3/8 455/ x 0 0 /4 -/8 /8 05/ x 3 0 0 3/ -/4-3/4 5 x 0 0 - / / 0 The last tableau is optimal. The new optimal solution is x new = 0, x new = 05/, x 3 new = 5, and Z new = 45/. Optimality Range of c j Suppose, in the LP of Example, c is changed to c +. In the following, we find the range of values that keep the LP optimal with the current basis. In this case, c new =(3+ 5), and c new B = ( 5 0). Then, z j - c j (j nonbasic) is given by 7
x S S 0 4 0 0 0 c new B B - N c new N = ( 5 0) 0 0 3 0 3 0 0 = (4 ) Then, LP is optimal if 4 0 4 c 7. Remark. In cases like the above where c j is changed for j nonbasic.the optimality range for c j can be deduced directly from the current optimal tableau.the corresponding is the coefficient of x j in the Z-row of the current optimal tableau. This coefficient is called reduced cost of x j. It represents the minimum amount by which the objective function coefficient of x j should be improved in order for x j to become basic. E.g., in the above, increasing c by 4 will make x basic. 4 Addition of a new variable x j The new variable, x j, can be thought of as a nonbasic variable. Consider an optimal tableau. To investigate the effect of adding the new variable x j find z j c j = c B B - A j c j = y A j c j, where y is the current dual variables vector (y is given by the Z-row coefficients of the starting basic variables). If z j c j 0 (for max problem), the optimal solution is unchanged with x j = 0 (since x j is nonbasic). Otherwise, if z j c j < 0, then use the simplex method to find a new optimal solution with possibly x j > 0 (since x j enters the basis). Example 4. In the LP of Example, suppose the variable x 4 with c 4 =, and A 4 = added. Then, z 4 c 4 = y A 4 c 4 = 0 = 3 = > 0. is 8
Therefore, the optimal solution is unchanged with x = 0, x = 0, x 3= 30, x 4 = 0, and Z =350. Suppose now that x 4 with c 4 = 4 and A 4 = is added. Then, z 4 c 4 = y A 4 c 4 = 0 4 = 3 4 = < 0. Therefore, the current solution is no longer optimal. Add x 4 to the simplex tableau and proceed with the simplex method. The coefficient of x 4 in the Z-row is z 4 c 4 = -. The constraint coefficients corresponding to x 4 are given by B 0 4 4 A 4 0 0. The new simplex tableau is given below with subsequent simplex iterations. x x x 3 x 4 S S S 3 RHS Ratio Z 4 0 0-0 350 -- x -/4 0 /4 / -/4 0 00 400 x 3 3/ 0 / 0 / 0 30 460 S 3 0 0-0 0 x x x 3 x 4 S S S 3 RHS Ratio Z 6 0 0 0-3 370 -- x -3/4 0 0 -/ -/4 95 95 x 3 / 0 0 0 -/ 0 0 x 4 0 0-0 -- x x x 3 x 4 S S S 3 RHS Z /4 0 0 0 5/ 3/4 465 S -3/4 0 0 -/ -/4 95 x 3 5/4-0 0 / -/4 5 x 4 / 0 0 0 / 0 The last tableau is optimal. The new optimal solution (with x 4 basic) is x = 0, x = 0, x 3 = 5, x 4 = 0, and Z =465. 9
Remarks. Determining the effect of changing the constraint coefficients of a nonbasic variable is similar to the above. Determining the effect of changing the constraint coefficients of a basic variable is a bit more involved. But it can be done by applying similar principles (see, for example, Bazaraa et al., Linear Programming and Network Flows). 0