Skip to main content

Gurobi stop criteria

Answered

Comments

6 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?.
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    You can use the BestObjStop parameter, if you want to make Gurobi stop the optimization when a specific objective value is reached.

    Best regards,
    Jaromił

    0
  • Murilo Machado
    Gurobi-versary
    First Question
    Conversationalist

    Hi Jaromił Najman,

    I would like to terminate Gurobi after it has performed X amount of objective function evaluations. I'm trying to compare the results with an algorithm where the stopping criterion is the number of evaluations of the objective function.

    Can you tell me how many evaluations of the objective function are performed at each iteration or node?

    Thanks for listening.

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Murilo,

    Thank you for the clarification.

    It is currently not possible to get the number of objective function evaluations. Please note that objective function evaluations are performed by the Simplex algorithms, the Barrier algorithm, and various heuristics so tracking the amount of objective function evaluations is rather hard.

    Best regards,
    Jaromił

    0
  • Jennifer Locke
    Gurobi Staff Gurobi Staff

    Hi Murilo,

    Because solvers have a different bag of tricks used under the hood, it is best to find a common termination criteria when comparing between two or more solvers. Using time as the termination criteria is a good universal criteria.  

    Are you able to use a different stopping criteria with the other solver? If not, tell us what your objective is, not based on the other solver, but what your objective is when comparing the two solvers.

    Thanks,

    Jennifer

    0
  • Murilo Machado
    Gurobi-versary
    First Question
    Conversationalist

    Hi Jaromił Najman , thank you for the informations.

    Hi Jennifer Locke, I understand that time is a common criterion of para in exact solvers, but I'm creating a matheuristic and I want to compare it with a metaheuristic (where the most common criterion is the amount of evaluation of the objective function). But that's ok, I'll use time as a criterion, it seems to be the most coherent. Thank you very much for your attention.

     

    0

Post is closed for comments.