Homework 7 (Due Nov. 5)

advertisement
3/7/2016
R. Keeney
AGEC 352
Lab Handout 7
Solving a Cost Min Transportation Problem in Excel
Note that some of the figures in this handout may not match what you see due to the
use of Excel 2003 in preparation of the document.
This handout takes you through the steps of solving and analyzing a transportation problem
for a European car manufacturer. The car manufacturer imports motors into three ports
(Amsterdam, Antwerp, and Le Havre). Assuming the cost of getting the motors to those
ports is irrelevant, the car manufacturer wants to minimize the shipping cost of getting the
motors delivered to its 4 auto assembly plants (located in Leipzig, Nancy, Liege, and
Tilburg). The cost per motor of shipping from each port to each destination is given below
in the Table called Objective Coefficients. There is a limited supply (maximum amount) of
motors at each port. There are 500, 700, and 800 motors available at Amsterdam, Antwerp,
and Le Havre respectively. The amounts needed at the various assembly plants constitute
minimum requirements needed. These minimum requirements are 400 in Leipzig, 900 in
Nancy, 200 in Liege, and 500 in Tilburg. Using the steps below solve this transportation
problem.
1)
2)
Download the Excel workbook provided on the web page eurotrans.xls
The data for objective coefficients (with sources as rows and destinations as
columns) is given as the first matrix (see below).
Objective Coefficients
Unit Cost From/To
Amsterdam
Leipzig
3)
Liege
Tillburg
120
130
41
59.5
61
40
100
110
102.5
90
122
42
Antwerp
Le Havre
Nancy
The second matrix contains the decision variables (initially set to zero) for the
problem. When implementing Solver in MS-Excel, we will allow each of the 12 cells
of this matrix to change in order to meet the objective of minimizing costs.
Decision Variables
Ship From/To
Leipzig
Nancy
Liege
Tillburg
Amsterdam
0
0
0
0
Antwerp
0
0
0
0
Le Havre
0
0
0
0
4)
It is convenient to also use the matrix of decision variables to set up the constraints
of the problem. All of the coefficients of constraint equations are either 1 or 0 (see
row 29 and 30 of the eurotrans.xls spreadsheet for what these look like) for this
problem so that e.g. summing over the first row (labeled Amsterdam) of this matrix
is equivalent to calculating the LHS of the supply constraint pertaining to
1
3/7/2016
R. Keeney
Amsterdam. In the same manner, summing the elements of the first column is
equivalent to calculating the LHS of the demand constraint pertaining to Leipzig.
a. The above picture shows the calculation for the LHS of the Amsterdam
constraint. This needs to be repeated for each row (source) in the problem. The
RHS and signs from the original problem are given to you.
b. The above picture shows the calculation for the LHS of the Leipzig constraint.
This needs to be repeated for each column (destination) in the problem. The
RHS and signs from the original problem are already included.
5)
The final matrix in the spreadsheet is the one used for calculating Total Cost, the
objective variable. The matrix is used to calculate the component or contribution to
total costs from all the source-destination decision variables and the unit costs
associated with them. The matrix is given below with an additional row and column
to calculate the total cost attributable to shipping from a particular source and the
total cost arising from shipping to a particular destination.
2
3/7/2016
R. Keeney
Elements of Total Cost Equation
TC From/To
Leipzig
Nancy
Liege
Tillburg
Total
Amsterdam
Antwerp
Le Havre
Total
6)
The elements of this final matrix need to be calculated by multiplying for each
corresponding cell (source and destination intersection) the unit cost (Objective
coefficient) by the activity level (decision variable).
a. The picture above shows the calculation of the contribution of total cost from
shipping motors from the port at Amsterdam to the factory at Leipzig. Repeat
these formulas for each element of the cost contribution matrix.
b. The Total for each row and column can be calculated using the Sum formula as
was done to compute the LHS of constraints on the decision variable matrix.
c. The OV Total Cost cell is at the Southeast corner of the Total Cost contribution
matrix and needs to be the sum of each element of the matrix. See the picture
below.
3
3/7/2016
R. Keeney
7)
It is good practice to test out your calculations when using this approach of laying
out the model in a series of matrices. The easiest way to do a spot check on
calculations is to try test values of the decision variables to see if the formulas
produce the expected summations.
a. In the decision variables matrix enter 400 for the number of motors shipped
from Amsterdam to Leipzig. Enter 100 for the number of motors shipped from
Amsterdam to Nancy. Enter 700 for the number of motors shipped from
Antwerp to Nancy. Inputting these three values for decision variables should
yield the following.
Decision Variables
Ship From/To
Leipzig
Amsterdam
Nancy
Liege
Tillburg
LHS
Sign
RHS
400
100
0
0
500 <=
500
Antwerp
0
700
0
0
700 <=
700
Le Havre
0
0
0
0
0 <=
800
400
800
0
0
LHS
Sign
RHS
>=
>=
400
>=
>=
900
200
500
b. You can also check the formulas for Total Cost components and the Objective
Variable of Overall Total Cost using the last matrix. **Be sure to reset all of
these values to zero before moving on.**
Elements of Total Cost Equation
TC From/To
Amsterdam
Leipzig
Nancy
Liege
Tillburg
Total
48000
13000
0
0
61000
Antwerp
0
28000
0
0
28000
Le Havre
0
0
0
0
0
48000
41000
0
0
Total
8)
89000 <-OV Total Cost
If you did not reset the decision variables to zero, do so now. If the formulas
appear to be correct, we are ready to solve the model. We will use MS Excel Solver
just as before. Remember to uninstall and reinstall solver (see lab 5 or 6 for
notes on how to do this). Care must be taken to ensure that we include all of the
constraints since some are the sum over rows and some are the sum over columns.
4
3/7/2016
R. Keeney
a. Total Cost (the sum of all component costs) is the Objective Variable and the
cell reference is used to set the Target Cell in Solver (see above).
b. The entire matrix of Decision Variables (the cells that represent the intersection
of a source or destination) is included in the By Changing Cells Box. Note that
this does not include the LHS calculations and that you can highlight the matrix
so that the By Changing Cells lists B10:E12 as the array using only the top-left
and bottom-right cells as reference for the entire array.
c. Under Subject to the Constraints in the Solver Dialog Box clicking on Add will
open the Add Constraint Dialog.
5
3/7/2016
R. Keeney
d. Beginning with the Destination Constraints that indicate the minimum quantity
of motors required at each plant, input the constraints in the dialog box using the
LHS cells that sum all elements of a column and the RHS cells that give the
minimum motor requirements. (see picture below)
e. We also need to add the constraints for the sources which are maximum
amounts that can be supplied from a given port. Again we use the LHS that is
the sum of all motors shipped from a port and the maximum that can be shipped
as values in the constraint. (see picture below).
9)
10)
Using the Options button on the Solver Dialog be sure that Assume Linear Model
and Assume Non-Negative are checked.
Solve the model. Select both answer reports and sensitivity reports to be shown. (If
you did not reset the decision variables to zero, Solver may tell you there is an
infeasible solution. You can fix this by resetting all values in the Decision
Variables matrix to zero and then solving. The reason that Solver fails to find
a solution is beyond the scope of this class.)
6
3/7/2016
R. Keeney
11)
The solution to the problem should show that minimum total cost is 121,450. Be
sure you have opened both the answer report and sensitivity report at this
point so that you will have them available to answer part 1 of the homework.
Steps 12-14 below refer to part 2 of the homework assignment.
12)
13)
14)
Look at the Sensitivity Report for the problem. Note that the activity that ships
motors from Amsterdam to Leipzig has a solution value of zero and a Reduced
Cost/Objective Penalty of zero. This indicates that there are multiple decision
variable combinations that will lead to the minimum cost of $121,450. Since we
know that 121,450 is the minimum cost, we can pursue and solve for a second
objective of minimizing the cost of shipments from the port of Le Havre (the
decision maker is fearful of a worker strike and would like to reduce the company’s
exposure to that risk).
If we constrain Total Costs to be equal to the minimum we have already found
($121,450) then we can find the minimum cost solution that has minimum costs
devoted to shipments from Le Havre (the port where a worker strike is likely). We
can extend the problem quite easily to show this by using the Total Cost cell as the
LHS of a constraint, the cell marked as Answer Check as the RHS of a constraint,
and changing the objective cell to be the total cost of shipments from the Le Havre
port. Solve the model again (choose only an answer report) and you should find that
the Total Cost contribution from the Le Havre port is now $49,250. (see picture
below).
Answer the Questions in part 2 of Homework 8 using the answer report for the
second solution.
7
3/7/2016
R. Keeney
AGEC 352
Homework #7
October 19, 2009
You may work in groups to complete this assignment. Include all names of those who
worked together on the assignment you hand in. Each person from the list will receive the
same grade. You may not have someone in your group who is not present in lab today.
1)
Report the optimal solution for the original cost minimization problem (printout)
and answer the following questions.
a)
What is the minimum total cost?
b)
Which shipping routes are used? How many motors are shipped for each of
these?
c)
Which constraints bind?
d)
Given total demand (requirements at assembly plants) and supply (motors
available from ports) is it possible for any constraints to be slack?
e)
Report and Interpret the Reduced Cost/Objective Penalty of the Amsterdam
to Nancy route.
f)
Why does the Amsterdam to Leipzig route have both a zero solution value
and a zero reduced cost?
g)
Interpret the Shadow Prices on the constraints. (Be sure and use the
Allowable Increase and Decrease Information since these shadow prices are
only valid in one direction i.e. either having one more unit available to ship
or requiring one less unit at an assembly plant).
h)
Given the Reduced Cost/Objective Penalty information, which route is the
worst?
i)
Given the shadow price information, which source is the most costly to ship
from?
The decision maker would like to know if it is possible to transport the motors at minimum
cost while also minimizing the cost attributable to shipments from Le Havre.
2)
Report the optimal solution given the second objective of minimizing costs from Le
Havre while holding fixed the Total Cost level at $121,450.
a)
What activities (routes) decreased?
b)
What activities (routes) increased?
c)
How much is shipping cost from Le Havre reduced?
d)
Which destination costs changed (sum of total costs to a particular plant
location)?
e)
Why did these change?
8
Download