Hello Experts,
I am using Gurobi solver with CVX. I want to find the solver time taken to solve my problem.
How can I get it?
Hello Experts,
I am using Gurobi solver with CVX. I want to find the solver time taken to solve my problem.
How can I get it?
I think it is not possible to get the pure time gurobi spends on solving the problem.
The closest indication on how long it takes to solve any problem in cvx can be acquired as follows:
Place a code line to initiate measuring time just before cvx_begin;
Measure the elapsed time just before cvx_end (the time to formulate the problem);
Measure the elapsed time just after cvx_end (the time to formulate and solve the problem);
The time to solve the problem can be found by subtracting elapsed times found in steps 3 and 2.
In code format:
tstart = tic;
cvx_begin
...
...
t1 = toc(tstart);
cvx_end;
t2 = toc(tstart);
time_to_solve = t2 - t1;
Regards.