# -*- coding: utf-8 -*-
#
-# Copyright (C) 2008-2017 EDF R&D
+# Copyright (C) 2008-2019 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
default = [],
typecast = tuple,
message = "Liste de calculs supplémentaires à stocker et/ou effectuer",
- listval = ["CostFunctionJ", "CostFunctionJb", "CostFunctionJo","CurrentState","InnovationAtCurrentState","SimulatedObservationAtCurrentState"]
+ listval = [
+ "CostFunctionJ",
+ "CostFunctionJb",
+ "CostFunctionJo",
+ "CurrentState",
+ "InnovationAtCurrentState",
+ "SimulatedObservationAtCurrentState",
+ ]
)
self.defineRequiredParameter(
name = "SetSeed",
typecast = numpy.random.seed,
message = "Graine fixée pour le générateur aléatoire",
)
+ self.requireInputArguments(
+ mandatory= ("Xb", "HO"),
+ )
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)
+ self._pre_run(Parameters, Xb, Y, R, B, Q)
#
Hm = HO["Direct"].appliedTo
#
Jo = numpy.max( numpy.abs(Y - _HX) )
#
J = float( Jb ) + float( Jo )
- if "CurrentState" in self._parameters["StoreSupplementaryCalculations"]:
+ if self._toStore("CurrentState"):
self.StoredVariables["CurrentState"].store( _X )
- if "InnovationAtCurrentState" in self._parameters["StoreSupplementaryCalculations"]:
+ if self._toStore("InnovationAtCurrentState"):
self.StoredVariables["InnovationAtCurrentState"].store( Y - _HX )
- if "SimulatedObservationAtCurrentState" in self._parameters["StoreSupplementaryCalculations"]:
+ if self._toStore("SimulatedObservationAtCurrentState"):
self.StoredVariables["SimulatedObservationAtCurrentState"].store( _HX )
self.StoredVariables["CostFunctionJb"].store( Jb )
self.StoredVariables["CostFunctionJo"].store( Jo )
# ==============================================================================
if __name__ == "__main__":
- print('\n AUTODIAGNOSTIC \n')
+ print('\n AUTODIAGNOSTIC\n')