Runtime of Solver
Hello,
I am new to Gurobi and not really advanced in the topic of optimization too.
I created a MIP model in Python and I am using the gurobi solver to solve it.
As i did not have the real data in the beginning I used synthetic timeseries for building the model and it worked fine with it. By now I am using the real data. The only difference is that some of the real values are much smaller than the synthetic ones.
I changed nothing but the values but the runtime of the model increased extremely. Before I reached a 1 % gap after 50 seconds. Now it needs around 2 hours for the same.
Does anyone have an idea what the problem is? Here is the header of the gurobi solving:
And is there some rule of thumb to conclude the expected time needed for the solving from the number of variables?
In the end I am planing on solving a problem with 192720 continous and 17520 binary variables. It would be great to know in advance if that is even possible in a reasonable amount of time.
Thanks a lot for any help!
Rina

Hi,
Can you share complete log files for these runs? Without them it is tricky to say, why it needed 50 seconds and now needs 2 hours.
Also please note, there is no way of predicting the run time of a MIP just from the size. It depends on so many factors. I have seen very large models that solve in a few minutes but I have also seen very small models that takes days to solve.
Best regards,
Sonja
0 
Hey Sonja,
thanks for your answer. I found some workarounds to make the solver faster.
But I have another question now and I hope you can help me with it.
Since yesterday I get shown the barrier log even though I don´t know what why.
What confuses me more ist that when I print my model statistics after finding the solution using
m.printQuality()
I get :
Solution quality statistics for model 15 energy system_copy :
Maximum violation (unscaled/scaled):
Bound : 0.00000000e+00 / 0.00000000e+00
Constraint : 7.26562500e07 / 7.26562500e07 (Speicher_min[278])
Dual : 3.55271368e15 / 3.55271368e15 (EHU[91])My model is named '15 energy system'. Why is it showing me the statistics of a copy of my model?
0 
Before I always had the MIP logging.
0 
Can you share the whole log? Do you have a copy of the model object around or is m the only Gurobi model?
0
Please sign in to leave a comment.
Comments
4 comments