ComputeIIS() and unmodified constraints: which IISConstrForce value is the right one?
AnsweredHello,
I have to quickly find if a single new constraint C makes a given MIP problem M infeasible.
We know for sure that M is feasible without C. Our goal is to find whether or not C causes the infeasibility.
I'm currently relying on the ComputeIIS() method. I've found this:
From https://www.gurobi.com/documentation/current/refman/py_model_computeiis.html :
If you are only interested in knowing which of the changes caused the infeasibility, you can force the unmodified bounds and constraints into the IIS. That allows the IIS algorithm to focus exclusively on the new constraints, which will often be substantially faster.
which makes me think to set IISConstrForce to 1 for each constraint of M except C (that goes to 0).
At the same time, from https://support.gurobi.com/hc/en-us/articles/360029969391-How-do-I-determine-why-my-model-is-infeasible- :
Once you have this list of potentially problematic constraints and limits, you can specify that
- for 'compute IIS', constraints and limits that are not on the list are not eligible for inclusion in the IIS using the ISConstrForce,
which makes me think to set IISConstrForce to 0 for each constraint of M except C (that goes to 1).
I feel like the information above is confusing, and I'm surely missing something. I believe the right one for my problem is the former. I kindly ask for your help.
Thank you in advance.
-
Hi Lorenzo,
I agree we may need to work on the wording to make it more clear, but I am confused by your problem statement.
I have to quickly find if a single new constraint C makes a given MIP problem M infeasible.We know for sure that M is feasible without C. Our goal is to find whether or not C causes the infeasibility.
If M+C is infeasible, and M is feasible, then the addition of a single constraint C must have made it infeasible. Can you not just solve M+C and check feasibility? I'm not sure where computeIIS fits into this picture.
If you did want to compute an IIS then you know for sure constraint C must belong to it, since M is feasible. So you could set IISConstrForce=1 for C, but I do not expect this would save much time.
- Riley
0 -
Hi Riley,
Thank you for the answer. My goal is to check feasibility as fast as possible.
I thought that using computeIIS() could save time in proving infeasibility.I'm trying to solve M+C with MIPFocus = 1 and ImproveStartTime = 0.1, to let Gurobi focus on finding feasible solutions. I think this is the way to go.
0 -
Hi Lorenzo,
The computeIIS routine requires the model to be "solved" first. If you ran it without solving the model first it would initiate a solve, so it is no benefit here. Finding an IIS can also be more computationally expensive than the solve itself.
My advice is to try removing your objective function, i.e. setting it to 0, since feasibility is invariant to an objective, and no objective function should allow more dual reductions to be applied.
You could also try using our parameter tuning tool to discover which parameters help prove infeasibility the fastest. Of course most people use it to try and get their model to solve to optimality, or to a particular MIP gap as fast as possible, but there is no reason it can't be used to prove infeasibility as fast as possible.
- Riley
0 -
Hi Riley,
Thank you for your precious advice!0
Please sign in to leave a comment.
Comments
4 comments