Most efficient way to extract the IIS of a LP?
Awaiting user inputHi,
I'm trying to use the computeIIS() function from the C++ API on a LP. The documentation (https://www.gurobi.com/documentation/9.5/refman/py_model_computeiis.html) says that
"IIS results are returned in a number of attributes: IISConstr, IISLB, IISUB, IISSOS, IISQConstr, and IISGenConstr. Each indicates whether the corresponding model element is a member of the computed IIS."
However the computeIIS function does not return anything. Therefore, I'm wondering what is the most efficient way to access the constraints (constraints and bounds) in the IIS?
There seems to be two ways to access the IIS,
1. dump it to a file;
2 or iterate over every var/constraints and check their flag.
But I'm wondering whether there is a more efficient way?
Thanks a lot!
-
Hi!
What do you mean by "more efficient"? This largely depends on what you intend to do with the results. As you have mentioned, the documentation on Model.computeIIS() shows those two ways of accessing the information - either one by one or by inspecting the full IIS LP file. The method does indeed not return anything, instead it populates the respective model attributes.
Cheers,
Matthias0
Please sign in to leave a comment.
Comments
1 comment