SENSITIVITY ANALYSIS* MGTS 2010 SECTIONS U, R, & V
Murat Kristal
EXAMPLE 1: Winco sells 4 types of products. The resources needed to produce one unit of each and the sales prices are given below: Table 1: Cost & Resource Requirements for Winco: Product 1 Product 2 Raw material 2 3 Hours of labor 3 4 Sales price $4 $6
Product 3 4 5 $7
Product 4 7 6 $8
At present, 46000 units of raw material and 5000 labor hours are available. To meet customer demands, exactly 950 total units must be produced. Customers also demand that at least 400 units of product 4 be produced. Formulate an LP that can be used to maximize Winco’s sales revenue. Solution: Let xi = number of units of product i produced by Winco max z = 4x1 + 6x2 + 7x3 + 8x4 s.t. x1 + x2 + x3 + x4 = 950 x4 >= 400 2x1 + 3x2 + 4x3 + 7x4 =< 4600 3x1 + 4x2 + 5x3 + 6x4 =< 5000 x1, x2, x3, x4 >= 0 Excel output is given below: Cost and Resource Requirements for Winco Product 1 Raw Material Hours of Labor Sales Price
Product 2 2 3 $4
Product 3 3 4 $6
Product 4 4 5 $7
7 6 $8
Total Demand Min # of Product 4 Available raw material Available labor hours 950 400 4600 5000 Total Number of Number of Product 4 Amount of raw materials Amount of labor hours Units produced Produced used used 950 400 4600 4750
Product 1 Units to be produced Sales Revenue
Product 2 0 6650
Product 3 400
* SOURCE: Winston, W.L. Operations Research, Applications & Algorithms
Product 4 150
400
1
SENSITIVITY ANALYSIS* MGTS 2010 SECTIONS U, R, & V
Murat Kristal
ANSWER REPORT: Target Cell (Max) Cell Name $B$20 Sales Revenue Product 1
Original Value 0
Final Value 6650
Adjustable Cells Cell Name $B$19 Units to be produced Product 1 $C$19 Units to be produced Product 2 $D$19 Units to be produced Product 3 $E$19 Units to be produced Product 4
Original Value 0 0 0 0
Final Value
Constraints Cell Name $B$15 Units produced $C$15 Produced $D$15 used $E$15 used
Cell Value 950 400 4600 4750
0 400 150 400
Formula $B$15=$C$11 $D$15 0 will have a zero shadow price. It also implies that any constraint with a non-zero shadow price must be binding (have slack or excess equal to 0). To illustrate these ideas, consider the labor constraint in Example 1. This constraint has positive slack, so its shadow price must be 0. This is reasonable, because slack = 250 for this constraint indicates that 250 hours of currently available labor are unused at present. Thus, an extra hour of labor would not increase revenues. Now consider the raw material constraint of Example 1. Since this constraint has a non-zero shadow price, it must have slack = 0. This is reasonable; the non-zero shadow price means that additional raw material will increase revenue. This can be the case only if all presently available raw materials are now being used. Managerial Use of Shadow Prices: EXAMPLE 4: In Example 1, what is the most that Winco should be willing to pay for an additional unit of raw material? How about an extra hour of labor ? Solution: Since the shadow price of the raw-material availability constraint is 1, an extra unit would increase total revenue by $1. Thus, Winco would pay up to $1 for an extra unit of raw material and be as well off as it is now. The labor availability constraint has a shadow price of 0. This means that an extra hour of labor will not increase revenues, so Winco should not be willing to pay anything for an extra hour of labor. EXAMPLE 5: Lets’ consider Example 1 with the following changes. Suppose up to 4600 units of raw material are available, but they must be purchased at a cost of $4 per unit. Also, up to 5000 hours of labor are available, but they must be purchased at a cost of $6 per hour.
* SOURCE: Winston, W.L. Operations Research, Applications & Algorithms
5
SENSITIVITY ANALYSIS* MGTS 2010 SECTIONS U, R, & V
Murat Kristal
The per unit sales price of each product is as follows: product 1 - $30; product 2 - $42; product 3 - $53; product 4 - $ 72. A total of 950 units must be produced, of which at least 400 must be product 4. Determine the maximum amount that the firm should be willing to pay for an extra unit of raw material and an extra hour of labor. Solution: The contribution to profit from one unit of each product may be computed as follows: Product 1: 30 – 4(2) – 6(3) = $4 Product 2: 42 – 4(3) – 6(4) = $6 Product 3: 53 – 4(4) – 6(5) = $7 Product 4: 72 – 4(7) – 6(6) = $8 Thus, Winco’s profit is 4x1 + 6x2 + 7x3 + 8x4. To maximize profit, Winco should solve the same LP as in Example 1, and the relevant Excel Output is given in ANSWER REPORT above. To determine the most Winco should be willing to pay for an extra unit of raw material, note that the shadow price of the raw material constraint may be interpreted as follows: If Winco has the right to buy one more unit of raw material (at $4 per unit), then the profits increase by $1. Thus, paying $4 + $1 = $5 for an extra unit of raw materials will increase the profits by $1 - $1 = 0. SO Winco could pay up to $5 for an extra unit of raw material and still be better off. For the raw material constraint, the shadow price of $1 represents a premium above the current price Winco is willing to pay for an extra unit of raw material. The shadow price of the labor availability constraint is $0, which means that the right to buy an extra hour of labor will not increase the profits. This tells us that at the current price of $4 per hour, Winco should not buy extra labor. EXAMPLE 6: (A DIET PROBLEM FOR A COLLEGE STUDENT) A college student’s diet requires that all the food he eats come from one of the four “basic food groups” (chocolate cake, ice cream, soda, and cheese cake). At the present, the following four foods are available for consumption: brownies, chocolate ice cream, cola, and pineapple cheesecake. Each brownie costs 50 cents, each scoop of chocolate ice cream costs 20 cents, each bottle of cola costs 30 cents, and each piece of pineapple cheesecake costs 80 cents. Each day, he must ingest at least 500 calories, 6 oz chocolate, 10 oz of sugar, and 8 oz of fat. The nutritional content per unit of each food is shown in Table 2 below. Formulate a linear programming model that can be used to satisfy this college student’s daily requirements at minimum cost. Table 2: Nutritional values for Diet Calories Brownie 400 Chocolate ice cream (1 scoop) 200 Cola (1 bottle) 150 Pineapple cheesecake (1 piece) 500
Chocolate (ounces) 3 2 0 0
Sugar (ounces) 2 2 4 4
Fat (ounces) 2 4 1 5
Solution: Decision variables:
* SOURCE: Winston, W.L. Operations Research, Applications & Algorithms
6
SENSITIVITY ANALYSIS* MGTS 2010 SECTIONS U, R, & V
Murat Kristal
X1 = number of brownies eaten daily X2 = number of scoops of chocolate ice cream eaten daily X3 = bottles of cola drunk daily X4 = pieces of pineapple cheesecake eaten daily Constraints: Constraint 1: Daily calorie intake must be at least 500 calories Constraint 2: Daily chocolate intake must be at least 6 oz. Constraint 3: Daily sugar intake must be at least 10 oz. Constraint 4: Daily fat intake must be at least 8 oz. LP: min z = 50X1 + 20X2 + 30X3 + 80X4 s.t. 400X1 + 200X2 + 150 X3 + 500X4 >= 500 3X1 + 2X2 + >= 6 2X1 + 2X2 + 4X3 + 4X4 >= 10 2X1 + 4X2 + X3 + 5X4 >= 8 X1, X2, X3, X4 >= 0. Excel representation: Nutrition for a college student
Brownie Chocolate ice cream (1 scoop) Cola (1 bottle) Pineapple cheesecake (1 piece) Minimum requirements for the diet Daily values achieved
Calories Chocolate (ounces) Sugar (ounces) Fat (ounces) Cost (in cents) Amount Consumed 400 3 2 2 50 0 200 2 2 4 20 3 150 0 4 1 30 1 500 0 4 5 80 0 500 6 10 8 90 750 6 10 13
ANSWER REPORT: Target Cell (Min) Cell Name $F$11 Minimum requirements for the diet Cost (in cents)
Original Value 0
Final Value 90
Adjustable Cells Cell Name $G$7 Brownie Amount Consumed $G$8 Chocolate ice cream (1 scoop) Amount Consumed $G$9 Cola (1 bottle) Amount Consumed $G$10 Pineapple cheesecake (1 piece) Amount Consumed
Original Value 0 0 0 0
Final Value
Constraints Cell $B$12 Daily values achieved $C$12 Daily values achieved $D$12 Daily values achieved $E$12 Daily values achieved
Name Calories Chocolate (ounces) Sugar (ounces) Fat (ounces)
Cell Value 750 6 10 13
0 3 1 0
Formula $B$12>=$B$11 $C$12>=$C$11 $D$12>=$D$11 $E$12>=$E$11
* SOURCE: Winston, W.L. Operations Research, Applications & Algorithms
Status Slack Not Binding 250 Binding 0 Binding 0 Not Binding 5
7
SENSITIVITY ANALYSIS* MGTS 2010 SECTIONS U, R, & V
Murat Kristal
SENSITIVITY REPORT: Adjustable Cells Cell $G$7 $G$8 $G$9 $G$10
Name Brownie Amount Consumed Chocolate ice cream (1 scoop) Amount Consumed Cola (1 bottle) Amount Consumed Pineapple cheesecake (1 piece) Amount Consumed
Final Reduced Objective Allowable Value Cost Coefficient Increase 0 27.5 50 1E+30 3 0 20 18.33333333 1 0 30 10 0 50 80 1E+30
Allowable Decrease 27.5 5 30 50
Constraints Cell $B$12 $C$12 $D$12 $E$12
Daily values achieved Daily values achieved Daily values achieved Daily values achieved
Name Calories Chocolate (ounces) Sugar (ounces) Fat (ounces)
Final Shadow Constraint Value Price R.H. Side 750 0 500 6 2.5 6 10 7.5 10 13 0 8
Allowable Allowable Increase Decrease 250 1E+30 4 2.857142857 1E+30 4 5 1E+30
Sensitivity Analysis When More Than One Parameter is Changed: The 100% Rule: The 100% Rule for Changing Objective Function Coefficients: Case 1 All variables whose objective function coefficients are changed have nonzero reduced costs in the optimal row 0. Case 2 At least one variable whose objective function coefficient is changed has a reduced cost of zero. In Case 1, the current basis remains optimal if and only if the objective function coefficient for each variable remains within the allowable range given in the Excel Output. If the current basis remains optimal, both the values of the decision variables and objective function remain unchanged. If the objective function coefficient for any variable is outside its allowable range, the current basis is no longer optimal. EXAMPLE 7: (Please refer to Example 6) Suppose the price of a brownie increase to 60 cents and a piece of pineapple cheesecake decreases to 50 cents. Does the current basis remain optimal? What would be the new optimal solution? Solution: Since both brownies and pineapple cheesecake have nonzero reduced cost, we in Case 1. From SENSITIVITY REPORT we see that the current basis remains optimal if and only if 22.5 = 50 – 27.5 ≤ cost of a brownie ≤ 50 + ∞ 30 = 80 – 50 ≤ cost of a piece of cheesecake ≤ 80 + ∞ Since the new prices satisfy both of these conditions, the current basis remains optimal. Also the optimal z-value and the optimal value of the decision variables remains unchanged. EXAMPLE 8: (Please refer to Example 6)
* SOURCE: Winston, W.L. Operations Research, Applications & Algorithms
8
SENSITIVITY ANALYSIS* MGTS 2010 SECTIONS U, R, & V
Murat Kristal
If prices drop to 40 cent for brownie and 25 cents for a piece of pineapple cheesecake, is the current basis still optimal? Solution: The cost of the brownie remains in its allowable range, but the price of the pineapple cheesecake does not. Thus, the current basis is no longer optimal, and the problem should be solved again. In Case 2, we can often show that the current basis remains optimal by using the 100% Rule. Let C = original objective function coefficient for X ∆C = change in C I = maximum allowable increase in C for which the current basis remains optimal (from Excel Output) D = maximum allowable decrease in C for which current basis remains optimal (from Excel output) For each variable X, we define the ratio r: ∆C I − ∆C If ∆C ≤ 0, r = D
If ∆C ≥ 0, r =
If C is unchanged, r = 0. Thus, r measures the ratio of the actual change in C to the maximum allowable change in C that would keep the current basis optimal. If only one objective function coefficient were being changed, the current basis would remain optimal if r ≤ 1 (or equivalently, if r, expressed as a percentage, were less than or equal to 100%). The 100% Rule for objective function coefficients is a generalization of this idea. It ∑r ≤1 , we can be sure that the current basis remains optimal. If ∑r >1 , the current basis may or may not be optimal; we can’t be sure. If the current basis does remain optimal, the values of the decision variables remain unchanged, but the optimal zvalue may change. EXAMPLE 9 The Dakota Furniture Company manufactures desks, tables, and chairs. The manufacture of each type of furniture requires lumber and two types of skilled labor: finishing & carpentry. The amount of each resource needed to make each type of furniture is given in Table 3.
* SOURCE: Winston, W.L. Operations Research, Applications & Algorithms
9
SENSITIVITY ANALYSIS* MGTS 2010 SECTIONS U, R, & V Table 3: Resource requirements for Dakota Furniture Resource Desk Table Lumber 8 board ft 6 board ft Finishing hours 4 hours 2 hours Carpentry hours 2 hours 1.5 hours
Murat Kristal
Chair 1 board ft 1.5 hours 0.5 hour
At present, 48 board feet of lumber, 20 finishing hours, and 8 carpentry hours are available. A desk sells for $60, a table for $30, and a chair for $20. Dakota believes that demand for desks and chairs is unlimited, but at most five tables can be sold. Since the available resources have already been purchased, Dakota wants to maximize total revenue. Decision variables X1 = number of desks produced X2 = number of tables produced X3 = number of chairs produced LP: max z = 60X1 + 30X2 + 20X3 s.t. 8X1 + 6X2 + X3 ≤ 48 4X1 + 2X2 + 1.5X3 ≤ 20 2X1 + 1.5X2 + 0.5X3 ≤ 8 X2 ≤ 5 X1, X2, X3 ≥ 0 Excel Representation Resource Requirements for Dakota Furniture Resource Lumber Finishing hours Carpentry hours Maximum Demand Revenue from each product Total Production Total Revenue
Desk 8 4 2 8
Table 6 2 1.5 5
60 2 280
30 0
Chair Available Resources Resources Used 1 48 24 1.5 20 20 0.5 8 8 8 20 8
* SOURCE: Winston, W.L. Operations Research, Applications & Algorithms
10
SENSITIVITY ANALYSIS* MGTS 2010 SECTIONS U, R, & V
Murat Kristal
ANSWER REPORT Target Cell (Max) Cell Name $B$12 Total Revenue 8
Original Value 0
Final Value 280
Adjustable Cells Cell Name $B$11 Total Production 8 $C$11 Total Production Table $D$11 Total Production 8
Original Value 0 0 0
Final Value
Cell Value
Formula $F$5