Skip to main content

Why are binary Variables getting float results. Is there any command to prevent it?

Answered

Comments

3 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two 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 try Gurobot, our chatbot interface offering instant, expert-level support.
  • Jaromił Najman
    • Gurobi Staff

    Hi Biswajit,

    It is possible, that due to machine precision and numerical inaccuracies caused by, e.g., so-called trickle-flows, that discrete variables take float values in an optimal solution. To avoid this you could either decrease the IntFeasTol parameter value or use the IntegralityFocus parameter.

    I recommend using (and reading the description of) the IntegralityFocus parameter even tho it might have a visible impact on performance

    Best regards, 
    Jaromił

    0
  • Gwyneth Butera
    • Gurobi Staff

    In addition to Jaromil's reply, please refer to Why does Gurobi sometimes return non-integral values for integer variables?

    0

Post is closed for comments.