org.promethee.api
Class DesignShell

java.lang.Object
  extended by org.promethee.api.Shell
      extended by org.promethee.api.DesignShell

public class DesignShell
extends Shell

Open API to use Promethee (possibly iterative) algorithm. It is intended to be used with following sequence of calls from your DesignShell object:
1. init() - will return initial points to calculate
2. next(previous points results) - will return next points to calculate
2.1. [analyseTmp()] - will return a temporary anlysis of the DoE results
3. next(previous points results) - will return next points to calculate
3.1. [analyseTmp()] - will return a temporary anlysis of the DoE results
4. next(previous points results) - will return next points to calculate
4.1. [analyseTmp()] - will return a temporary anlysis of the DoE results
...
n. next(previous points results) - will return next points to calculate
n.1. [analyse()] - will return a final anlysis of the DoE results

Author:
Y. Richet

Nested Class Summary
 
Nested classes/interfaces inherited from class org.promethee.api.Shell
Shell.TrapSignalHandler
 
Field Summary
static java.lang.String[] DESIGNS
           
 
Constructor Summary
DesignShell(java.lang.String _design, java.util.Map variable_bounds)
          Create a 'design of ecperiments' (DoE) project.
 
Method Summary
 java.util.Map<java.lang.String,java.lang.String> analyseDesign()
          Final anlysis of the DoE.
 java.util.Map<java.lang.String,java.lang.String> analyseDesignTmp()
          temporary anlysis of the DoE.
 boolean cacheExperiments()
          Do we use a cache for experiments (to not recalculate already performed experiments) ?
 java.io.File defaultArchiveDirectory()
           
 java.util.Map<java.lang.String,java.lang.String[]> ExperimentsToMap(java.util.List<? extends org.promethee.ui.doeplugin.Experiment> exps)
           
 java.lang.String finishedExperimentsInformation()
          Conveniency method to nicely display all experiments already performed
 java.util.Map<java.lang.String,java.lang.String[]> finishedExperimentsMap()
           
 java.util.Map<java.lang.String,java.lang.String> getOptions()
          Get options of the DoE
 java.lang.String[] getVariables()
           
static java.lang.String HTMLTableToString(java.lang.String html_table)
          Conveniency static method to convert a html table in plain format (using tabs and '|')
static java.lang.String HTMLToString(java.lang.String html)
          Conveniency static method to convert a html text in plain format.
 java.lang.String information()
          Conveniency method to nicely display options of the DoE
 java.util.Map<java.lang.String,java.lang.String[]> initDesign()
          Initialization of the DoE workflow.
 java.util.Map<java.lang.String,java.lang.String[]> nextDesign(java.lang.String[] Y)
          Perform next design in the DoE workflow.
 java.lang.String nextExperimentsInformation()
          Conveniency method to nicely display next batch of experiments to perform
 java.util.Map<java.lang.String,java.lang.String[]> nextExperimentsMap()
           
 void redirectOutErr()
           
 void setCacheExperiments(boolean cache_experiments)
          Set the usage of a cache of experiments
 void setOption(java.lang.String option, java.lang.String val)
          Set one option of the DoE
 void setOptions(java.util.HashMap options)
          Set options of the DoE
 
Methods inherited from class org.promethee.api.Shell
ArrayMapToString, ArrayMapToString, delete, getArchiveDirectory, keys, MapToString, MapToString, setArchiveDirectory, setArchiveDirectory, setConsoleVisible, setMathConsoleVisible, setVerboseLevel, shutdown, toObject, toString, trap
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESIGNS

public static java.lang.String[] DESIGNS
Constructor Detail

DesignShell

public DesignShell(java.lang.String _design,
                   java.util.Map variable_bounds)
Create a 'design of ecperiments' (DoE) project.

Parameters:
_design - name of the design to use. See Shell.DESIGNS static list of available DoE.
variable_bounds - Map of input variables and their model expression : {x1="[0,1]",x2="[-1,1]",...}
Method Detail

defaultArchiveDirectory

public java.io.File defaultArchiveDirectory()
Specified by:
defaultArchiveDirectory in class Shell

getVariables

public java.lang.String[] getVariables()
Returns:
list of input variables used in the design

information

public java.lang.String information()
Conveniency method to nicely display options of the DoE

Returns:
nice string

nextExperimentsInformation

public java.lang.String nextExperimentsInformation()
Conveniency method to nicely display next batch of experiments to perform

Returns:
nice string

nextExperimentsMap

public java.util.Map<java.lang.String,java.lang.String[]> nextExperimentsMap()

finishedExperimentsInformation

public java.lang.String finishedExperimentsInformation()
Conveniency method to nicely display all experiments already performed

Returns:
nice string

finishedExperimentsMap

public java.util.Map<java.lang.String,java.lang.String[]> finishedExperimentsMap()

getOptions

public java.util.Map<java.lang.String,java.lang.String> getOptions()
Get options of the DoE

Returns:
HashMap of options

setOptions

public void setOptions(java.util.HashMap options)
Set options of the DoE

Parameters:
options - HashMap of options

setOption

public void setOption(java.lang.String option,
                      java.lang.String val)
Set one option of the DoE

Parameters:
option - name of option
option - value to set

initDesign

public java.util.Map<java.lang.String,java.lang.String[]> initDesign()
Initialization of the DoE workflow.

Returns:
HashMap list of first experiments to be performed

cacheExperiments

public boolean cacheExperiments()
Do we use a cache for experiments (to not recalculate already performed experiments) ?

Returns:
usage of a cache of experiments

setCacheExperiments

public void setCacheExperiments(boolean cache_experiments)
Set the usage of a cache of experiments

Parameters:
cache_experiments - usage of a cache of experiemnts

nextDesign

public java.util.Map<java.lang.String,java.lang.String[]> nextDesign(java.lang.String[] Y)
Perform next design in the DoE workflow.

Parameters:
Y - previous batch results.
Returns:
next batch of experiments to perform.

analyseDesignTmp

public java.util.Map<java.lang.String,java.lang.String> analyseDesignTmp()
temporary anlysis of the DoE.

Returns:
HashMap with all conclusion data from the DoE project. The keys of this resultshould include HTML strings, or numerical values.

analyseDesign

public java.util.Map<java.lang.String,java.lang.String> analyseDesign()
Final anlysis of the DoE.

Returns:
HashMap with all conclusion data from the DoE project. The keys of this resultshould include HTML strings, or numerical values.

ExperimentsToMap

public java.util.Map<java.lang.String,java.lang.String[]> ExperimentsToMap(java.util.List<? extends org.promethee.ui.doeplugin.Experiment> exps)

HTMLTableToString

public static java.lang.String HTMLTableToString(java.lang.String html_table)
Conveniency static method to convert a html table in plain format (using tabs and '|')

Parameters:
html_table - String of HTML formatted table
Returns:
plain formatted table

HTMLToString

public static java.lang.String HTMLToString(java.lang.String html)
Conveniency static method to convert a html text in plain format.

Parameters:
html - String of HTML formatted text
Returns:
plain text

redirectOutErr

public void redirectOutErr()
Specified by:
redirectOutErr in class Shell