Class AbstractSensitivityAnalysis

java.lang.Object
fr.ifremer.isisfish.simulator.sensitivity.AbstractSensitivityAnalysis
All Implemented Interfaces:
SensitivityAnalysis

public abstract class AbstractSensitivityAnalysis extends Object implements SensitivityAnalysis
  • Constructor Details

    • AbstractSensitivityAnalysis

      public AbstractSensitivityAnalysis()
  • Method Details

    • setIsisFactorsR

      public void setIsisFactorsR(DesignPlan plan, File outputdirectory) throws SensitivityException
      Method to create the isis.factors dataframe in R.
      Parameters:
      plan - Design plan of the sensitivity analysis
      outputdirectory - the directory on which we will calculate the destination RData file. The RData file will be named directory.RData and saved in the directory parent.
      Throws:
      SensitivityException - if an error occur while talking to R
    • openEngine

      protected org.nuiton.j2r.REngine openEngine(File outputDirectory) throws org.nuiton.j2r.RException
      Open R engine and load RData file.
      Parameters:
      outputDirectory - save directory
      Returns:
      rengine
      Throws:
      org.nuiton.j2r.RException
    • closeEngine

      protected void closeEngine(org.nuiton.j2r.REngine engine, File outputDirectory) throws org.nuiton.j2r.RException
      Save RData file and close Rengine.
      Parameters:
      engine - r engine
      outputDirectory - save directory
      Throws:
      org.nuiton.j2r.RException
    • editRInstruction

      protected String editRInstruction(String rCall)
      Affiche une boite de dialogue modale permettant de modifier l'expression R.
      Parameters:
      rCall - r instruction to edit
      Returns:
      user edited r instruction
    • checkAllFactorContinuous

      protected void checkAllFactorContinuous(List<Factor> factors) throws SensitivityException
      Test que tous les facteurs sont continues. Leve une exception si un facteur discret est présent.
      Parameters:
      factors - factor list to check
      Throws:
      SensitivityException
    • checkAllUniformDistribution

      protected void checkAllUniformDistribution(List<Factor> factors) throws SensitivityException
      Test que tous les facteurs sont continues. Leve une exception si un facteur discret est présent.
      Parameters:
      factors - factor list to check
      Throws:
      SensitivityException
    • createImportInstruction

      protected String createImportInstruction(SensitivityExport export, List<SimulationStorage> simulationStorages)
      Cree l'instruction R qui permet de relire le contenu d'un fichier genere par un Export Isis.
      Parameters:
      export - export to get filename to read
      simulationStorages - simulation list to read export
      Returns:
      r instruction
    • getMinBound

      protected double getMinBound(Factor factor)
      Get factor domain min bound depending on distribution.
    • getMaxBound

      protected double getMaxBound(Factor factor)
      Get factor domain max bound depending on distribution.
    • getBound

      protected double getBound(Factor factor, boolean min)
      Get factor domain bound depending on distribution.
      Parameters:
      min - min or max
    • getIsisFactorDistribution

      protected String getIsisFactorDistribution(List<Factor> factors)