Time to find the best solution in a mixed-integer linear programming model with JuMP

I am solving a mixed-integer linear programming model with JuMP and CPLEX. How could I measure the time required to find the best solution?

Sometimes, the global optimal solution is found, but the solver continues the search, aiming to prove its optimality. In other scenarios, a local optimum is found, but such a solution is not improved within the specified time limit.

Best regards,

Bruno

I dont know if there is an easy way.

You could write a solver-specific callback that recorded when each solution is found. See

1 Like

Dear Oscar,
Thank you so much for your help.
Best,
Bruno

1 Like