Skip to main content

Model is infeasible in Gurobi although it has a feasible solution

Answered

Comments

5 comments

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    For the second approach, you get a Warning stating that the solution found is actually infeasible.

    Warning: max constraint violation (1.5757e+01) exceeds tolerance
             (model may be infeasible or unbounded - try turning presolve off)

    This can happen for numerically shaky models. As stated in the warning you should try turning off Presolve. Additionally, you could try experimenting with the NumericFocus parameter.

    It is possible that your model has some numerical issues. In this case, I would recommend having a look at our Guidelines for Numerical Issues.

    Note that often giving a meaningful objective function works better than just solving a feasibility problem for numerically questionable models because the objective function may "lead" the solution process into a direction where numerical issues are not (or less) present.

    Best regards, 
    Jaromił

    0
  • Samira Fallah
    Gurobi-versary
    Conversationalist
    First Question

    By adjusting the parameters m.params.Presolve to 0 and m.params.NumericFocus to 1, 2, or 3, I was able to alleviate the issue to a certain degree. For less complex instances, these parameter settings may result in a successful solution; however, for more complex instances, the solver is still unable to find a feasible solution, despite the existence of one.

    Best,
    Samira

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Samira,

    Since adjusting the specific parameters seems to help, it is very likely that your model has some numerical issues. Please have a look at our Guidelines for Numerical Issues to check whether your model indeed may suffer from any numerical issues.

    Please note that for complex models (independent whether they have or have not any numerical issues), finding feasible points most often gets harder when the model size increases. You might want to have a look at the Most important parameters for MIPs to improve the performance. In particular, you might want to experiment with the NoRelHeurTime parameter.

    Best regards, 
    Jaromił

    0
  • Samira Fallah
    Gurobi-versary
    Conversationalist
    First Question

    Thank you for your suggestion. I have attempted to implement it by setting the value of "m.params.NoRelHeurTime" to 300 and 600, respectively; however, it did not yield the desired results.

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Then, the only option left is to try to improve the numerical properties of your model. Please follow the instructions in our Guidelines for Numerical Issues.

    1

Please sign in to leave a comment.