Gurobi taking too much time

402 views
Skip to first unread message

lahlou aziz

unread,
Dec 19, 2017, 9:59:47 AM12/19/17
to Gurobi Optimization
Hi,

I am experiencing a huge work-time since yesterday and no improvement were made since a long time.
Could any one explain me why it is taking so much time ?

Just for information, the inputs to my MILP are : a Graph of nodes and links and a set of requests R (each request is a graph of 7 nodes, I am trying to solve a kind of assignment problem adapted to my optimization problem).

Please find attached the log.

Regards,
Aziz
gurobi_log

Daniel Espinoza

unread,
Dec 19, 2017, 10:24:34 AM12/19/17
to Gurobi Optimization
Hi Aziz,

Have you tried to find a good set of tuned parameters using a couple of smaller instances and try those in the harder problems?
Also, the default gap termination criteria may be too conservative for your application, changing it to 0.1% would mean to solve the problem in 12 minutes.

Best,
Daniel

lahlou aziz

unread,
Dec 19, 2017, 11:50:48 AM12/19/17
to Gurobi Optimization
Hi Daniel, 

To be honest I never tried to set tuned parameters as I am not aware of how to do it.

Could you please point me out to how to set those parameters and especially regarding the default gap termination criteria. I have to admit that I am not familiar with these concepts.

Best,
Aziz

Daniel Espinoza

unread,
Dec 19, 2017, 12:14:26 PM12/19/17
to Gurobi Optimization
Hi Aziz,

For tuning, here is the documentation:

For termination criteria there are a couple of parameters:

In particular mipgap:

Essentially a mipgap of zero is asking to prove that you have the best possible solution (within floating point tolerances)
whereas mipgap 1e-3 is saying that you want a solution proven to be the best possible with an error of (up to) 0.1% (within floating point tolerances)

Best,
Daniel

lahlou aziz

unread,
Dec 19, 2017, 12:29:31 PM12/19/17
to Gurobi Optimization
Hi Daniel,

Thank you so much for these references.
I tested the MIPGAP with a value of 0.1 and it works pretty well as you said in less than 13 minutes !
I will have a look into the tuning parameters and combine them with MIGAP.

Best,
Aziz

lahlou aziz

unread,
Dec 20, 2017, 2:06:10 PM12/20/17
to Gurobi Optimization
Hi Daniel,

So does the best solution is the optimal one ? I mean I have to find the optimal solution. I need to have some clarifications on this as I am writing a paper so I do not want to make mistakes.

Thanks
Aziz

Michael Winkler

unread,
Dec 21, 2017, 8:53:58 AM12/21/17
to Gurobi Optimization
Hi Aziz,

at the end of your optimization process you always have a best solution (if any was found). You might say that any incumbent is an optimal solution w.r.t. the current MIP gap. But optimality for the whole problem instance is only proven when the dual and primal bound are identical in the end, i.e., the MIP gap is 0.
So setting MIPGAP=0.1 will provide you with an optimal solution with respect to this MIP gap (or the one stated in the log), but there might exist better solutions and one optimal solution for your problem instance can only be guaranteed to be found if you set MIPGAP=0.

Best,
Michael

lahlou aziz

unread,
Dec 21, 2017, 9:30:40 AM12/21/17
to Gurobi Optimization
Hi Michael,

Thanks a lot for your explanations and clarifications.

Best,
Aziz
Reply all
Reply to author
Forward
0 new messages