To determine the set of constraints that cause infeasibility, there are two questions you can ask Gurobi Optimizer:

- What subset of the model is responsible for making it infeasible?
- What are the changes you may need to apply to your model to regain feasibility?

To answer #1, you can compute an Irreducible Infeasible Subsystem (IIS). This is a minimal subset of your constraints and variable bounds that, if isolated from the rest of the model, is still infeasible; but if it is further reduced by one element, feasibility is recovered. This is computed using the model.computeIIS() method.

Note that an infeasible model may have multiple IISes. The one returned by Gurobi is not necessarily the one with minimum cardinality; there may exist others with fewer constraints or bounds.

To answer the second question, you can compute the smallest perturbation to the model that would be sufficient to recover the model's feasibility (i.e., smallest with respect to a specified metric). Here, the corresponding methods are model.feasRelax() and model.feasRelaxS() (think of the 'S' suffix in the naming convention as 'Simplified').

In addition, there is a page in the documentation that covers this subject.

## Comments

0 comments

Article is closed for comments.