Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
Expand all | Collapse all

Getting inappropriate result using BigM constraint

  • 1.  Getting inappropriate result using BigM constraint

    Posted Wed March 14, 2018 08:43 AM

    Originally posted by: ShivaliLomate


    Hi, 

    I am writing MIP formulation in Cplex 12.8. I have two decision variables namely dvar float + Contract with indices (contract type (ct), geo-variety (g) and year(y)) and dvar boolean IContract with indices (contract type (ct), Geo-variety (g) and year(y)). Each contract type and geo - variety  is bounded by parameters Minicontractvalue(ct, gv) and Maxcontractvalue(ct, gv). So whenever contract  is selected for particular geo-variety then it should follow constraint of minimum contract value ( soft constraint , that's why binary decision variable  Icontract is used for selection of contract). This requirement is modeled as follow  in OPL.

    Forall (ct in contract type,  g in geo-variety , y in year) {

    ct1: Contract (ct, g, y) >= IContract (ct, g, y) * Minicontractvalue(ct, g);

    ct2:  Contract (ct, g, y) <=  IContract (ct, g, y) * Maxcontractvalue( ct, g);

    }

    But for some contract type we have value in a particular year despite its corresponding binary is zero. eg. Contract of contract type  = 1 , geo-variety =  2 and year =  4 have Minicontractvalue (1,2 ) = 0.3 and Maxicontractvalue (1,2) = 5000000 .  Solution for Contract ( 1, 2, 4)  = 0.15  but is corresponding binary   IContract (1,2,4)  = 0. 

    will please explain what kind of error is this and how to debug/remove this error ?

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Getting inappropriate result using BigM constraint

    Posted Wed March 14, 2018 09:18 AM

    This looks like the standard numerical issues you get with big-M constraints. Is IContract(1,2,4) exactly 0 or is it slightly above?

    Did you consider using logical constraints instead of big-M? That reduces the risk of numerical problems. For example you could define Contract(ct,g,y) as float+ in [0, Maxcontractvalue(ct,g)] and then add these two constraints:

    IContract(ct, g, y) == 0  =>  Contract(ct,g,y) <= 0
    IContract(ct, g, y) == 1  =>  Contract(ct,g,y) >= Mincontractvalue(ct,g)

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Getting inappropriate result using BigM constraint

    Posted Fri March 16, 2018 05:32 AM

    Originally posted by: ShivaliLomate


    Hi,

    I used logical constraints as suggested by you and that error of numerical issue got eliminated. Thanks for your valuable help.


    #CPLEXOptimizers
    #DecisionOptimization