Here is a variation of Problem 2 from Homework Sheet 6.

We use the numbers from the problem to set up the following LP transportation problem.

Now suppose we can increase the supply at one of the plants by one unit. Thus, we can also increase the demand at one of the DCs by one unit.

Question: Which plant and DC should we choose in order to increase the cost the least?

Answer: The shadow price at DC3 is the smallest (400), and the shadow prices at either plant 1 or 3 are the most negative (-100). So if we choose to increase the supply by one unit at plants 1 or 3 and ship to DC3 we would increase the costs by 400-100 = 300 to a total of 20500.

Change the code above to see this result by changing the respective supplies and demands.


Next, let us solve part (b) from the homework sheet. Here, we introduce an extra dummy supply (plant 4), which has 0 cost to ship to any of the DCs.

All the Virtual "dummy" supply from the "dummy plant" 4 is shipped to DC2, so DC2 is undersupplied by 5 units.