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