Skip to main content

Is TimeLimit counting the cpu time or system time ?

Answered

Comments

4 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

    Hi Miranda,

    The TimeLimit parameter sets the maximum wall clock time (system time). The time used for model construction / reading of the model is excluded.

    Best regards,
    Jaromił

    0
  • Ozlem Akbudak
    Gurobi-versary
    First Comment
    First Question

    Hi Jaromil,

    Is there a way to set a time limit by using CPU time?

    Thanks in advance,

    Ozlem

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Ozlem,

    There is currently no way to set the time limit via CPU time. You could check for the CPU time in one of the callbacks and terminate the optimization once a certain limit is reached. You would have to get the CPU time information from standard libraries.

    Best regards,
    Jaromił

    0

Post is closed for comments.