Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Negation in Cplex

    Posted 10/09/12 01:15 PM

    Originally posted by: Bryanr


    Hello,

    I'm wondering how to model the negation in cplex Java-api. I need to define XNOR constraints over binary variables in my model. Any advice ? Thanks a lot
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Negation in Cplex

    Posted 10/09/12 03:53 PM

    Originally posted by: T_O


    XNOR over 2 binaries is just equivalence, so you can omit one of the variables (replacing it by the other one everywhere) or add a constraint like x1 - x2 = 0.

    Concerning more than 2 variables, we first of all have to ensure that we use the same definition of XNOR. In the following, I will assume that it is check for even parity (the number of ones is even).

    Let x1, ..., xn be the binaries be XNORed. Add a new integer variable z. Then add the following constraint:
    x1 + ... + xn - 2z = 0

    Best regards,
    Thomas
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Negation in Cplex

    Posted 10/09/12 08:30 PM

    Originally posted by: Bryanr


    Thanks for your help Thomas! As you said for two variables it is straightforward but concerning the multiple variables I was looking for a way to formulate without adding new integer variables to deal with it.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Negation in Cplex

    Posted 10/16/12 04:29 AM

    Originally posted by: SystemAdmin


    In order to avoid the auxiliary integer variable, you would need to add all the facets of the XNOR polytope.
    For three variables, this is:
    x1 - x2 - x3 <= 0
    -x1 + x2 - x3 <= 0
    -x1 - x2 + x3 <= 0
     x1 + x2 + x3 <= 2
    

    See, for example, my thesis at http://opus4.kobv.de/opus4-zib/frontdoor/index/index/docId/1112, Section 14.9, page 233.

    Unfortunately, the number of facets of the polytope increases exponentially with the number of variables, see Section 14.12, pages 237-238.

    Tobias
    #CPLEXOptimizers
    #DecisionOptimization