Skip to main content

gurobipy.GurobiError: Empty general constraint with infinite constant

Answered

Comments

3 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
  • Silke Horn
    • Gurobi Staff Gurobi Staff

    There is a known issue with general constraints in numerically challenging models. I am not sure what exactly causes the numerical issues in your model, but my guess would be that it is due to rounding errors in your coefficients. (They look like approximations of fractions. If so, you could try multiplying your constraints by a common denominator to get "nicer" numbers.) Our Numerics Guidelines could also be helpful/interesting.

    The issue is fixed in Gurobi 9, which will be released later this month.

    With NumericFocus=2, the model can also be solved with Gurobi 8.

    0
  • Anian Ruoss
    • Gurobi-versary
    • First Comment
    • First Question

    Hi Silke,

    Thank you for your quick response! Indeed, using NumericFocus=2 fixes the problem.

    Best,

    Anian

    0

Post is closed for comments.