Package fr.ifremer.isisfish.simulator
Interface SimulationParameter
- All Known Implementing Classes:
SimulationParameterCache
,SimulationParameterImpl
public interface SimulationParameter
Contains all parameters for one simulation.
SimulationParameter
must now be loaded from a Properties
object.
toProperties()
method, now return a new Properties
object
filled with :
- non modified original properties
- new properties if some objects has been instantiated by getters().
- Version:
- $Revision$ Last update: $Date$ By : $Author$
- Author:
- poussin, chatellier
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExtraRules
(String... extraRules) Add extra rules.void
Add new rule to rules list.void
Add new simulation plan.check()
Permet de verifier que tous les parametres sont bon.void
Clear plan list.void
Clear rule list.copy()
A copy instance of SimulationParameter.deepCopy()
Make a deep copy of current parameters.void
fixReloadContext
(boolean sensitivityContext) Remove all parameters non relative to given context.void
fromProperties
(Properties props) Load properties from file.Get description property.Get export names list.Get extra rules list.Generated pre script is internal script generated by isis.Get isis fish version for the simulation.Get librairies log level.org.nuiton.math.matrix.MatrixND
getNumberOf
(Population pop) int
Get number of year to run to simulate.int
Get number of sensitivity simulation.int
Get number of year to run to simulate.Return used objective.Return used optimization script.Get exports and observations map.int
If this simulation is generated by Optimization, return generation numberint
If this simulation is generated by Optimization, return individual number in generationGet instantiated population list.Get prescript content.Load region corresponding togetRegionName()
.Get region name.Get enabled result names list.getRules()
Get parameters rules list.Get script log level.Get instantiated sensitivity analysis.Return loaded sensitivity export.int
Get simulation number in simulation plan.Get instantiated simulation plan list.Set simulator name.Get simulator log level.Get instantiated strategies list.Get tag values.boolean
Return if cache should be used.boolean
boolean
boolean
Get use prescript.boolean
Get use simulation plans property.boolean
Return if statistic should be used.boolean
Returntrue
if simulation is composed of independent plan only.boolean
boolean
boolean
boolean
boolean
Delete result after export policy.boolean
boolean
boolean
boolean
boolean
Get only keep first result policy.boolean
boolean
boolean
boolean
void
Reload parameters du to context change.void
Reset some cached data when region is changed.boolean
removeRule
(Rule rule) Remove a rule.boolean
Remove a plan.void
setDescription
(String description) Set simulation description.void
setExportNames
(List<String> exportNames) Set export names list.void
setGeneratedPreScript
(String preScript) Generated pre script is internal script generated by isis.void
setIsisFishVersion
(String isisFishVersion) Set isis fish Version.void
setLibLogLevel
(String logLevel) Set lib log level.void
setNumberOfMonths
(int numberOfMonths) Set number of months to run to simulate.void
setNumberOfSensitivitySimulation
(int numberOfSensitivitySimulation) Set number of sensitivity simulation.void
setNumberOfYear
(int numberOfYear) Set number of year to run to simulate.void
setObjective
(Objective objective) Set objective.void
setOptimization
(Optimization optimization) Set simulation optimization.void
setOptimizationExportsObservations
(Map<ExportInfo, Observation> exportsObservations) Set exports and observations map.void
setOptimizationGeneration
(int optimizationGeneration) If this simulation is generated by Optimization, set generation numbervoid
setOptimizationGenerationIndividual
(int optimizationGenerationIndividual) If this simulation is generated by Optimization, set individual number in generationvoid
setPopulations
(List<Population> populations) void
setPreScript
(String preScript) Set pre script content.void
setProperties
(Properties props) Set multiples properties.void
setProperty
(String key, String value) Permet d'ajouter des parametres directement à partir de leur representation chaine.void
setRegionName
(String regionName) Set region name.void
setResultDeleteAfterExport
(boolean deleteAfterExport) Delete result after export policy.void
setResultEnabled
(Collection<String> resultEnabled) Set enabled result names list.void
Set simulation rules.void
setScriptLogLevel
(String logLevel) Set script log level.void
setSensitivityAnalysis
(SensitivityAnalysis sensitivityAnalysis) void
setSensitivityAnalysisOnlyKeepFirst
(boolean onlyKeepFirst) Change only keep first result policy.void
setSensitivityExport
(List<SensitivityExport> sensitivityExport) void
setSimulationPlanNumber
(int simulationPlanNumber) Set simulation number in simulation plan.void
setSimulationPlans
(List<SimulationPlan> plans) Set plans list.void
setSimulatorName
(String simulatorName) Set simulator name.void
setSimulLogLevel
(String logLevel) Set simulator log level.void
setStrategies
(List<Strategy> strategies) Set strategies list.void
setTagValue
(Map<String, String> tagValue) Set tag values.void
setUseCache
(boolean useCache) Change use optimization parameter.void
setUseComputeResult
(boolean useComputeResult) void
setUseOptimization
(boolean useOptimization) void
setUsePreScript
(boolean usePreScript) Set use prescript propertyvoid
setUseSimulationPlan
(boolean useSimulationPlan) Set use simulation plans property.void
setUseStatistic
(boolean useStatistic) Change use statistic property.Permet de convertir l'objet SimulationParameter en un objet Properties Cela permet de le stocker facilement sur le disque.toString()
The toString() method call getters.
-
Method Details
-
check
Permet de verifier que tous les parametres sont bon. Si ce n'est pas le cas la liste retournée contient la liste des messages d'erreur.- Returns:
- la liste d'erreur
-
getIsisFishVersion
String getIsisFishVersion()Get isis fish version for the simulation. Default value to :IsisConfig.getVersion()
.- Returns:
- the isisFishVersion.
-
setIsisFishVersion
Set isis fish Version.- Parameters:
isisFishVersion
- The isisFishVersion to set.
-
getDescription
String getDescription()Get description property. Default value to : "".- Returns:
- Description property.
-
setDescription
Set simulation description.- Parameters:
description
- the description to set.
-
getRegion
RegionStorage getRegion()Load region corresponding togetRegionName()
.- Returns:
- the region
-
getNumberOf
-
getExtraRules
Get extra rules list.- Returns:
- Returns the extraRules.
-
addExtraRules
Add extra rules. Appelé par les plan de simulation, pour ajouter des regles supplémentaires dans être integrés au zip.- Parameters:
extraRules
- extra rules to add
-
getPopulations
List<Population> getPopulations()Get instantiated population list.- Returns:
- Returns the populations.
-
setPopulations
- Parameters:
populations
- The populations to set.
-
getStrategies
Get instantiated strategies list. Defaut to : empty array list- Returns:
- Returns the strategies.
-
setStrategies
Set strategies list.- Parameters:
strategies
- strategies list to set
-
addSimulationPlan
Add new simulation plan.- Parameters:
plan
- simulation plan to add
-
removeSimulationPlan
Remove a plan.- Parameters:
plan
-- Returns:
true
if this list contained the specified element
-
getSimulationPlans
List<SimulationPlan> getSimulationPlans()Get instantiated simulation plan list. Default to empty list.- Returns:
- the plans.
-
setSimulationPlans
Set plans list.- Parameters:
plans
- plans to set
-
isIndependentPlan
boolean isIndependentPlan()Returntrue
if simulation is composed of independent plan only.- Returns:
true
if allSimulationPlan
areSimulationPlanIndependent
-
clearPlans
void clearPlans()Clear plan list. -
addRule
Add new rule to rules list.- Parameters:
rule
- rule to add
-
removeRule
Remove a rule.- Parameters:
rule
- rule to remove- Returns:
true
if this list contained the specified element
-
getRules
Get parameters rules list.- Returns:
- the rules
-
setRules
Set simulation rules.- Parameters:
rules
- rules to set
-
clearRules
void clearRules()Clear rule list. -
getUseCache
boolean getUseCache()Return if cache should be used. Default to : true.- Returns:
- use cache
-
setUseCache
void setUseCache(boolean useCache) Change use optimization parameter.- Parameters:
useCache
- use cache to set
-
getUseStatistic
boolean getUseStatistic()Return if statistic should be used. Default to false;- Returns:
- use statistic
-
setUseStatistic
void setUseStatistic(boolean useStatistic) Change use statistic property.- Parameters:
useStatistic
- use statistic to set
-
getUseComputeResult
boolean getUseComputeResult() -
setUseComputeResult
void setUseComputeResult(boolean useComputeResult) -
getExportNames
Get export names list.- Returns:
- export names list
-
setExportNames
Set export names list.- Parameters:
exportNames
- export names list to set
-
getNumberOfSensitivitySimulation
int getNumberOfSensitivitySimulation()Get number of sensitivity simulation. Default value to : -1- Returns:
- the numberOfSensitivitySimulation
-
setNumberOfSensitivitySimulation
void setNumberOfSensitivitySimulation(int numberOfSensitivitySimulation) Set number of sensitivity simulation.- Parameters:
numberOfSensitivitySimulation
- number of sensitivity simulation to set
-
getSensitivityAnalysis
SensitivityAnalysis getSensitivityAnalysis()Get instantiated sensitivity analysis. Default to : null.- Returns:
- the sensitivityAnalysis
-
setSensitivityAnalysis
- Parameters:
sensitivityAnalysis
- the sensitivityAnalysis to set
-
isSensitivityAnalysisOnlyKeepFirst
boolean isSensitivityAnalysisOnlyKeepFirst()Get only keep first result policy.- Returns:
- only keep first result policy
- Since:
- 4.1.1.0
-
setSensitivityAnalysisOnlyKeepFirst
void setSensitivityAnalysisOnlyKeepFirst(boolean onlyKeepFirst) Change only keep first result policy.- Parameters:
onlyKeepFirst
- only keep first result policy- Since:
- 4.1.1.0
-
isResultDeleteAfterExport
boolean isResultDeleteAfterExport()Delete result after export policy.- Since:
- 4.4
-
setResultDeleteAfterExport
void setResultDeleteAfterExport(boolean deleteAfterExport) Delete result after export policy.- Parameters:
deleteAfterExport
- delete result after export policy- Since:
- 4.4
-
getSensitivityExport
List<SensitivityExport> getSensitivityExport()Return loaded sensitivity export. If exports are null or empty, try to load it from last ready parameters.- Returns:
- the sensitivityExportNames
-
setSensitivityExport
- Parameters:
sensitivityExport
- the sensitivityExportNames to set
-
getUseOptimization
boolean getUseOptimization() -
setUseOptimization
void setUseOptimization(boolean useOptimization) -
getOptimization
Optimization getOptimization()Return used optimization script.- Returns:
- optimization method
-
setOptimization
Set simulation optimization.- Parameters:
optimization
- optimization
-
getObjective
Objective getObjective()Return used objective.- Returns:
-
setObjective
Set objective.- Parameters:
objective
- objective
-
getOptimizationExportsObservations
Map<ExportInfo,Observation> getOptimizationExportsObservations()Get exports and observations map.- Returns:
- exports and observations map
-
setOptimizationExportsObservations
Set exports and observations map.- Parameters:
exportsObservations
- exports and observations map
-
getOptimizationGeneration
int getOptimizationGeneration()If this simulation is generated by Optimization, return generation number -
setOptimizationGeneration
void setOptimizationGeneration(int optimizationGeneration) If this simulation is generated by Optimization, set generation number -
getOptimizationGenerationIndividual
int getOptimizationGenerationIndividual()If this simulation is generated by Optimization, return individual number in generation -
setOptimizationGenerationIndividual
void setOptimizationGenerationIndividual(int optimizationGenerationIndividual) If this simulation is generated by Optimization, set individual number in generation -
getUseSimulationPlan
boolean getUseSimulationPlan()Get use simulation plans property.- Returns:
- use simulation plan.
-
setUseSimulationPlan
void setUseSimulationPlan(boolean useSimulationPlan) Set use simulation plans property.- Parameters:
useSimulationPlan
- use simulation plan to set
-
getSimulationPlanNumber
int getSimulationPlanNumber()Get simulation number in simulation plan.- Returns:
- simulation number in simulation plan
-
setSimulationPlanNumber
void setSimulationPlanNumber(int simulationPlanNumber) Set simulation number in simulation plan.- Parameters:
simulationPlanNumber
- simulation plan number to set
-
getNumberOfYear
int getNumberOfYear()Get number of year to run to simulate.- Returns:
- number of year
-
setNumberOfYear
void setNumberOfYear(int numberOfYear) Set number of year to run to simulate.- Parameters:
numberOfYear
- number of year to set
-
getNumberOfMonths
int getNumberOfMonths()Get number of year to run to simulate.- Returns:
- number of year
-
setNumberOfMonths
void setNumberOfMonths(int numberOfMonths) Set number of months to run to simulate.- Parameters:
numberOfMonths
- number of months to set
-
getUsePreScript
boolean getUsePreScript()Get use prescript. Default to false.- Returns:
- Returns the usePreScript.
-
setUsePreScript
void setUsePreScript(boolean usePreScript) Set use prescript property- Parameters:
usePreScript
- use preScript to set
-
getPreScript
String getPreScript()Get prescript content.- Returns:
- preScript content
-
setPreScript
Set pre script content.- Parameters:
preScript
- prescript content
-
getGeneratedPreScript
String getGeneratedPreScript()Generated pre script is internal script generated by isis. This script must be executed before user defined preScript.- Returns:
- generated pre script
-
setGeneratedPreScript
Generated pre script is internal script generated by isis. This script must be executed before user defined preScript- Parameters:
preScript
- prescript content
-
getRegionName
String getRegionName()Get region name.- Returns:
- region name
-
setRegionName
Set region name.- Parameters:
regionName
- region name to set
-
getSimulatorName
String getSimulatorName()Set simulator name.- Returns:
- simulator name.
-
setSimulatorName
Set simulator name.- Parameters:
simulatorName
- simulator name to set
-
getResultEnabled
Collection<String> getResultEnabled()Get enabled result names list.- Returns:
- enabled result names list
-
setResultEnabled
Set enabled result names list.- Parameters:
resultEnabled
- enabled result names list
-
getTagValue
Get tag values. Default to empty map- Returns:
- Returns the tagValue.
-
setTagValue
Set tag values.- Parameters:
tagValue
- tagValues to set.
-
getSimulLogLevel
String getSimulLogLevel()Get simulator log level. Default to "info".- Returns:
- simulator log level
-
setSimulLogLevel
Set simulator log level.- Parameters:
logLevel
- simulator log level
-
getScriptLogLevel
String getScriptLogLevel()Get script log level. Default to "info".- Returns:
- script log level
-
setScriptLogLevel
Set script log level.- Parameters:
logLevel
- script log level
-
getLibLogLevel
String getLibLogLevel()Get librairies log level. Default to "error".- Returns:
- librairies log level
-
setLibLogLevel
Set lib log level.- Parameters:
logLevel
-
-
isSimulErrorLevel
boolean isSimulErrorLevel() -
isSimulWarnLevel
boolean isSimulWarnLevel() -
isSimulInfoLevel
boolean isSimulInfoLevel() -
isSimulDebugLevel
boolean isSimulDebugLevel() -
isScriptErrorLevel
boolean isScriptErrorLevel() -
isScriptWarnLevel
boolean isScriptWarnLevel() -
isScriptInfoLevel
boolean isScriptInfoLevel() -
isScriptDebugLevel
boolean isScriptDebugLevel() -
isLibErrorLevel
boolean isLibErrorLevel() -
isLibWarnLevel
boolean isLibWarnLevel() -
isLibInfoLevel
boolean isLibInfoLevel() -
isLibDebugLevel
boolean isLibDebugLevel() -
setProperty
Permet d'ajouter des parametres directement à partir de leur representation chaine. A ne pas utiliser normalement, sert uniquement dans les prescripts des simulation des AS.- Parameters:
key
- keyvalue
- value- Since:
- 3.4.0.0
-
setProperties
Set multiples properties.- Parameters:
props
- props- Since:
- 4.4.2.1
-
copy
SimulationParameter copy()A copy instance of SimulationParameter. Warning, this is not a deep copy, already instancied objects are not duplicated.- Returns:
- a copy of this instance
-
deepCopy
SimulationParameter deepCopy()Make a deep copy of current parameters. Bump all current parameters to properties and make a new one with those propeties.- Returns:
- new parameters instance
-
toString
String toString()The toString() method call getters. So make instances of rules/export/plans... -
toProperties
Properties toProperties()Permet de convertir l'objet SimulationParameter en un objet Properties Cela permet de le stocker facilement sur le disque. Recopie certaines proprietes si elle n'ont pas été instancié :- strategies
- rules
- simulationplans
- sensitivityexports
- sensitivityanalysis
- Returns:
- L'objet Properties representant les parametres
- See Also:
-
fromProperties
Load properties from file.- Parameters:
props
- property to read
-
reloadContextParameters
void reloadContextParameters() throws org.nuiton.topia.TopiaExceptionReload parameters du to context change. ie : in simulators when rollbacking transaction Actually : reload rules parameters- Throws:
org.nuiton.topia.TopiaException
-
reloadRegionChangeParameter
void reloadRegionChangeParameter()Reset some cached data when region is changed. -
fixReloadContext
void fixReloadContext(boolean sensitivityContext) Remove all parameters non relative to given context.
-