Package 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.
State log entry format:
requesterClass::requesterId::purpose::value
- Version:
- 1.0 - January 01, 2011
- Author:
- Carsten Block, John Collins
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getId()
String
getPurpose()
String
getRequesterClass()
long
getRequesterId()
long
getValue()
-