Salome HOME
Adding multi-functions input capabilities (2)
[modules/adao.git] / doc / en / ref_algorithm_NonLinearLeastSquares.rst
1 ..
2    Copyright (C) 2008-2018 EDF R&D
3
4    This file is part of SALOME ADAO module.
5
6    This library is free software; you can redistribute it and/or
7    modify it under the terms of the GNU Lesser General Public
8    License as published by the Free Software Foundation; either
9    version 2.1 of the License, or (at your option) any later version.
10
11    This library is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
15
16    You should have received a copy of the GNU Lesser General Public
17    License along with this library; if not, write to the Free Software
18    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19
20    See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21
22    Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
23
24 .. index:: single: NonLinearLeastSquares
25 .. _section_ref_algorithm_NonLinearLeastSquares:
26
27 Calculation algorithm "*NonLinearLeastSquares*"
28 -----------------------------------------------
29
30 Description
31 +++++++++++
32
33 This algorithm realizes a state estimation by variational minimization of the
34 classical :math:`J` function of weighted "Least Squares":
35
36 .. math:: J(\mathbf{x})=(\mathbf{y}^o-\mathbf{H}.\mathbf{x})^T.\mathbf{R}^{-1}.(\mathbf{y}^o-\mathbf{H}.\mathbf{x})
37
38 It is similar to the :ref:`section_ref_algorithm_3DVAR`, without its background
39 part. The background, required in the interface, is only used as an initial
40 point for the variational minimization.
41
42 In all cases, it is recommended to prefer the :ref:`section_ref_algorithm_3DVAR`
43 for its stability as for its behavior during optimization.
44
45 Optional and required commands
46 ++++++++++++++++++++++++++++++
47
48 The general required commands, available in the editing user interface, are the
49 following:
50
51   .. include:: snippets/Background.rst
52
53   .. include:: snippets/Observation.rst
54
55   .. include:: snippets/ObservationError.rst
56
57   .. include:: snippets/ObservationOperator.rst
58
59 The general optional commands, available in the editing user interface, are
60 indicated in :ref:`section_ref_assimilation_keywords`. Moreover, the parameters
61 of the command "*AlgorithmParameters*" allows to choose the specific options,
62 described hereafter, of the algorithm. See
63 :ref:`section_ref_options_Algorithm_Parameters` for the good use of this
64 command.
65
66 The options of the algorithm are the following:
67
68   Minimizer
69     .. index:: single: Minimizer
70
71     This key allows to choose the optimization minimizer. The default choice is
72     "LBFGSB", and the possible ones are "LBFGSB" (nonlinear constrained
73     minimizer, see [Byrd95]_, [Morales11]_ and [Zhu97]_), "TNC" (nonlinear
74     constrained minimizer), "CG" (nonlinear unconstrained minimizer), "BFGS"
75     (nonlinear unconstrained minimizer), "NCG" (Newton CG minimizer). It is
76     strongly recommended to stay with the default.
77
78     Example :
79     ``{"Minimizer":"LBFGSB"}``
80
81   .. include:: snippets/BoundsWithNone.rst
82
83   .. include:: snippets/MaximumNumberOfSteps.rst
84
85   .. include:: snippets/CostDecrementTolerance.rst
86
87   .. include:: snippets/ProjectedGradientTolerance.rst
88
89   .. include:: snippets/GradientNormTolerance.rst
90
91   StoreSupplementaryCalculations
92     .. index:: single: StoreSupplementaryCalculations
93
94     This list indicates the names of the supplementary variables that can be
95     available at the end of the algorithm. It involves potentially costly
96     calculations or memory consumptions. The default is a void list, none of
97     these variables being calculated and stored by default. The possible names
98     are in the following list: ["BMA", "CostFunctionJ",
99     "CostFunctionJb", "CostFunctionJo", "CostFunctionJAtCurrentOptimum",
100     "CostFunctionJbAtCurrentOptimum", "CostFunctionJoAtCurrentOptimum",
101     "CurrentState", "CurrentOptimum", "IndexOfOptimum", "Innovation",
102     "InnovationAtCurrentState", "OMA", "OMB",
103     "SimulatedObservationAtBackground", "SimulatedObservationAtCurrentState",
104     "SimulatedObservationAtOptimum", "SimulatedObservationAtCurrentOptimum"].
105
106     Example :
107     ``{"StoreSupplementaryCalculations":["BMA", "Innovation"]}``
108
109 *Tips for this algorithm:*
110
111     As the *"BackgroundError"* command is required for ALL the calculation
112     algorithms in the interface, you have to provide a value, even if this
113     command is not required for this algorithm, and will not be used. The
114     simplest way is to give "1" as a STRING.
115
116 Information and variables available at the end of the algorithm
117 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
118
119 At the output, after executing the algorithm, there are variables and
120 information originating from the calculation. The description of
121 :ref:`section_ref_output_variables` show the way to obtain them by the method
122 named ``get`` of the variable "*ADD*" of the post-processing. The input
123 variables, available to the user at the output in order to facilitate the
124 writing of post-processing procedures, are described in the
125 :ref:`subsection_r_o_v_Inventaire`.
126
127 The unconditional outputs of the algorithm are the following:
128
129   .. include:: snippets/Analysis.rst
130
131   .. include:: snippets/CostFunctionJ.rst
132
133   .. include:: snippets/CostFunctionJb.rst
134
135   .. include:: snippets/CostFunctionJo.rst
136
137 The conditional outputs of the algorithm are the following:
138
139   .. include:: snippets/BMA.rst
140
141   .. include:: snippets/CostFunctionJAtCurrentOptimum.rst
142
143   .. include:: snippets/CostFunctionJbAtCurrentOptimum.rst
144
145   .. include:: snippets/CostFunctionJoAtCurrentOptimum.rst
146
147   .. include:: snippets/CurrentOptimum.rst
148
149   .. include:: snippets/CurrentState.rst
150
151   .. include:: snippets/IndexOfOptimum.rst
152
153   .. include:: snippets/Innovation.rst
154
155   .. include:: snippets/InnovationAtCurrentState.rst
156
157   .. include:: snippets/OMA.rst
158
159   .. include:: snippets/OMB.rst
160
161   .. include:: snippets/SimulatedObservationAtBackground.rst
162
163   .. include:: snippets/SimulatedObservationAtCurrentOptimum.rst
164
165   .. include:: snippets/SimulatedObservationAtCurrentState.rst
166
167   .. include:: snippets/SimulatedObservationAtOptimum.rst
168
169 See also
170 ++++++++
171
172 References to other sections:
173   - :ref:`section_ref_algorithm_3DVAR`
174
175 Bibliographical references:
176   - [Byrd95]_
177   - [Morales11]_
178   - [Zhu97]_