Class ParamsHandler


public class ParamsHandler extends SimulatorTabHandler
Params UI handler.
  • Field Details

  • Constructor Details

    • ParamsHandler

      protected ParamsHandler(ParamsUI tabUI)
  • Method Details

    • initRegionComboModel

      protected void initRegionComboModel(StorageChangeEvent evt)
    • afterInit

      protected void afterInit()
    • setSimulationName

      public void setSimulationName(String simulationName)
    • refresh

      public void refresh()
    • regionChange

      protected void regionChange(ItemEvent event)
      Called on user region selection change.
    • regionChange

      public void regionChange(String regionName)
      Change region in simulation launcher
      Parameters:
      regionName - region name
    • loadOldSimulation

      public boolean loadOldSimulation(String simulName)
      Load old simulation. Reset some field to empty default values:
      • params
      • simulation plans
      • factors list
      Open old simulation:
      • params copy
      • factors
      Parameters:
      simulName - name of simulation to load
    • getSimulationLauncher

      public SimulatorLauncher[] getSimulationLauncher()
    • setSensitivityTabRegion

      protected void setSensitivityTabRegion()
    • initSensitivityParams

      protected void initSensitivityParams()
    • loadOldSimulation

      protected void loadOldSimulation()
    • launchSimulation

      protected void launchSimulation()
      Lance la simulation.
    • launchSimulationWithSensibility

      public void launchSimulationWithSensibility(String simulationId, SimulatorLauncher launcher)
      Launch simulation with factors variations parameters.
      Parameters:
      simulationId - id of the simulation to simulate
      launcher - launcher to use
      See Also:
    • checkAndPrepare

      protected boolean checkAndPrepare(String fullSimulationId)
    • launchSimulation

      public void launchSimulation(String simulationId, SimulatorLauncher launcher)
      Launch automatically the simulation, when is possible (no other simulation) or wait for the last automatically simulation ended.
      Parameters:
      simulationId - id of the simulation to simulate
      launcher - launcher to use
      See Also:
    • populationSelected

      public void populationSelected()
      Population selection changed. Fill matrix panel with population effective of selected population.
    • addFactorWithComponent

      public void addFactorWithComponent(JComponent source)
      Action appelée lors du clic sur les boutons a coté des composants factorisables. Contrairement à l'interface 'input', on edite ici des facteurs existants, (créé à la première demande).
      Parameters:
      source - la source de l'event
    • getFactor

      public Factor getFactor(String factorPath)
      Search factor in factor group tree by path.
      Parameters:
      factorPath - factor path to search
      Returns:
      found factor
    • getFactor

      protected Factor getFactor(FactorGroup factorGroup, String factorPath)
      Recursive search for factor in factor group by path.
      Parameters:
      factorGroup - factor group to search to
      factorPath - factor path to search
      Returns:
      found factor
    • setListSimulParamsStrategiesItems

      protected void setListSimulParamsStrategiesItems()
    • setListSimulParamsPopulationsItems

      protected void setListSimulParamsPopulationsItems()
    • strategySelected

      protected void strategySelected()
    • getSimulParamsSelectModel

      protected ComboBoxModel<String> getSimulParamsSelectModel()
    • getSimulParamsSelectModel

      protected ComboBoxModel<String> getSimulParamsSelectModel(boolean force)
    • resetFilter

      protected void resetFilter()
    • getOldSimulationItem

      public List<String> getOldSimulationItem()
      Return old simulations.
      Returns:
      old simulations
    • getFilteredOldSimulatorNames

      public List<String> getFilteredOldSimulatorNames(boolean force)
    • setOldSimulatorNames

      public void setOldSimulatorNames(List<String> sn)
    • resetOldSimulatorNames

      public void resetOldSimulatorNames()
    • getStrategies

      public List<Strategy> getStrategies()
      Get strategies list to fill Jlist in ParamUI.
      Returns:
      strategies list
    • setStrategies

      public void setStrategies(List<Strategy> strategies)
      Set parameters strategies.
      Parameters:
      strategies -
    • getPopulations

      public List<Population> getPopulations()
      Get population list to fill JList in paramUI.
      Returns:
      populations list
    • setPopulations

      public void setPopulations(List<Population> populations)
      Set parameter population.
      Parameters:
      populations - populations to set
    • getNumberOfMonths

      public int getNumberOfMonths()
    • setNumberOfMonths

      public void setNumberOfMonths(String months)
      Change number of simulation month by parsing string value. Default to 1 if value is not parsable.
      Parameters:
      months - number of months to set