Lab 10 – Sensitivity Review April 10, 2012 Cattle Feeding A cattle

advertisement
Lab 10 – Sensitivity Review
April 10, 2012
Cattle Feeding
A cattle feeder normally purchases a prepared feed mix (called Superfeed). Superfeed is purchased in
2.5 pound units for $2.00. This feed mix meets the dietary requirements for protein, calcium, iron,
and calories. The cattle feeder wants to know if it is possible to use corn, beans, oats, and hay to
produce a comparable feed mix at lower cost (i.e. the cost of 2.5 lbs is less than $2.00).
The information for Superfeed is given below in table 1. Note that the nutritional requirements are
lower bounds, meaning they are minimums that have to be met while the intake constraint is a
maximum amount that can be consumed.
Table 1. Superfeed nutrient contributions
Nutrient
Requirement
Boundary Type
Protein
30 grams
Lower
Calcium
70 grams
Lower
Iron
12 grams
Lower
Calories
4400 calories
Lower
Intake
2.5 pounds
Upper
We can set this up as an optimization problem to determine if some combination of the feed
ingredients will lower the cost we are paying to the feed mixer. We begin with the simple
optimization where we choose the level of the Superfeed to use to feed a single animal. The model
Superfeed below is in the Lab 10 spreadsheet under the sheet ‘Superfeed’. What do you anticipate
the solution to this problem to be? Solve the spreadsheet model to verify your answer and open the
sensitivity sheet.
min C  200 x
s.t.
protein : 30 x  30
calcium : 70 x  70
iron : 12 x  12
calories : 4400 x  4400
Intake : 2.5 x  2.5
x0
(Superfeed)
The optimal solution is to feed one unit of x, at a total cost of 200 cents. As it turns out, this is not
only the optimal solution but it is also the only feasible solution because Superfeed has exactly the
minimum requirements for nutrients while also generating the maximum intake. The shadow prices
for the Superfeed problem are given in table 2.
Table 2. Shadow Prices from Solution to Superfeed Problem
Constraint
RHS
LHS
Protein (grams)
30
30
0.00
Calcium (grams)
70
70
0.00
Iron (grams)
12
12
0.00
Calories (cals)
4400
4400
0.00
2.5
2.5
80.00
Intake (lbs.)
Shadow Price
Note the similarity of this solution to the case when we have a redundant binding constraint. For
every constraint in this problem the RHS=LHS meaning the slack for each constraint is equal to
zero, but only one of the shadow prices is non-zero. As a rule, we can never have more non-zero
shadow prices than we have choice variables (see the review handout).
It turns out that the constraint that gets the non-zero shadow price is somewhat arbitrary. MS Excel
solves the problem in an iterative (i.e. step-by-step) fashion. The last constraint the Solver algorithm
addresses will get the non-zero shadow price. You can test this by changing the order of the
constraints in the problem, or you can take my word for it.
Moving on to our real question which is to find out if the cattle feeder can mix ingredients at a lower
cost than the price paid for Superfeed we can begin adding choices to the feed mix problem to see if
the solution changes. Adding these one at a time until Superfeed and the four new feeds are included
as choice variables.
We have covered the case of adding choice variables to models and the implications these have for
the objective. The two possible outcomes are that the new problem will represent an improvement
(total cost is lowered) or will not (leaving total cost unchanged). Our first step is to revise the
problem to include c=corn as a possible feed along with x=Superfeed. Table 3 below gives us all of
the relevant information for the four feed ingredients we will eventually consider along with
Superfeed.
min C  200 x  60c
s.t.
protein : 30 x  12c  30
calcium : 70 x  60c  70
(Superfeed+C)
iron : 12 x  10c  12
calories : 4400 x  900c  4400
Intake : 2.5 x  1x  2.5
x, c  0
Table 3. Nutritional Composition and Costs of Feed Mix Ingredients
Ingredient
Corn
Beans
Oats
Hay
(1 lb)
(1 lb)
(1 lb)
(1 lb)
Protein (grams)
12
16
1
4
Calcium (grams)
60
40
46
40
Iron (grams)
10
8
6
8
Calories (cals)
900
1100
800
6000
Intake (lbs.)
1
1
1
1
Cost (cents)
60
94
88
40
Problem Superfeed+C is setup in the Lab 10 spreadsheet under the worksheet of the same name.
Before solving the problem do some analysis (using the spreadsheet) of the quality of corn as a feed.
The maximum amount of corn we can feed is 2.5 lbs. (from the intake constraint), so set the
quantity of corn to be fed at 2.5 and look at the LHS and RHS of constraints. It should become
apparent that feeding corn alone is not feasible due to the energy content (calories) being too low.
What is less apparent is that we already know the solution to this problem will be the same as when
considering only Superfeed. Recall that Superfeed exactly satisfies all of the constraints, which means
that it will take the whole 2.5 pounds of Superfeed to get the necessary calories. Reducing the
amount of Superfeed and adding corn which has a lower energy content will always be infeasible. To
see this, try inputting some small amount (c=0.0001) for corn and make the rest 1-(c/2.5) Superfeed
in your spreadsheet. You should see that while the calories constraint is close to satisfied, the
problem remains infeasible. Also note that if we were willing to lower the calories constraint that we
could reduce costs as this trial solution costs less than $2.00.
6
Solve
Superfeed+C using Superfeed and Corn as the two choice variables in the sheet
‘Superfeed+C’. This gives the anticipated solution of feeding one unit (2.5 lbs) of Superfeed and no
corn. Thus, adding only corn as a decision variable has not benefitted the decision maker by
reducing the minimized cost in the problem. Open the sensitivity report and look at the shadow
prices, note that with two choice variables we now have two non-zero shadow prices.
Payoff: 200.0 x + 60.0 c = 200.0
4
2
0
0
1
2
3
x
Optimal Decisions(x,c): ( 1.0, 0.0)
protein: 30.0x + 12.0c >= 30.0
calcium: 70.0x + 60.0c >= 70.0
iron: 12.0x + 10.0c >= 12.0
calories: 4400.0x + 900.0c >= 4400.0
Intake: 2.5x + 1.0c <= 2.5
Figure 1. Two variable feed mix (corn is on the y-axis)
While we have the problem limited to two variables we can graph the feasible space to see how
adding the choice of feeding corn affected the problem. Notice that all of the constraints intersect at
the point x=1 indicating that we still have but one corner point in the problem which the objective
line (dashed line) crosses through indicating the minimum cost.
Let’s move on adding in the next choice variable of beans (b). The model can be found in the sheet
‘Superfeed+C&B’. Solve this problem using the solver setup and you should find that one unit of
Superfeed is still the best choice meaning we do not feed any corn or beans. This result is not
unexpected. Recall from when we considered corn and Superfeed together that the deficiency of
corn was in providing energy (calories) to the feed mix. Beans have higher energy content (per lb.)
than does corn, but not enough so that 2.5 lbs. of beans will meet the energy requirement.
Moving on to other feeds, note that oats is lower in energy content (calories) than either corn and
beans, the constraint we are having trouble meeting in our formulations. With that in mind let’s
move to our final problem where we consider Superfeed along with all four the other ingredients
corn, beans, oats, and hay. This model is set up for you to solve in the sheet ‘Superfeed+AllIng’.
The Excel output below gives the solution to the problem.
Excel Output 1. Solution to the minimum feed cost problem
Objective (Minimize Total Cost)
Cell
Name
Original Value
$G$4 Total Cost
200.00
Final Value
168.76
Change
-31.24
Decision Variables
Cell
Name
$B$4 Corn
$C$4 Beans
$D$4 Oats
$E$4 Hay
$F$4 Superfeed
Final Value
1.33
0.78
0.00
0.39
0.00
Change
1.33
0.78
0.00
0.39
-1.00
Constraints
Cell
Name
$G$7 Protein
$G$8 Calcium
$G$9 Iron
$G$10 Calories
$G$11 Intake
Original Value
0.00
0.00
0.00
0.00
1.00
LHS
30.00
126.55
22.65
4400.00
2.50
Status
Binding
Not Binding
Not Binding
Binding
Binding
Slack
0.00
56.55
10.65
0.00
0.00
First examining total cost, we see that it is not optimal to use Superfeed in the mix as we can
produce a mix of corn, beans, and hay that will meet our requirements at a lower total cost. Our
lowest cost ration is 53% corn, 31% beans, and 16% hay (by weight) and represents a nearly 16%
reduction in the cost of feeding. Note that we have three non-zero decision variables and three
binding constraints so that we will expect shadow prices on the constraints for protein, calories, and
intake.
Turning to this sensitivity information given in Excel Output 2 below we see that indeed each of
these constraints has a non-zero shadow price. Recall that the signs on shadow prices for a
minimization problem are positive for a >= constraint and negative for a <= constraint. Thus, the
intake constraint indicates that if we increase the RHS it will result in a reduction in total cost. In this
case, increasing the RHS of the <= constraint on intake expands the feasible space and makes the
decision maker better off. Try resolving the problem with 2.6 as the RHS as opposed to 2.5 and you
will see that costs are reduced by roughly 4.5 cents. The implication is that if we can get the animal
to eat more we can feed them cheaper, because the combination of feeds we are choosing from see
the intake constraint as restrictive. How does the optimal feed mix differ when you expand the
intake constraint?
Excel Output 2. Constraint Sensitivity in the minimum feed cost problem
Constraints
Cell
$G$7
$G$8
$G$9
$G$10
$G$11
Name
Protein LHS
Calcium LHS
Iron LHS
Calories LHS
Intake LHS
Final
Value
30.00
126.55
22.65
4400.00
2.50
Shadow
Constraint
Price
R.H. Side
8.06
30
0.00
70
0.00
12
0.01
4400
-44.62
2.5
Recall that we said we could compare the costliness of constraints by considering one percent
changes to the right hand side. Because we have both <= and >= constraints in this problem we
need to make the 1 percent change in a way that is always adverse to the decision maker. Thus we
will increase the RHS value for protein and calories (making these requirements more difficult to
meet) and we will decrease the RHS of the intake constraint (making it more difficult to satisfy).
Constraint:
0.01*RHS*Shadow Price =
X
Protein:
0.01*30*8.06=
2.42
Calories:
0.01*4400*0.01=
0.38
Intake:
-0.01*2.5*0.01=
1.12
Ranking these from highest to lowest (most costly to least costly) indicates that the protein
requirement is the most costly, followed by the intake capacity of the animal, and then the energy
requirements.1
The result in this example has a long tradition in agricultural economics studies as energy requirements for livestock
have long been the cheap requirement while the protein requirement has been more expensive. With increasing costs of
corn (typically viewed as an energy feed) and the availability of distillers’ grains (a high protein supplement) there has
been a renewed interest in animal diets as farmers and feed mixers compete with the ethanol industry for corn while
using its by-product as a feed input.
1
Review Exercises/Questions:
Note: The problem setup in the sheet ‘Questions’ can be used for each of these questions. When
you are asked to omit a decision variable, just select (highlight in the spreadsheet) each decision
variable and place a comma after it rather than highlighting the whole ‘Choice’ row. See below for an
example that will include all of the choice variables in the ‘Questions’ model.
1) Solve the model using only beans, hay, and Superfeed (be sure the activity level for corn and
oats are set to zero). Compare this to the solution in Excel Output 1 and the Superfeed only
solution in terms of total cost and binding constraints.
2) Again using only beans, hay, and Superfeed, change the constraint on Intake from <= to an
= sign. How does this change the solution in terms of total cost. Why does the change in
total costs occur?
3) Starting from the solution to problem 2, add oats as one of the decision variables and solve
the problem? Does the solution change? Why or why not?
4) Now, let’s change the values in the column oats to make a new choice variable. We will call it
Filler. It costs 1 cent per pound and has no nutritional value, so put a 1 in the Price row, a 1
in the Intake row, and zeroes in the other rows. Now solve the problem with Filler as a
choice variable. How does the solution change from question 3?
Download