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().
Created: 10 janv. 2006 17:03:37
Version:
$Revision$ Last update: $Date$ By : $Author$
Author:
poussin, chatellier
  • Method Details

    • check

      List<String> 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

      void setIsisFishVersion(String isisFishVersion)
      Set isis fish Version.
      Parameters:
      isisFishVersion - The isisFishVersion to set.
    • getDescription

      String getDescription()
      Get description property. Default value to : "".
      Returns:
      Description property.
    • setDescription

      void setDescription(String description)
      Set simulation description.
      Parameters:
      description - the description to set.
    • getRegion

      RegionStorage getRegion()
      Load region corresponding to getRegionName().
      Returns:
      the region
    • getNumberOf

      org.nuiton.math.matrix.MatrixND getNumberOf(Population pop)
    • getExtraRules

      List<String> getExtraRules()
      Get extra rules list.
      Returns:
      Returns the extraRules.
    • addExtraRules

      void addExtraRules(String... extraRules)
      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

      void setPopulations(List<Population> populations)
      Parameters:
      populations - The populations to set.
    • getStrategies

      List<Strategy> getStrategies()
      Get instantiated strategies list. Defaut to : empty array list
      Returns:
      Returns the strategies.
    • setStrategies

      void setStrategies(List<Strategy> strategies)
      Set strategies list.
      Parameters:
      strategies - strategies list to set
    • addSimulationPlan

      void addSimulationPlan(SimulationPlan plan)
      Add new simulation plan.
      Parameters:
      plan - simulation plan to add
    • removeSimulationPlan

      boolean removeSimulationPlan(SimulationPlan plan)
      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

      void setSimulationPlans(List<SimulationPlan> plans)
      Set plans list.
      Parameters:
      plans - plans to set
    • isIndependentPlan

      boolean isIndependentPlan()
      Return true if simulation is composed of independent plan only.
      Returns:
      true if all SimulationPlan are SimulationPlanIndependent
    • clearPlans

      void clearPlans()
      Clear plan list.
    • addRule

      void addRule(Rule rule)
      Add new rule to rules list.
      Parameters:
      rule - rule to add
    • removeRule

      boolean removeRule(Rule rule)
      Remove a rule.
      Parameters:
      rule - rule to remove
      Returns:
      true if this list contained the specified element
    • getRules

      List<Rule> getRules()
      Get parameters rules list.
      Returns:
      the rules
    • setRules

      void setRules(List<Rule> rules)
      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

      List<String> getExportNames()
      Get export names list.
      Returns:
      export names list
    • setExportNames

      void setExportNames(List<String> exportNames)
      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

      void setSensitivityAnalysis(SensitivityAnalysis sensitivityAnalysis)
      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

      void setSensitivityExport(List<SensitivityExport> sensitivityExport)
      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

      void setOptimization(Optimization optimization)
      Set simulation optimization.
      Parameters:
      optimization - optimization
    • getObjective

      Objective getObjective()
      Return used objective.
      Returns:
    • setObjective

      void setObjective(Objective objective)
      Set objective.
      Parameters:
      objective - objective
    • getOptimizationExportsObservations

      Map<ExportInfo,Observation> getOptimizationExportsObservations()
      Get exports and observations map.
      Returns:
      exports and observations map
    • setOptimizationExportsObservations

      void setOptimizationExportsObservations(Map<ExportInfo,Observation> exportsObservations)
      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

      void setPreScript(String preScript)
      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

      void setGeneratedPreScript(String preScript)
      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

      void setRegionName(String regionName)
      Set region name.
      Parameters:
      regionName - region name to set
    • getSimulatorName

      String getSimulatorName()
      Set simulator name.
      Returns:
      simulator name.
    • setSimulatorName

      void setSimulatorName(String simulatorName)
      Set simulator name.
      Parameters:
      simulatorName - simulator name to set
    • getResultEnabled

      Collection<String> getResultEnabled()
      Get enabled result names list.
      Returns:
      enabled result names list
    • setResultEnabled

      void setResultEnabled(Collection<String> resultEnabled)
      Set enabled result names list.
      Parameters:
      resultEnabled - enabled result names list
    • getTagValue

      Map<String,String> getTagValue()
      Get tag values. Default to empty map
      Returns:
      Returns the tagValue.
    • setTagValue

      void setTagValue(Map<String,String> tagValue)
      Set tag values.
      Parameters:
      tagValue - tagValues to set.
    • getSimulLogLevel

      String getSimulLogLevel()
      Get simulator log level. Default to "info".
      Returns:
      simulator log level
    • setSimulLogLevel

      void setSimulLogLevel(String logLevel)
      Set simulator log level.
      Parameters:
      logLevel - simulator log level
    • getScriptLogLevel

      String getScriptLogLevel()
      Get script log level. Default to "info".
      Returns:
      script log level
    • setScriptLogLevel

      void setScriptLogLevel(String logLevel)
      Set script log level.
      Parameters:
      logLevel - script log level
    • getLibLogLevel

      String getLibLogLevel()
      Get librairies log level. Default to "error".
      Returns:
      librairies log level
    • setLibLogLevel

      void setLibLogLevel(String logLevel)
      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

      void setProperty(String key, String value)
      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 - key
      value - value
      Since:
      3.4.0.0
    • setProperties

      void setProperties(Properties props)
      Set multiples properties.
      Parameters:
      props - props
      Since:
      4.4.2.1
    • 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

      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...
      Overrides:
      toString in class Object
    • 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

      void fromProperties(Properties props)
      Load properties from file.
      Parameters:
      props - property to read
    • reloadContextParameters

      void reloadContextParameters() throws org.nuiton.topia.TopiaException
      Reload 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.