Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Obtaining violated constraints after presolver

  • 1.  Obtaining violated constraints after presolver

    Posted Wed August 05, 2015 03:53 PM

    Originally posted by: an_drade


    Hi everyone,

     

    I have played with a model where I try to fix a given subset of binary variables. Usually, these fixings leads to infeasibility. CPLEX presolver is able to identify such situations in the most cases and display some information like this: Row 'R0000000' infeasible, all entries at implied bounds.

     

    Now, I want to obtain the constraints that are violated for a given (subset of binary variables) fixing. To the conflict refiner or the feasopt method is out of my purposes since I just want the violated constraints. Indeed, I only need some of them since I know that to identify all is hard as solve my problem (NP-hard). For example, if I can obtain the index of the row as show in the CPLEX output, I will be very happy.

     

    Of course, I can write a piece of code to check each constraint but I don't want to reinvent the wheel since CPLEX are able to do it. I would like something close to:

     

    cplex.solve();

    if(cplex.getStatus() == IloAlgorithm::Infeasible) {

        // Get (partial) violated constraints

    }

     

    I must say I have used C++ to code my algorithms, Thanks in advance.

    Kind regards,

     

    Carlos


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Obtaining violated constraints after presolver

    Posted Fri August 07, 2015 12:48 PM

    Originally posted by: IrvL


    Your problem is not well defined, because the fixing of a partial subset of the binary variables could create inferences that prove the infeasibility of your problem.  So which constraints would you want to say are violated?  Here's an example:

    x + y + z <= 2
    z >= 1
    x,y,z binary

    So let's say you now do your fixing of a partial subset of the variables, choosing x and y, by setting x=1, y=1.  The first constraint implies z=0, and that contradicts the second constraint. Are both constraints violated? I don't think so. You could relax either constraint, and then things are feasible.  Feasopt would give you that information. The conflict refiner would include both constraints.

    -Irv Lustig

    Optimization Principal

    Princeton Consultants

     

     


    #CPLEXOptimizers
    #DecisionOptimization