|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.lifl.jedi.util.SimulationProperties
public class SimulationProperties
Singleton class representing properties used during simulation. Those properties make possible to :
JEDI V 2.2 |
Created the 7 nov. 2008 |
Modified the 5th may 2009 |
Yoann Kubera |
SMAC Team (Systèmes Multi-Agents et Comportement) |
LIFL (Laboratoire d'Informatique Fondamentale de Lille) |
University of Lille, France |
Field Summary | |
---|---|
protected boolean |
displayWarning
If the warnings are displayed on System.err or not. |
protected java.util.Random |
randomizer
Random number generator of the simulation. |
protected long |
randomSeed
Seed of the random number generator of the simulation. |
Method Summary | |
---|---|
boolean |
areWarningsDisplayed()
Returns true if the differents warnings of JEDI have to
be displayed. |
static SimulationProperties |
getInstance()
Gets the instance of the simulation properties. |
java.util.Random |
getRandomizer()
Gets the random number generator of the simulation. |
long |
getRandomizerSeed()
Gets the random number generator of the simulation's seed. |
static boolean |
loadSimulationProperties(java.lang.String file)
Loads a property file. |
static double |
random()
Equivalent to a call to Math.random() using the random number
generator defined by JEDI. |
void |
reset()
Resets the simulation properties. |
static boolean |
saveSimulationProperties(java.lang.String file)
Saves the property file. |
void |
setRandomizerSeed(long seed)
Sets the seed of the simulation's random number generator . |
void |
setWarningsDisplayed(boolean w)
Sets if the differents warnings of JEDI have to be displayed or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Random randomizer
protected long randomSeed
protected boolean displayWarning
Method Detail |
---|
public static SimulationProperties getInstance()
public void reset()
public java.util.Random getRandomizer()
public void setRandomizerSeed(long seed)
This method must be called before any usage of the random number generator to ensure simulation reproducibility.
seed
- The new seed of the random number generator of the simulation.public long getRandomizerSeed()
This method must be called before any usage of the random number generator to ensure simulation reproducibility.
public boolean areWarningsDisplayed()
true
if the differents warnings of JEDI have to
be displayed.
true
if the differents warnings of JEDI have to
be displayed.public void setWarningsDisplayed(boolean w)
w
- true
if the differents warnings of JEDI have to
be displayed.public static double random()
Math.random()
using the random number
generator defined by JEDI.
public static boolean loadSimulationProperties(java.lang.String file)
file
- The file name the properties are loaded from.public static boolean saveSimulationProperties(java.lang.String file)
file
- The file where to save the properties.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |