[Coin-lpsolver] CoinSeedRandom
John J Forrest
jjforre at us.ibm.com
Wed Jan 21 16:51:13 EST 2004
Done in ClpModel constructors
Matthew Galati <magh at lehigh.edu>
Sent by: coin-lpsolver-admin at www-124.southbury.usf.ibm.com
01/21/2004 04:38 PM
To
coin-lpsolver at www-124.southbury.usf.ibm.com
cc
Subject
[Coin-lpsolver] CoinSeedRandom
Hi CLP,
Debugging some code using CLP, I was getting different answers from two
consecutive runs on the same problem set. Seems CLP has some randomness
built in through several calls to CoinDrand48(), which calls drand48().
According to the man on drand48
"The srand48(), seed48() and lcong48() functions are initialization
functions, one of which should be called before using
drand48()"
That is, I am not sure what drand48 uses if it is not first initialized,
maybe the current timestamp(?). I don't see any reference to
CoinSeedRandom in CLP or OsiClp. The user can force this by calling
CoinSeedRandom(some constant) before any solver call to CLP. Maybe the
CLP constructor should seed the random number generator to some
constant, for the sake of repeatability/testing/debugging.? Or, maybe we
can make this a parameter or compiler option.
Matt
--
Matthew Galati
ISE Lehigh University
IBM Service Parts Solutions
610.758.4042 (Office)
610.882.0779 (Home)
magh at lehigh.edu, magal11 at us.ibm.com
http://sagan.ie.lehigh.edu/mgalati/
_______________________________________________
Coin-lpsolver mailing list
Coin-lpsolver at www-124.ibm.com
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-lpsolver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20040121/de19912e/attachment.html>
More information about the Clp
mailing list