Skip to main content

Runtime / Work vs Presolve

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.
  • David Torres Sanchez
    • Gurobi Staff

    Hi Dimi,

    The Runtime attribute does incorporate time spent in presolve (so does the Work attribute).
    You can see the time spent in the log. I don't think there is an easy way of extracting this otherwise.

    You could just compute the presolved model and time it using model.presolve():

    # populate model
    start = time.time()
    with model.presolve() as p:
    pass
    print(f"Presolve has taken {time.time()-start}s")

    Cheers, 
    David

    0
  • Dimi Defillet
    • Gurobi-versary
    • First Question
    • First Comment

    Ok, I see

    Thank you David!

    0

Post is closed for comments.