Salome HOME
Update and documentation of InputValuesTest
[modules/adao.git] / src / daComposant / daAlgorithms / ObserverTest.py
index 691afefecd609f63fe90ac7472ab7ca04ee013c7..1b2e14491c5d31b1d994859345c471c90afcc85e 100644 (file)
@@ -1,6 +1,6 @@
-#-*-coding:iso-8859-1-*-
+# -*- coding: utf-8 -*-
 #
-# Copyright (C) 2008-2016 EDF R&D
+# Copyright (C) 2008-2020 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
@@ -30,14 +30,10 @@ class ElementaryAlgorithm(BasicObjects.Algorithm):
         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)
+        self._pre_run(Parameters, Xb, Y, R, B, Q)
+        print("Results of observer check on all potential variables or commands,")
+        print("         only activated on selected ones by explicit association.")
+        print("")
         #
         __Xa = 1.+numpy.arange(3.)
         __Xb = numpy.zeros(3)
@@ -75,10 +71,10 @@ class ElementaryAlgorithm(BasicObjects.Algorithm):
         self.StoredVariables["SimulatedObservationAtOptimum"].store( __YY )
         self.StoredVariables["SimulatedObservationAtCurrentOptimum"].store( __YY )
         #
-        print
+        print("")
         self._post_run()
         return 0
 
 # ==============================================================================
 if __name__ == "__main__":
-    print '\n AUTODIAGNOSTIC \n'
+    print('\n AUTODIAGNOSTIC\n')