Inquiry about the calculation time
AnsweredHello,
I use Gurobi to solve a quadratic programming. The runtime in Matlab for the same optimization problem is much higher than quadprog despite the iteration number in matalb is much higher. In other words, it needs 19 ms to solve the OP for quadprog in 168 iterations. By contrast, it takes 376ms to solve the OP in 31 iterations with Gurobi. I use results.runtime to know the run time in Gurobi and tic toc to know the run time in quadprog.
I believe there is something wrong, I believe that calculation time in Gurobi is much less than I have obtained. So is possible to know the actual calculation time for Gurobi in matlab.
May you help me?
0
-
Official comment
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?. -
The \( \texttt{runtime} \) field is the correct place to retrieve the runtime. Do you have the log file produced by Gurobi? This would give a clearer picture of what Gurobi is doing and for how long.
It's possible that Gurobi spends the majority of its solve time in presolve, then solves the model very quickly once presolve completes. If this is the case, you could try setting the Presolve parameter to 0. This normally isn't recommended, but it can sometimes improve performance for small models that solve very quickly.
Eli
0
Post is closed for comments.
Comments
2 comments