Maximal Logo MPL Model Library


Metro Water, Example 8.1-3, Hillier and Lieberman

 
 
   {  Exmpl_8.1-3_MetroWater.mpl  }

   {  Hillier and Lieberman, Introduction to Operations Research, 7th ed.  }

   {  Chapter 8.1,  Example 3, Transportation, Size 9x20 , Page 362  }


TITLE
   MetroWater;

OPTIONS
   ExcelWorkbook="Exmpl_8.1-3_MetroWater.xls"
   ExcelSheetName="Metro"

INDEX   
   river :=  EXCELRANGE("River");
   city  :=  EXCELRANGE("City");


DATA
   M := 999;
   DistCost[river, city] :=  EXCELRANGE("DistCost");
   Supply[river] :=  EXCELRANGE("Supply");
   Demand[city] :=  EXCELRANGE("Demand");
   
VARIABLE
   Distribute[river, city] -> dstb
       EXPORT TO EXCELRANGE("Distribute");

MODEL
   MIN TotalCost 
      EXPORT TO EXCELRANGE("TotalCost")
     = SUM(river, city: 10000000 * DistCost * Distribute);

SUBJECT TO
   Source[river] : SUM(city: Distribute) = Supply;
   Destination[city] : SUM(river: Distribute) = Demand;

END


Return to MPL Model Library