Multicommodity Transportation


    {  Exmpl4.1-1_MultiCommodity.mpl  }

    {  AMPL A Modeling Language for Mathematical Programming, 2nd Edition }

    {  Chapter 4.1,  Transportation,  Size: 51x63,  Page 56 }


TITLE
    Multi;

INDEX
    origin := (gary,clev,pitt);
    dest   := (fra,det,lan,win,stl,fre,laf)
    prod   := (bands,coils,plate);

DATA
    Supply[prod,origin] := ( 400, 700, 800,
                             800,1600,1800,
                             200, 300, 300);
    Demand[prod,dest]   := (300,300,100, 75,650,225,250,
                            500,750,400,250,950,850,500,
                            100,100,  0, 50,200,100,250);
    Cost[prod,origin,dest] := (30,10, 8,10,11,71, 6,
                               22, 7,10, 7,21,82,13,
                               19,11,12,10,25,83,15,
                               39,14,11,14,16,82, 8,
                               27, 9,12, 9,26,95,17,
                               24,14,17,13,28,99,20,
                               41,15,12,16,17,86, 8,
                               29, 9,13, 9,28,99,18,
                               26,14,17,13,31,104,20);
    Limit := 625;

VARIABLE
    Trans[origin,dest,prod];

MODEL

    MIN TotalCost = SUM(origin,dest,prod: Cost * Trans);

SUBJECT TO

    Supplying[origin,prod] -> SUP:
         SUM(dest: Trans) = Supply;

    Meetdemand[dest,prod] -> DEM:
         SUM(origin: Trans) = Demand;

    ShippinLimit[origin,dest] -> SLIM:
         SUM(prod: Trans) <= Limit;

END


Back To Top | Maximal Home Page | List of Models | Previous Page | Next Page