Solution:
ampl: display {i in demandcenters} (sell['generic',i,5], sell.rc['generic',i,5]);
: sell['generic',i,5] sell['generic',i,5].rc :=
Birmingham 2500 0
Dallas 0 0
Fresno 2500 0
KansasCity 4000 0
Philadelphia 2416.67 0
SaltLake 3500 0
Toronto 2500 0
;
The reduced cost for sale of generic pies in Dallas in week 5 is zero, even though
no pies are sold in Dallas in that week.
This implies there are multiple optimal solutions.
Solution:
ampl: display {t in 0..T} (inventoryrawfac['apples','Sacramento',t],
ampl? inventoryrawfac.rc['apples','Sacramento',t]);
# $2 = inventoryrawfac['apples','Sacramento',t].rc
: inventoryrawfac['apples','Sacramento',t] $2 :=
0 90 0
1 63 0
2 20 -10
3 20 -10
4 20 -10
5 20 -10
6 20 0
;
Adding together the reduced cost for the appropriate components of
inventoryrawfac and multiplying by the change of 2 units in supply gives
an overall improvement in profit of $
Solution:
ampl: display sell.down['namebrand','Birmingham',4]; sell['namebrand','Birmingham',4].down = 33.5The price can be reduced to $33.50 before the set of basic variables changes.
Solution:
ampl: display {t in 1..T} supplylimit['apples','WA',t];
supplylimit['apples','WA',t] [*] :=
1 90
2 100
3 100
4 100
5 100
6 100
;
Looking at the shadow price for the supplylimit constraint shows that the total benefit
for an increase in supply of 10 cartons is
Solution:
As the supply of apples increases, their value goes down. So, the profit may be less than 25 times as great. In fact, it stops increasing at the rate of $590 per carton after approximately 35 additional cartons are made available. This is because of tightness in the facility capacity constraint.
This range should be available from displaying supplylimit.up, but this gives a value of zero. (The values of supplylimit.current and supplylimit.down also give incorrect values of zero.)
Solution:
ampl: display caprawfac; caprawfac [*,*] (tr) : Buffalo Chattanooga Sacramento Seattle StPaul := 1 300 300 330 306 354 2 295.2 295.2 317.2 293.2 343.2 3 300 300 322 298 348 4 300 300 324 300 348 5 295 295 295 271 321 6 295 295 295 271 321 ;
The shadow price for the caprawfac constraint gives the desired information.
An increase of fifty units in capacity at Buffalo will increase the profit by
,
assuming the set of basic variables does not change.
If the set of basic variables does change then the increase in profit may well be less
than this; it cannot be larger, because the shadow price will decrease as the
availability of the resource increases.
Thus, the profit from hiring the additional workers is no greater than
$89620, which is less than hiring the workers, so they should not be hired.
Solution:
Using the same output table as in Question 6, we get an upper bound
on the increase in profit of
.
However, the following table shows that the set of basic variables is modified once the capacity is increased by just 4 to 244 cartons:
ampl: display caprawfac.up; caprawfac.up [*,*] (tr) : Buffalo Chattanooga Sacramento Seattle StPaul := 1 260 302.5 277.5 237.5 273.333 2 207.5 247.5 260.833 207.5 267.5 3 220.833 243.333 243.333 203.333 263.333 4 221.667 261.667 261.667 221.667 281.667 5 250.833 290.833 246.667 206.667 266.667 6 206.667 246.667 246.667 206.667 266.667 ;So the benefit will be less than $94160. To determine the increase in profit, we solve the problem with the capacity modified:
ampl: let faccap['Sacramento'] := 290; ampl: solve; ILOG CPLEX 11.000, licensed to "rensselaer-troy, ny", options: e m b q use=10 CPLEX 11.0.0: sensitivity CPLEX 11.0.0: optimal solution; objective 1884142.333 18 dual simplex iterations (0 in phase I)The increase in profit is $1884142.333 - $1795684.333 = $88458, which is less than the cost of hiring the crew. So, again SigmaPi should not hire the crew.
Solution:
Displaying the value of the constraint shortfall indicates the benefit from increasing the demand by one unit:
ampl: display shortfall['namebrand','Fresno',3], shortfall['namebrand','Fresno',3].up; shortfall['namebrand','Fresno',3] = -2.21667 shortfall['namebrand','Fresno',3].up = 2620Unfortunately, this quantity is negative, so SigmaPi would lose $2.22 on each additional box they sell at $37. Thus, the minimum amount they should charge for the additional hundred boxes is $3921.67. The value of shortfall.up indicates that the basic sequence does not change until the number of boxes sold is increased to 2620.
The problem with selling extra boxes in Fresno is that demand in other places can then no longer be met, so additional shortfall costs are incurred elsewhere. In particular, making the data change shows that additional unmet demand for generic pies is incurred in Philadelphia in Week 4.
Note that the reduced cost for unmetdemand is:
ampl: display unmetdemand['namebrand','Fresno',3].rc; unmetdemand['namebrand','Fresno',3].rc = -2.78333which is exactly the difference between the shortfall cost of $5 and the shadow price given above.