2 Copyright (C) 2008-2024 EDF R&D
4 This file is part of SALOME ADAO module.
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.
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.
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
20 See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
24 .. index:: single: NonLinearLeastSquares
25 .. _section_ref_algorithm_NonLinearLeastSquares:
27 Calculation algorithm "*NonLinearLeastSquares*"
28 -----------------------------------------------
30 .. ------------------------------------ ..
31 .. include:: snippets/Header2Algo01.rst
33 This algorithm realizes a state estimation by variational minimization of the
34 classical :math:`J` function of weighted "Least Squares":
36 .. math:: J(\mathbf{x})=(\mathbf{y}^o-\mathbf{H}.\mathbf{x})^T.\mathbf{R}^{-1}.(\mathbf{y}^o-\mathbf{H}.\mathbf{x})
38 It is similar to a :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.
42 This mono-objective optimization algorithm is naturally written for a single
43 estimate, without any dynamic or iterative notion (there is no need in this
44 case for an incremental evolution operator, nor for an evolution error
45 covariance). In ADAO, it can also be used on a succession of observations,
46 placing the estimate in a recursive framework partly similar to a Kalman
47 Filter. A standard estimate is made at each observation step on the state
48 predicted by the incremental evolution model.
50 In all cases, it is recommended to prefer a :ref:`section_ref_algorithm_3DVAR`
51 for its stability as for its behavior during optimization.
53 .. ------------------------------------ ..
54 .. include:: snippets/Header2Algo12.rst
56 .. include:: snippets/FeaturePropLocalOptimization.rst
58 .. include:: snippets/FeaturePropDerivativeNeeded.rst
60 .. include:: snippets/FeaturePropParallelDerivativesOnly.rst
62 .. include:: snippets/FeaturePropConvergenceOnBoth.rst
64 .. ------------------------------------ ..
65 .. include:: snippets/Header2Algo02.rst
67 .. include:: snippets/Background.rst
69 .. include:: snippets/Observation.rst
71 .. include:: snippets/ObservationError.rst
73 .. include:: snippets/ObservationOperator.rst
75 .. ------------------------------------ ..
76 .. include:: snippets/Header2Algo03AdOp.rst
78 .. include:: snippets/BoundsWithNone.rst
80 .. include:: snippets/CostDecrementTolerance.rst
82 .. include:: snippets/EstimationOf_Parameters.rst
84 .. include:: snippets/GradientNormTolerance.rst
86 .. include:: snippets/InitializationPoint.rst
88 .. include:: snippets/MaximumNumberOfIterations.rst
90 .. include:: snippets/Minimizer_xDVAR.rst
92 .. include:: snippets/ProjectedGradientTolerance.rst
95 StoreSupplementaryCalculations
96 .. index:: single: StoreSupplementaryCalculations
98 *List of names*. This list indicates the names of the supplementary
99 variables, that can be available during or at the end of the algorithm, if
100 they are initially required by the user. Their availability involves,
101 potentially, costly calculations or memory consumptions. The default is then
102 a void list, none of these variables being calculated and stored by default
103 (excepted the unconditional variables). The possible names are in the
104 following list (the detailed description of each named variable is given in
105 the following part of this specific algorithmic documentation, in the
106 sub-section "*Information and variables available at the end of the
111 "CostFunctionJAtCurrentOptimum",
113 "CostFunctionJbAtCurrentOptimum",
115 "CostFunctionJoAtCurrentOptimum",
116 "CurrentIterationNumber",
123 "InnovationAtCurrentAnalysis",
124 "InnovationAtCurrentState",
127 "SimulatedObservationAtBackground",
128 "SimulatedObservationAtCurrentOptimum",
129 "SimulatedObservationAtCurrentState",
130 "SimulatedObservationAtOptimum",
134 ``{"StoreSupplementaryCalculations":["CurrentState", "Residu"]}``
136 *Tips for this algorithm:*
138 As the *"BackgroundError"* command is required for ALL the calculation
139 algorithms in the graphical interface ADAO EFICAS, you have to provide a
140 value, even if this command is not required for this algorithm, and will
141 not be used. The simplest way is to give "1" as a STRING.
143 .. ------------------------------------ ..
144 .. include:: snippets/Header2Algo04.rst
146 .. include:: snippets/Analysis.rst
148 .. include:: snippets/CostFunctionJ.rst
150 .. include:: snippets/CostFunctionJb.rst
152 .. include:: snippets/CostFunctionJo.rst
154 .. ------------------------------------ ..
155 .. include:: snippets/Header2Algo05.rst
157 .. include:: snippets/Analysis.rst
159 .. include:: snippets/BMA.rst
161 .. include:: snippets/CostFunctionJ.rst
163 .. include:: snippets/CostFunctionJAtCurrentOptimum.rst
165 .. include:: snippets/CostFunctionJb.rst
167 .. include:: snippets/CostFunctionJbAtCurrentOptimum.rst
169 .. include:: snippets/CostFunctionJo.rst
171 .. include:: snippets/CostFunctionJoAtCurrentOptimum.rst
173 .. include:: snippets/CurrentIterationNumber.rst
175 .. include:: snippets/CurrentOptimum.rst
177 .. include:: snippets/CurrentState.rst
179 .. include:: snippets/CurrentStepNumber.rst
181 .. include:: snippets/ForecastState.rst
183 .. include:: snippets/IndexOfOptimum.rst
185 .. include:: snippets/Innovation.rst
187 .. include:: snippets/InnovationAtCurrentAnalysis.rst
189 .. include:: snippets/InnovationAtCurrentState.rst
191 .. include:: snippets/OMA.rst
193 .. include:: snippets/OMB.rst
195 .. include:: snippets/SimulatedObservationAtBackground.rst
197 .. include:: snippets/SimulatedObservationAtCurrentOptimum.rst
199 .. include:: snippets/SimulatedObservationAtCurrentState.rst
201 .. include:: snippets/SimulatedObservationAtOptimum.rst
203 .. ------------------------------------ ..
204 .. _section_ref_algorithm_NonLinearLeastSquares_examples:
206 .. include:: snippets/Header2Algo09.rst
208 .. include:: scripts/simple_NonLinearLeastSquares.rst
210 .. literalinclude:: scripts/simple_NonLinearLeastSquares.py
212 .. include:: snippets/Header2Algo10.rst
214 .. literalinclude:: scripts/simple_NonLinearLeastSquares.res
216 .. include:: snippets/Header2Algo11.rst
218 .. _simple_NonLinearLeastSquares:
219 .. image:: scripts/simple_NonLinearLeastSquares.png
223 .. ------------------------------------ ..
224 .. include:: snippets/Header2Algo06.rst
226 - :ref:`section_ref_algorithm_LinearLeastSquares`
227 - :ref:`section_ref_algorithm_3DVAR`
228 - :ref:`section_ref_algorithm_LinearityTest`
230 .. ------------------------------------ ..
231 .. include:: snippets/Header2Algo07.rst