[Clp] How to get the same solution several times

John Forrest john.forrest at fastercoin.com
Mon Aug 2 10:29:36 EDT 2010


Alberto,

If you have a ClpSimplex model, try doing

model.setRandomSeed(1234567);

if that doesn't work (which it should) then you will have to generate a
new ClpSimplex instance each time.  Each ClpSimplex has a local
randomNumberGenerator_ which is initialized with 1234567 on creation.

John Forrest

On Mon, 2010-08-02 at 15:32 +0200, alde wrote:
> Hi all,
> 
> I have an LP problem with several optimal solutions and I was
> wondering whether it is possible to make the solver return the same
> solution every time it solves the same instance. I tried to set up
> what I thought was the "seed" for some random operations the solver
> performs by using the method CoinSeedRandom(int) but it didn't work.
>  I also tried naively to initialize the c++ random generator but it
> didn't work either.
> 
> Thanks in advance,
> 
>  
> 
> Alberto Delgado
> 
> _______________________________________________
> Clp mailing list
> Clp at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/clp





More information about the Clp mailing list