Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  cplex.conflict.get with a value 5?

    Posted 03/16/16 12:27 PM

    Originally posted by: AntonioMorgado


    Greetings,

    I am using cplex.conflict for a problem and when i use cplex.conflict.refine and then ask for the cplex.conflict.get it gives the value 5 for some of the constraints (an infeasible example). Does anyone knows what it means? Here is an example in python:

     

    > python
    Python 2.7.6 (default, Jun 22 2015, 17:58:13)
    [GCC 4.8.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import cplex
    >>> c = cplex.Cplex()
    >>> c.variables.add(names = ["x0"])
    >>> c.linear_constraints.add(lin_expr = [[[0], [-1.0]], [[0], [1.0]]], senses = "LL", rhs = [-10,9])
    >>> c.conflict.refine(c.conflict.linear_constraints())
    >>> c.conflict.get()
    [5, 5]
    >>>

     

    The api only refers to returned values of -1, 0 or 3.

    Thank you in advance for your reply.


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: cplex.conflict.get with a value 5?

    Posted 03/21/16 02:58 AM

    Did you check the reference documentation?

    The function returns the conflict status for all the constraints. Since you have two constraints in your model you get two values. You may want to look at the reference documentation of the corresponding C library function CPXrefineconflict(). The reference documentation also lists the numerical values for the symbolic constants used there. I copy them here for your convenience:

    #define CPX_CONFLICT_EXCLUDED          -1
    #define CPX_CONFLICT_POSSIBLE_MEMBER    0
    #define CPX_CONFLICT_POSSIBLE_LB        1
    #define CPX_CONFLICT_POSSIBLE_UB        2
    #define CPX_CONFLICT_MEMBER             3
    #define CPX_CONFLICT_LB                 4
    #define CPX_CONFLICT_UB                 5


    #CPLEXOptimizers
    #DecisionOptimization