Skip to main content

ComputeIIS taking too long




  • Michel Soares
    Thought Leader

    ComputeIIS can sometimes take a long time. If you are running on the command line, you can pause anytime and write the current IIS, you do not have to wait until it finishes.

    One strategy with IIS is to try to find a smaller submodel with your specific knowledge of the model. Any type of partition/grouping that you can do with your model may be a good idea to find a smaller problem that is also infeasible and compute its IIS. Another way to do it is to remove "groups" of constraint one by one until you find the source type of constraint and find a smaller infeasible submodel.

  • Alison Cozad
    Gurobi Staff Gurobi Staff

    Michel is quite right, the Compute IIS routine can be computationally expensive, particularly for large MIP models.  You can find out a bit more about how the routine works here: How does Gurobi compute the IIS for infeasible models?  It may be that this is simply a very slow process for your model.  So, let's address that directly.

    Luckily, there are a few things you can do:

    1. Speed up compute IIS by reducing the search space of constraints that Gurobi needs to consider when computing the IIS as Michel noted.  You can do this by prescreening constraints and limits that are more likely to be causing the issue.  There is a write-up on how to do this in the 'Best Practices' section of How do I determine why my model is infeasible?

    2. [Recommended] Try a feasibility relaxation instead of compute IIS.  
      When compute IIS is too computationally expensive, we recommend using a feasibility relaxation with the objective of minimizing the number of violations for larger MIP models.  To see how to do this, you can check out the 'Best Practices > Compute IIS can be computationally expensive for larger models' section of How do I determine why my model is infeasible?

    For instructions and examples on how to use these two features, 


Please sign in to leave a comment.