Skip to main content

Callbacks - how to query number of calls and time spent in user callbacks?

Answered

Comments

6 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 Pia,

    Or is it only possible to obtain these values by defining private counter/clock variables that I increase in my callback function?

    Yes, currently it is only possible via private counter/clock variables which have to be increased in your callback function.

    Alternatively, you could read the log message via the MESSAGE callback and filter it for the number of callbacks.

    Best regards,
    Jaromił

    0
  • Pia Ammann
    • Gurobi-versary
    • First Comment
    • First Question

    Alright, thanks for the quick response!

    Best, Pia

    0
  • Niels Wouda
    • Gurobi-versary
    • First Comment

    Hi Jaromił Najman,

    Are there plans to make the time spent in user-callbacks available as a model attribute? It's a bit of a workaround having to approximate it with my own clock variable.

    Best, Niels

    0
  • Jaromił Najman
    • Gurobi Staff

    Hi Niels,

    There are currently no plans on implementing these attributes in the next release. However, the plans may change in the future.

    Best regards,
    Jaromił

    0
  • Niels Wouda
    • Gurobi-versary
    • First Comment

    Hi Jaromił,

    Thanks for your quick response! A shame, but understandable. I'll make do with my own counters for now.

    Best, Niels

    0

Post is closed for comments.