.. index:: single: FunctionTest
.. index:: single: GradientTest
.. index:: single: LinearityTest
+.. index:: single: ObserverTest
.. index:: single: AlgorithmParameters
.. index:: single: AmplitudeOfInitialDirection
1000. By default, the seed is left uninitialized, and so use the default
initialization from the computer.
+**"ObserverTest"**
+
+ *Required commands*
+ *"Observers"*
+
+ *Tip for this command:*
+ Because *"CheckingPoint"* and *"ObservationOperator"* are required commands
+ for ALL checking algorithms in the interface, you have to provide a value
+ for them, despite the fact that these commands are not required for
+ *"ObserverTest"*, and will not be used. The easiest way is to give "1" as a
+ STRING for both, *"ObservationOperator"* having to be of type *Matrix*.
+
Requirements for functions describing an operator
-------------------------------------------------
.. index:: single: FunctionTest
.. index:: single: GradientTest
.. index:: single: LinearityTest
+.. index:: single: ObserverTest
.. index:: single: AlgorithmParameters
.. index:: single: AmplitudeOfInitialDirection
par exemple 1000. Par défaut, la graine est laissée non initialisée, et elle
utilise ainsi l'initialisation par défaut de l'ordinateur.
+**"ObserverTest"**
+
+ *Commandes obligatoires*
+ *"Observers"*
+
+ *Astuce pour cette commande :*
+ Comme les commandes *"CheckingPoint"* et *"ObservationOperator"* sont
+ requises pour TOUS les algorithmes de vérification dans l'interface, vous
+ devez fournir une valeur, malgré le fait que ces commandes ne sont pas
+ requises pour *"ObserverTest"*, et ne seront pas utilisées. La manière la
+ plus simple est de donner "1" comme un STRING pour les deux,
+ l'*"ObservationOperator"* devant être de type *Matrix*.
+
Exigences pour les fonctions décrivant un opérateur
---------------------------------------------------
--- /dev/null
+#-*-coding:iso-8859-1-*-
+#
+# Copyright (C) 2008-2014 EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
+
+import logging
+from daCore import BasicObjects
+import numpy
+
+# ==============================================================================
+class ElementaryAlgorithm(BasicObjects.Algorithm):
+ def __init__(self):
+ BasicObjects.Algorithm.__init__(self, "OBSERVERTEST")
+
+ def run(self, Xb=None, Y=None, U=None, HO=None, EM=None, CM=None, R=None, B=None, Q=None, Parameters=None):
+ self._pre_run()
+ print "Results of observer check on all potential variables or commands,"
+ print " only activated on selected ones by explicit association."
+ print
+ #
+ # Paramètres de pilotage
+ # ----------------------
+ self.setParameters(Parameters)
+ #
+ __Xa = 1.+numpy.arange(3.)
+ __Xb = numpy.zeros(3)
+ __YY = 1.+numpy.arange(5.)
+ #
+ # Activation des observers sur toutes les variables stockables
+ # ------------------------------------------------------------
+ self.StoredVariables["Analysis"].store( __Xa )
+ self.StoredVariables["CurrentState"].store( __Xa )
+ self.StoredVariables["CostFunctionJb"].store( 1. )
+ self.StoredVariables["CostFunctionJo"].store( 2. )
+ self.StoredVariables["CostFunctionJ" ].store( 3. )
+ #
+ self.StoredVariables["APosterioriCovariance"].store( numpy.diag(__Xa) )
+ self.StoredVariables["BMA"].store( __Xb - __Xa )
+ self.StoredVariables["OMA"].store( __YY )
+ self.StoredVariables["OMB"].store( __YY )
+ self.StoredVariables["Innovation"].store( __YY )
+ self.StoredVariables["SigmaObs2"].store( 1. )
+ self.StoredVariables["SigmaBck2"].store( 1. )
+ self.StoredVariables["MahalanobisConsistency"].store( 1. )
+ self.StoredVariables["SimulationQuantiles"].store( numpy.matrix((__YY,__YY,__YY)) )
+ #
+ print
+ self._post_run()
+ return 0
+
+# ==============================================================================
+if __name__ == "__main__":
+ print '\n AUTODIAGNOSTIC \n'