org.powertac.common
Class RandomSeed
java.lang.Object
java.util.Random
org.powertac.common.RandomSeed
- All Implemented Interfaces:
- Serializable
public class RandomSeed
- extends Random
RandomSeed is used to store generated random seed in the database in
order to be able to "replay" PowerTAC competitions later on with
exactly the same random seed settings as originally used.
Note that server code is not intended to create instances of
RandomSeed directly. Instead, please request seeds through
RandomSeedRepo.getRandomSeed(). This way, your code will work the same
whether using new seeds or replaying a previous simulation.
- Version:
- 1.0 - January 01, 2011
- Author:
- Carsten Block, John Collins
- See Also:
- Serialized Form
|
Constructor Summary |
RandomSeed(String classname,
long requesterId,
String purpose)
Constructor that creates a new seed with a random value. |
RandomSeed(String classname,
long requesterId,
String purpose,
long value)
Constructor to re-create a random seed with a given value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomSeed
public RandomSeed(String classname,
long requesterId,
String purpose)
- Constructor that creates a new seed with a random value.
To keep the logfile simple, constructors are not logged in this
class; only the init() method is logged.
RandomSeed
public RandomSeed(String classname,
long requesterId,
String purpose,
long value)
- Constructor to re-create a random seed with a given value.
getId
public long getId()
getRequesterClass
public String getRequesterClass()
getRequesterId
public long getRequesterId()
getPurpose
public String getPurpose()
getValue
public long getValue()
Copyright © 2012 Power TAC. All Rights Reserved.