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 Details

    • 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.
  • Method Details