Random seed

641 views
Skip to first unread message

Markus Brachner

unread,
Dec 23, 2015, 6:38:53 AM12/23/15
to Gurobi Optimization
I have a question regarding the random seed parameter documented at https://www.gurobi.com/documentation/5.6/refman/seed.html
In my understanding setting the seed to the same value should lead to the same solution path in my MIP models. In fact the solution paths are still very different with the same seeds. Do I misunderstand something regarding this parameter, or is there also some other source of randomness, which cannot be controlled (e.g., multiple thread concurrency with nondeterministic runtimes)?

Best regards,
Markus

Tobias Achterberg

unread,
Dec 23, 2015, 6:44:34 AM12/23/15
to gur...@googlegroups.com
Gurobi is deterministic even when using multiple threads. This means that when
you solve the same problem with the same parameter settings on the same hardware
and operating system with the same Gurobi binary multiple times you will always
see the same behavior, except for wall-clock time measurements.

Due to wall-clock time measurements, which will always be non-deterministic, you
will see a non-deterministic termination if you are using a wall-clock time
limit. Moreover, the MIP node log (the output that displays information on the
MIP solving process) is updated every 5 seconds, which means that the node log
lines themselves are non-deterministic (even though the underlying solving
process is deterministic).


Tobias

J. Friedman

unread,
Dec 18, 2017, 4:04:39 AM12/18/17
to Gurobi Optimization
Does the Seed parameter change the algorithm, or just the tie breaking choices withing an algorithm. For example, does it change the level of Heuristics. I solve the same problem on two different machines and get different answers. Are they essentially using different seed values?

Kostja Siefen

unread,
Dec 18, 2017, 4:11:37 AM12/18/17
to Gurobi Optimization
The Seed parameter affects random number generation which is used for tie breaking so a different seed value is likely to change the solution path. Note that Gurobi is deterministic on the same machine, with the same model and the same parameters. Different machines might have different processors so it is possible that you see different behavior on different machines for the same model.

Kostja 
Reply all
Reply to author
Forward
0 new messages