2 Copyright (C) 2008-2018 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: ParticleSwarmOptimization
25 .. _section_ref_algorithm_ParticleSwarmOptimization:
27 Calculation algorithm "*ParticleSwarmOptimization*"
28 ---------------------------------------------------
33 This algorithm realizes an estimation of the state of a dynamic system by
34 minimization of a cost function :math:`J` by using a particle swarm. It is a
35 method that does not use the derivatives of the cost function. It fall in the
36 same category than the :ref:`section_ref_algorithm_DerivativeFreeOptimization`.
38 This is an optimization method allowing for global minimum search of a general
39 error function :math:`J` of type :math:`L^1`, :math:`L^2` or :math:`L^{\infty}`,
40 with or without weights. The default error function is the augmented weighted
41 least squares function, classically used in data assimilation.
43 Optional and required commands
44 ++++++++++++++++++++++++++++++
46 The general required commands, available in the editing user interface, are the
49 .. include:: snippets/Background.rst
51 .. include:: snippets/BackgroundError.rst
53 .. include:: snippets/Observation.rst
55 .. include:: snippets/ObservationError.rst
57 .. include:: snippets/ObservationOperator.rst
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
66 The options of the algorithm are the following:
67 .. index:: single: NumberOfInsects
68 .. index:: single: SwarmVelocity
69 .. index:: single: GroupRecallRate
70 .. index:: single: QualityCriterion
71 .. index:: single: BoxBounds
73 .. include:: snippets/MaximumNumberOfSteps_50.rst
75 .. include:: snippets/MaximumNumberOfFunctionEvaluations.rst
77 .. include:: snippets/QualityCriterion.rst
80 This key indicates the number of insects or particles in the swarm. The
81 default is 100, which is a usual default for this algorithm.
84 ``{"NumberOfInsects":100}``
87 This key indicates the part of the insect velocity which is imposed by the
88 swarm. It is a positive floating point value. The default value is 1.
91 ``{"SwarmVelocity":1.}``
94 This key indicates the recall rate at the best swarm insect. It is a
95 floating point value between 0 and 1. The default value is 0.5.
98 ``{"GroupRecallRate":0.5}``
101 This key allows to define upper and lower bounds for *increments* on every
102 state variable being optimized (and not on state variables themselves).
103 Bounds have to be given by a list of list of pairs of lower/upper bounds for
104 each increment on variable, with extreme values every time there is no bound
105 (``None`` is not allowed when there is no bound). This key is required and
106 there is no default values.
109 ``{"BoxBounds":[[-0.5,0.5], [0.01,2.], [0.,1.e99], [-1.e99,1.e99]]}``
111 .. include:: snippets/SetSeed.rst
113 StoreSupplementaryCalculations
114 .. index:: single: StoreSupplementaryCalculations
116 This list indicates the names of the supplementary variables that can be
117 available at the end of the algorithm. It involves potentially costly
118 calculations or memory consumptions. The default is a void list, none of
119 these variables being calculated and stored by default. The possible names
120 are in the following list: ["BMA", "CostFunctionJ", "CostFunctionJb",
121 "CostFunctionJo", "CurrentState", "OMA", "OMB", "Innovation",
122 "SimulatedObservationAtBackground", "SimulatedObservationAtCurrentState",
123 "SimulatedObservationAtOptimum"].
126 ``{"StoreSupplementaryCalculations":["BMA", "Innovation"]}``
128 Information and variables available at the end of the algorithm
129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
131 At the output, after executing the algorithm, there are variables and
132 information originating from the calculation. The description of
133 :ref:`section_ref_output_variables` show the way to obtain them by the method
134 named ``get`` of the variable "*ADD*" of the post-processing. The input
135 variables, available to the user at the output in order to facilitate the
136 writing of post-processing procedures, are described in the
137 :ref:`subsection_r_o_v_Inventaire`.
139 The unconditional outputs of the algorithm are the following:
141 .. include:: snippets/Analysis.rst
143 .. include:: snippets/CostFunctionJ.rst
145 .. include:: snippets/CostFunctionJb.rst
147 .. include:: snippets/CostFunctionJo.rst
149 The conditional outputs of the algorithm are the following:
151 .. include:: snippets/BMA.rst
153 .. include:: snippets/CurrentState.rst
155 .. include:: snippets/Innovation.rst
157 .. include:: snippets/OMA.rst
159 .. include:: snippets/OMB.rst
161 .. include:: snippets/SimulatedObservationAtBackground.rst
163 .. include:: snippets/SimulatedObservationAtCurrentState.rst
165 .. include:: snippets/SimulatedObservationAtOptimum.rst
170 References to other sections:
171 - :ref:`section_ref_algorithm_DerivativeFreeOptimization`
173 Bibliographical references: