How to get repeatable solutions to MIP?

164 views
Skip to first unread message

Matt Daskilewicz

unread,
Jul 22, 2016, 1:12:24 PM7/22/16
to Gurobi Optimization
Hello,

I am working with a large MIP that will not solve to completion (After presolve: Presolved: 35631 rows, 167059 columns, 735287 nonzeros; Variable types: 0 continuous, 167059 integer (158572 binary)) Generally we run the model for a few hours and then stop it. We need to be sure that when we do this multiple times, Gurobi returns the same sequence of solutions each time. Currently, the model does this, but i'm almost certain that in the past I have found this to not be the case when working on other models: performing two back to back runs could yield very different performance. My questions are: 1) is there some property of the model that causes Gurobi to produce identical results on repeated runs or not, and 2) is there some parameter or other setting in Gurobi to control whether it behaves deterministically?

Thanks!

Daniel Espinoza

unread,
Jul 22, 2016, 4:04:09 PM7/22/16
to Gurobi Optimization
Hi Matt,

1) If you run the same model with the same parameters and without any non-deterministic setting (stop running according to time limit, or using method=3) on the same machine; you will obtain the same behavior each time.
2) If you want to force the method to behave different you may change the `seed' parameter for the run; but using the same seed will lead to the same behavior.

Best,
Daniel

Matt Daskilewicz

unread,
Jul 25, 2016, 3:35:44 PM7/25/16
to Gurobi Optimization
Thanks for the info. Looks like method = 3 was the cause. Could you provide more information about the "on the same machine" stipulation? Is that just because the number of cores may differ between machines, or is there more to it? Is there a way to guarantee identical behavior on different machines?

Thanks,
Matt

Daniel Espinoza

unread,
Jul 25, 2016, 9:33:44 PM7/25/16
to Gurobi Optimization
Hi Matt,

In essence, anything that may alter floating point behavior may cause a different path for the program (since it may lead to a different epsilon-optimal LP solution); and also, how many cores are available for it.
Memory availability and bus speed will impact time performance but it should not change the path of the code.
Different OS require different compilers and options; thus the code is not 100% equivalent.

I hope this helps.

Best regards,
Daniel
Reply all
Reply to author
Forward
0 new messages