Gasoline Blending



   {  Exmpl2.2_GasolineBlending.mpl  }

   {  Murty, Operations Research, Deterministic Optimization Models  }

   {  Chapter 2,  Example 2.2,  Blending,  Size: 9x16,  Page 28  }


TITLE
    GasolineBlending;

INDEX
    rawgas   := 1..4;
    fueltype := 1..3;

DATA
    OctaneRating[rawgas]     := (68, 86, 91, 99);
    RawGasAvail[rawgas]      := (4000, 5050, 7100, 4300);
    RawGasCost[rawgas]       := (31.02, 33.15, 36.35, 38.75);

    MinOctaneFuel[fueltype]  := (95, 90, 85);
    FuelPrice[fueltype]      := (45.15, 42.95, 40.99);

    MinimumDemand[fueltype]  := (0, 0, 15000);
    MaximumDemand[fueltype]  := (10000, 0, 0);

    RawGasPrice[rawgas]      := (36.85, 36.85, 38.95, 38.95);

VARIABLES
    FuelComposition[fueltype,rawgas];
    RawGasSold[rawgas];

MACROS
    TotalFuelRevenue   =  SUM(rawgas,fueltype: FuelPrice * FuelComposition);
    TotalRawGasRevenue =  SUM(rawgas: RawGasPrice * RawGasSold);
    TotalRawGasCost    =  SUM(rawgas,fueltype: RawGasCost * FuelComposition)
                        + SUM(rawgas: RawGasCost * RawGasSold);

MODEL

    MAX TotalProfit = TotalFuelRevenue + TotalRawGasRevenue - TotalRawGasCost;

SUBJECT TO

    RawGasLimit[rawgas] -> RGasLim:

        SUM(fueltype: FuelComposition) + RawGasSold  <=  RawGasAvail;


    OctaneReq[fueltype] -> OctReq:

        SUM(rawgas: OctaneRating * FuelComposition)

     >=

        MinOctaneFuel * SUM(rawgas: FuelComposition);


    MinDemand[fueltype] WHERE (MinimumDemand > 0) -> MinDem:

        SUM(rawgas: FuelComposition)  >=  MinimumDemand;


    MaxDemand[fueltype] WHERE (MaximumDemand > 0) -> MaxDem:

        SUM(rawgas: FuelComposition)  <=  MaximumDemand;

END


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