MPL Model Library
Distribution Unlimited, Example 3.4-6, Hillier and Lieberman
{ Exmpl_3.4-6_DistrUnlimited.mpl }
{ Hillier and Lieberman, Introduction to Operations Research, 7th ed. }
{ Chapter 3.4, Example 6, Transportation, Size: 7x7, Page 59 }
TITLE
DistributionUnlimited;
OPTIONS
ExcelWorkbook="Exmpl_3.4-6_DistrUnlimited.xls"
ExcelSheetName="Distribution Unlimited"
INDEX
loc := EXCELRANGE("loc") : 2;
source := loc;
dest := loc;
DATA
ShipCost[source, dest] := EXCELSPARSE("ShipCost");
RequiredAmount[loc] := EXCELRANGE("RequiredAmount");
MaxFlow[source, dest] := EXCELSPARSE("Capacity",4);
VARIABLES
Ship[source, dest] WHERE (ShipCost > 1) -> ""
EXPORT TO EXCELRANGE("Ship");
MODEL
MIN TotalCost
EXPORT TO EXCELRANGE("TotalShipCost")
= SUM(source, dest: ShipCost * Ship);
SUBJECT TO
NetFlow[loc] :
SUM(dest: Ship[source:=loc]) - SUM(source: Ship[dest:=loc])
=
RequiredAmount;
MaxShipment[source, dest] WHERE (MaxFlow > 1):
Ship <= MaxFlow;
END
Return to MPL Model Library