Runtime / Work vs Presolve
AnsweredIs it correct that the Runtime model attribute does not incorporate time spent in Presolve?
And what about the Work attribute?
Is there a way to retrieve the time spent in Presolve?
Thanks!
0
-
Official comment
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. -
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,
David0 -
Ok, I see
Thank you David!
0
Post is closed for comments.
Comments
3 comments