RandomSource
ptolemy.actor.lib.RandomSource

A base class for sources of random numbers. It uses the class java.util.Random. This base class manages the seed.

Author(s): Edward A. Lee, Steve Neuendorffer
Version:$Id: RandomSource.java,v 1.44 2006/03/28 23:56:40 cxh Exp $
Pt.Proposed Rating:Green (eal)
Pt.Accepted Rating:Green (bilung)




seed
The seed that controls the random number generation. A seed of zero is interpreted to mean that no seed is specified, which means that each execution of the model could result in distinct data. For the value 0, the seed is set to System.currentTimeMillis() + hashCode(), which means that with extremely high probability, two distinct actors will have distinct seeds. However, current time may not have enough resolution to ensure that two subsequent executions of the same model have distinct seeds. This parameter contains a LongToken, initially with value 0.