Professional Documents
Culture Documents
Developing An Excel Spreadsheet Program To Solve Transportation Problems
Developing An Excel Spreadsheet Program To Solve Transportation Problems
Use the solver in Excel to find the number of units to ship from each factory to each
customer that minimizes the total cost.
2. To make the model easier to understand, create the following named ranges.
Range name Cells
Total Cost C17
Unit Cost B4:D6
Supply E4:E6
Demand B7:D7
rowSum E11:E13
colSum B14:D14
Shipment B11:D13
Explanation: The SUM functions calculate the total shipped from each factory
(rowSum) to each customer (colSum). Total Cost equals the sumproduct of Unit
Cost and Shipments.
For example, if we ship 100 units from Factory 1 to Customer 1, 200 units from
Factory 2 to Customer 2, 100 units from Factory 3 to Customer 1 and 200 units from
Factory 3 to Customer 3, Total Out equals Supply and Total In equals Demand. This
solution has a total cost of 27800.
It is not necessary to use trial and error. We shall describe next how the Excel Solver
can be used to quickly find the optimal solution.
Enter the solver parameters (read on). The result should be consistent with the
picture below.
2. Enter Total Cost for the Objective.
3. Click Min.
4. Enter Shipments for the Changing Variable Cells.
5. Click Add to enter the following constraint.
6. Click Add to enter the following constraint.
Conclusion: it is optimal to ship 100 units from Factory 1 to Customer 2, 100 units
from Factory 2 to Customer 2, 100 units from Factory 2 to Customer 3, 200 units
from Factory 3 to Customer 1 and 100 units from Factory 3 to Customer 3. This
solution gives the minimum cost of 26000. All constraints are satisfied.
Answer Report 1
Objective Cell (Min)
Original
Cell Name Value Final Value
$C$17 Total Cost 27800 26000
Variable Cells
Original
Cell Name Value Final Value Integer
$B$11 S1 C1 100 0 Contin
$C$11 S1 C2 0 100 Contin
$D$11 S1 C3 0 0 Contin
$B$12 S2 C1 0 0 Contin
$C$12 S2 C2 200 100 Contin
$D$12 S2 C3 0 100 Contin
$B$13 S3 C1 100 200 Contin
$C$13 S3 C2 0 0 Contin
$D$13 S3 C3 200 100 Contin
Constraints
Cell Name Cell Value Formula Status Slack
$B$14 colSum C1 200 $B$14=$B$7 Binding 0
$C$14 colSum C2 200 $C$14=$C$7 Binding 0
$D$14 colSum C3 200 $D$14=$D$7 Binding 0
$E$11 S1 rowSum 100 $E$11=$E$4 Binding 0
$E$12 S2 rowSum 200 $E$12=$E$5 Binding 0
$E$13 S3 rowSum 300 $E$13=$E$6 Binding 0
Sensitivity Report 1
Variable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$11 S1 C1 0 18 40 1E+30 18
$C$11 S1 C2 100 0 47 11 1E+30
$D$11 S1 C3 0 11 80 1E+30 11
$B$12 S2 C1 0 61 72 1E+30 61
$C$12 S2 C2 100 0 36 12 11
$D$12 S2 C3 100 0 58 11 12
$B$13 S3 C1 200 0 24 18 1E+30
$C$13 S3 C2 0 12 61 1E+30 12
$D$13 S3 C3 100 0 71 12 18
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$B$14 colSum C1 200 11 200 0 100
$C$14 colSum C2 200 36 200 0 100
$D$14 colSum C3 200 58 200 0 100
$E$11 S1 rowSum 100 11 100 100 0
$E$12 S2 rowSum 200 0 200 0 1E+30
$E$13 S3 rowSum 300 13 300 100 0
Limits Report 1
Objective
Cell Name Value
Total
$C$17 Cost 26000