Salome HOME
Adding multi-functions input capabilities (2)
[modules/adao.git] / doc / en / ref_options_AlgorithmParameters.rst
index 58ea894b9a24fc3797ad6c330714a7e347855fd9..926d2dbebdbda64c9a95e4b9b220af1ff99f0896 100644 (file)
@@ -1,5 +1,5 @@
 ..
-   Copyright (C) 2008-2015 EDF R&D
+   Copyright (C) 2008-2018 EDF R&D
 
    This file is part of SALOME ADAO module.
 
    Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
 
 .. index:: single: AlgorithmParameters
-.. _section_ref_options_AlgorithmParameters:
+.. index:: single: Parameters
+.. index:: single: Defaults
+.. _section_ref_options_Algorithm_Parameters:
 
-Description of options of an algorithm by "*AlgorithmParameters*"
+Description of options of an algorithm in "*AlgorithmParameters*"
 -----------------------------------------------------------------
 
-Each algorithm can be controlled using some specific options, given through the
-"*AlgorithmParameters*" optional command.
+Each algorithm can be controlled using some specific options or parameters. They
+are given through the "*Parameters*" optional command included in the mandatory
+command "*AlgorithmParameters*".
 
-There are 2 practical methods for the user to provide these options. The
-method is chosen by the keyword "*FROM*", included in the entry
-"*AlgorithmParameters*" in EFICAS.
+There are 3 practical methods for the user to provide these options. The method
+is determined as follows in the graphical user interface:
 
-If an option is specified by the user for an algorithm that doesn't support it,
-the option is simply left unused and don't stop the treatment. The meaning of
-the acronyms or particular names can be found in the :ref:`genindex` or the
-:ref:`section_glossary`.
+#. firstly using the "*Parameters*" keyword in the "*AlgorithmParameters*" command, which allows to choose between "*Defaults*" (use of explicit pre-filled keywords by default parameters values) and "*Dict*" (use of a dictionary to fill the necessary keywords),
+#. then secondly, only in the "*Dict*" case of "*Parameters*", by the included keyword "*FROM*" which allows to choose between a string entry and a Python script file entry.
 
-First method : using a string in EFICAS
-+++++++++++++++++++++++++++++++++++++++
+If an option or a parameter is specified by the user for an algorithm that
+does not support it, the option is simply left unused and don't stop the
+treatment. The meaning of the acronyms or particular names can be found in the
+:ref:`genindex` or the :ref:`section_glossary`.
 
-To give the values for the command "*AlgorithmParameters*" as a string, directly
-in the EFICAS graphical interface, the user selects this type in the keyword
-"*FROM*", as shown in the following figure:
+First method : using explicit pre-filled keywords
++++++++++++++++++++++++++++++++++++++++++++++++++
+
+To give the parameters values by explicit pre-filled keywords, directly in the
+graphical interface, the user selects the type "*Defaults*" in the keyword
+"*Parameters*", then the keywords in the given "*Parameters[Algo]*" list which
+appears, linked with the chosen algorithm, as shown in the following figure:
+
+  .. adao_algopar_defaults:
+  .. image:: images/adao_algopar_defaults.png
+    :align: center
+    :width: 100%
+  .. centered::
+    **Using explicit pre-filled keywords for algorithmic parameters**
+
+Each parameter is optional, and it is presented with its default value when it
+is selected by the user. One can then modify its value, or fill it in list cases
+for example.
+
+It is the recommended way to modify only some algorithmic parameters in a safe
+way. This method allows only to define authorized parameters for a given
+algorithm, and the defined values are not kept if the user changes the
+algorithm.
+
+Second method : using a string in the graphical interface
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+To give the parameters values as a string, directly in the graphical interface,
+the user selects the type "*Dict*" in the keyword "*Parameters*", then the type
+"*String*" in the keyword "*FROM*" of the "*Dict*" command which appears, as
+shown in the following figure:
 
   .. :adao_algopar_string
   .. image:: images/adao_algopar_string.png
@@ -56,16 +86,20 @@ in the EFICAS graphical interface, the user selects this type in the keyword
 In the entry, one must enclose a standard dictionary definition between simple
 quotes, as for example::
 
-    '{"StoreInternalVariables":True,"MaximumNumberOfSteps":25}'
+    '{"MaximumNumberOfSteps":25,"SetSeed":1000}'
 
-It is the recommended way to define algorithmic parameters.
+It is the recommended way to define algorithmic parameters. This method allows
+in particular to keep options or parameters for other algorithms than the
+currently used one. It is then easier to change of algorithm or to keep default
+values different of the standard defaults.
 
-Second method : using an external Python script file
-++++++++++++++++++++++++++++++++++++++++++++++++++++
+Third method : using an external Python script file
++++++++++++++++++++++++++++++++++++++++++++++++++++
 
-To give the values for the command "*AlgorithmParameters*" in an external Python
-script file, the user selects in EFICAS this type in the keyword "*FROM*", as
-shown in the following figure:
+To give the parameters values as an external Python script file, the user
+selects in the graphical interface the type "*Dict*" in the keyword
+"*Parameters*", then the type "*Script*" in the keyword "*FROM*" of the "*Dict*"
+command which appears, as shown in the following figure:
 
   .. :adao_algopar_script
   .. image:: images/adao_algopar_script.png
@@ -78,9 +112,10 @@ This external Python script file has then to define a variable with the required
 name "*AlgorithmParameters*", as in the following example::
 
     AlgorithmParameters = {
-        "StoreInternalVariables" : True,
         "MaximumNumberOfSteps" : 25,
         "StoreSupplementaryCalculations" : ["APosterioriCovariance","OMA"],
         }
 
-The file can also contain other Python commands.
+The file can also contain other Python commands. This method also allows, as the
+previous one, to keep options or parameters for other algorithms than the
+currently used one.