|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.ifremer.isisfish.simulator.SimulationContext
public class SimulationContext
Keep all information on one simulation.
| Field Summary | |
|---|---|
protected ClassLoader |
classLoader
|
protected Map<String,String> |
contextEquationOperator
Operator used in equation values |
protected Map<String,Double> |
contextEquationValue
Context value used in equation. |
protected org.nuiton.topia.TopiaContext |
db
TopiaContext must be used by rule action to modify data |
protected org.nuiton.topia.TopiaContext |
dbResult
TopiaContext must be used to save result |
protected MetierMonitor |
metierMonitor
|
protected PopulationMonitor |
populationMonitor
|
protected ResultManager |
resultManager
|
protected RuleMonitor |
ruleMonitor
|
protected File |
scriptDirectory
|
protected SimulationStorage |
simulation
|
protected SimulationControl |
simulationControl
|
protected Set<SimulationListener> |
simulationListeners
|
protected Map<String,Object> |
values
|
| Constructor Summary | |
|---|---|
protected |
SimulationContext()
|
| Method Summary | |
|---|---|
void |
addSimulationListener(SimulationListener l)
Add simulation listener, if listener is SimulationResultListener, it's
automatically added as listener on ResultManager |
void |
closeDB()
|
void |
closeDBResult()
|
void |
fireAfterSimulation()
|
void |
fireBeforeSimulation()
|
static SimulationContext |
get()
|
ClassLoader |
getClassLoader()
|
org.nuiton.topia.TopiaContext |
getDB()
This method return TopiaContext that Rule action must used to modify data. |
org.nuiton.topia.TopiaContext |
getDbResult()
this method return TopiaContext that must be used to save result |
MetierMonitor |
getMetierMonitor()
|
PopulationMonitor |
getPopulationMonitor()
|
ResultManager |
getResultManager()
|
RuleMonitor |
getRuleMonitor()
|
File |
getScriptDirectory()
|
SimulationControl |
getSimulationControl()
|
SimulationStorage |
getSimulationStorage()
|
Object |
getValue(String name)
Permet de recuperer une valeur prealablement stocker avec un setValue |
double |
getValueAndCompute(String key,
double defaultValue)
Return value from context. |
void |
message(String message)
|
static void |
remove()
remove simulation associate with current thread |
void |
removeSimulationListener(SimulationListener l)
Remove simulation listener, if listener is SimulationResultListener, it's
Automatically removed as listener on ResultManager |
void |
setClassLoader(ClassLoader classLoader)
|
void |
setScriptDirectory(File scriptDirectory)
Script directory to use. |
void |
setSimulationControl(SimulationControl simulationControl)
|
void |
setSimulationStorage(SimulationStorage simulation)
|
void |
setValue(String key,
Double value,
String operator)
Add value/key pair into context. |
void |
setValue(String name,
Object value)
Permet de stocker une valeur en fonction d'une cle, cela peut-etre util pour partager des informations entre Rule ou d'autre objet. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<String,Object> values
protected SimulationStorage simulation
protected SimulationControl simulationControl
protected PopulationMonitor populationMonitor
protected MetierMonitor metierMonitor
protected RuleMonitor ruleMonitor
protected ResultManager resultManager
protected Set<SimulationListener> simulationListeners
protected ClassLoader classLoader
protected File scriptDirectory
protected org.nuiton.topia.TopiaContext db
protected org.nuiton.topia.TopiaContext dbResult
protected Map<String,Double> contextEquationValue
protected Map<String,String> contextEquationOperator
| Constructor Detail |
|---|
protected SimulationContext()
| Method Detail |
|---|
public static SimulationContext get()
public static void remove()
public void addSimulationListener(SimulationListener l)
SimulationResultListener, it's
automatically added as listener on ResultManager
l - public void closeDB()
public void closeDBResult()
public void removeSimulationListener(SimulationListener l)
SimulationResultListener, it's
Automatically removed as listener on ResultManager
l - public void fireBeforeSimulation()
public void fireAfterSimulation()
public ClassLoader getClassLoader()
public void setClassLoader(ClassLoader classLoader)
classLoader - The classLoader to set.public Object getValue(String name)
name - le nom de la valeur souhaitée
public void setValue(String name, Object value)
name - le nom de la valeurvalue - la valeurpublic SimulationStorage getSimulationStorage()
public void setSimulationStorage(SimulationStorage simulation)
simulation - The simulation storage to set.public SimulationControl getSimulationControl()
public void setSimulationControl(SimulationControl simulationControl)
simulationControl - The simulationControl to set.public PopulationMonitor getPopulationMonitor()
public MetierMonitor getMetierMonitor()
public RuleMonitor getRuleMonitor()
public ResultManager getResultManager()
public org.nuiton.topia.TopiaContext getDB()
throws org.nuiton.topia.TopiaException
org.nuiton.topia.TopiaException
public org.nuiton.topia.TopiaContext getDbResult()
throws org.nuiton.topia.TopiaException
org.nuiton.topia.TopiaExceptionpublic File getScriptDirectory()
public void setScriptDirectory(File scriptDirectory)
scriptDirectory - public void message(String message)
message - messagepublic void setValue(String key, Double value, String operator)
key - keyvalue - valueoperator - operatorpublic double getValueAndCompute(String key, double defaultValue)
key - keydefaultValue - default value or value to compute
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||