Originally posted by: SaumyaB
Hi,
I have a model that has 4 constraints C1, C2, C3 and C4. C4 is a constraint that causes infeasibility in some problem instances (as it involves setting an upper bound on an expression. What I would like to do is use conflict Refiner and every time there is a conflict, increase the upper bound by 1 and then use C4 with this updated value. Here is a partial code of the same:
// Check for conflict
if(cp.refineConflict()) {
//Model is infeasible
cp.writeConflict(cp.output());
System.out.println("Conflict found. Increasing limit");
upperbound = upperbound + 1;
// Remove the original C4 constraint add it again with the updated limit value
}
I am not sure on how to remove C4 (with original upper bound) and add C4 with the updated upper bound value and do so in an iterative manner.
Any help on this is greatly appreciated. Thanks.
#CPOptimizer#DecisionOptimization