X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FdaComposant%2FdaAlgorithms%2FNonLinearLeastSquares.py;h=54c03361a700b13140350270a4ec107a2455e0f7;hb=58e3efe3bafde4a6439b8947e9e6336d77fe7aad;hp=231764c14cdf3e6cb73ec9c9f35261f7a9e0a6dd;hpb=425b8902ca1aeb461ccaacb9156177b01224f431;p=modules%2Fadao.git diff --git a/src/daComposant/daAlgorithms/NonLinearLeastSquares.py b/src/daComposant/daAlgorithms/NonLinearLeastSquares.py index 231764c..54c0336 100644 --- a/src/daComposant/daAlgorithms/NonLinearLeastSquares.py +++ b/src/daComposant/daAlgorithms/NonLinearLeastSquares.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright (C) 2008-2020 EDF R&D +# Copyright (C) 2008-2021 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 @@ -83,6 +83,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): "CostFunctionJbAtCurrentOptimum", "CostFunctionJo", "CostFunctionJoAtCurrentOptimum", + "CurrentIterationNumber", "CurrentOptimum", "CurrentState", "IndexOfOptimum", @@ -110,7 +111,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): )) 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(Parameters, Xb, Y, R, B, Q) + self._pre_run(Parameters, Xb, Y, U, HO, EM, CM, R, B, Q) # # Correction pour pallier a un bug de TNC sur le retour du Minimum if "Minimizer" in self._parameters and self._parameters["Minimizer"] == "TNC": @@ -160,6 +161,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): Jo = float( 0.5 * _Innovation.T * RI * _Innovation ) J = Jb + Jo # + self.StoredVariables["CurrentIterationNumber"].store( len(self.StoredVariables["CostFunctionJ"]) ) self.StoredVariables["CostFunctionJb"].store( Jb ) self.StoredVariables["CostFunctionJo"].store( Jo ) self.StoredVariables["CostFunctionJ" ].store( J )