Skip to main content

Terminate when the first BestBd is found

Answered

Comments

4 comments

  • Official comment
    Simranjit Kaur
    • 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?.
  • Jaromił Najman
    • Gurobi Staff

    Hi Taner,

    Could you briefly explain why the BestBdStop does not work in your case?

    You could implement a MIP callback, check whether the best bound so far fulfills your needs, and terminate  the optimization from the callback if needed.

    Best regards,
    Jaromił

    0
  • Taner Cokyasar
    • Gurobi-versary
    • First Comment
    • Curious

    Hi Jaromił,

    Thanks for your response. BestBdStop does not work because I cannot guess a good value for it. The below log shows an example termination with a time limit. The gap is 100% because a BestBd has not yet been found, but the run was terminated because of the time limit. Instead of using a time limit or an estimated BestBd with BestBdStop, I would like to run the instance until it naturally (without time limits) produces the below first line (and hopefully shows a BestBd not equal to 0.00).

     Nodes    |    Current Node    |     Objective Bounds      |     Work
    Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
    0 0 - 0 449701.000 0.00000 100% - 9059s
    0
  • Jaromił Najman
    • Gurobi Staff

    Hi Taner,

    To summarize, you want to stop the optimization as soon as any BestBd is computed, correct? There are multiple ways to achieve this. You could set BestBdStop = -1e10, assuming that a lower bound of -1e10 is not achievable for your problem. You could set NodeLimit=0 which terminates the optimization process as soon as pre-processing and the computation of the root relaxation is finished.

    The problem of a BestBd "being stuck" at 0 is a different one. This can sometimes be tackled via reformulations or a more aggressive presolving.

    Best regards,
    Jaromił

    1

Post is closed for comments.