Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Extracting IloOr

    Posted 03/21/19 01:33 PM

    Originally posted by: jawadomari


    Hello, 

     

    How does CPLEX extract and IloOr constraint? Does it use convex hulls or the standard big M?

     

    Regards, 


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Extracting IloOr

    Posted 03/21/19 02:51 PM

    The easiest way to see what CPLEX does is to IloCplex::exportModel() to an LP file. LP file format does not support "or" constraints, so you will see in the file to which (indicator) constraints CPLEX transforms your IloOr.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Extracting IloOr

    Posted 03/22/19 06:59 AM

    Originally posted by: jawadomari


    Thank you, but it was not clear from the LP. There are a lot of <-> symbols in the model file which I can only assume are indicators; that is, if x is true, then this holds. So my guess is that it is a big M formulation. Either way, the results were wrong as none of the "or" constraints prevented two jobs from being processed at the same time... I'll just write them explicitly in the model. 

     

    I'm attaching the model if you're interested in investigating why the "or" constraints were not applied. 

     

    Have a good weekend. 


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Extracting IloOr

    Posted 03/22/19 07:34 AM

    It is hard to tell whether anything is wrong without seeing the original model. In any case, <-> means "if and only if". In your LP file, you have for example these indicator constraints:

     i1:    x314#313 = 1 <-> S_IRB460_rep0,Axis1m2_0#0 - S_IRB660_rep0,Axis1m2_0#9 >=  -6.68333339691162
    ...
     i7196: x7519#7518 = 1 <-> S_IRB6700_rep6,finalAssembly_7#277 - S_IRB7600_rep0,finalAssembly_7#312 >= -10.5299997329712

    And you have this row:

      c300: x314#313 + ... + x7519#7518 >= 1

    The variables to the left of <-> are all binary variables. The indicator constraints force the binary variables to 1 if and only if the constraint to the right of the <-> is satisfied. Row c300 says that at least one of the binary variables must be 1, which is the same as saying that at least one of the constraints to the right of <-> must be satisfied. This looks exactly like an (inclusive) OR constraint to me.

    I am not sure how an OR constraint would prevent two things from happen simultaneously. An OR only says that at least one of them must happen. Note that OR is not exclusive but inclusive!


    #CPLEXOptimizers
    #DecisionOptimization