# -*- coding: utf-8 -*-
#
-# Copyright (C) 2008-2020 EDF R&D
+# Copyright (C) 2008-2023 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
def simulation(x):
"Fonction de simulation H pour effectuer Y=H(X)"
import numpy
- __x = numpy.matrix(numpy.ravel(numpy.matrix(x))).T
- __H = numpy.matrix("1 0 0;0 2 0;0 0 3; 1 2 3")
- return __H * __x
+ __x = numpy.ravel(x)
+ __H = numpy.array([[1,0,0],[0,2,0],[0,0,3],[1,2,3]])
+ return __H @ __x
#
def multisimulation( xserie ):
yserie = []
Algorithm = '3DVAR',
Parameters = {
"Bounds":Bounds,
- "MaximumNumberOfSteps":100,
+ "MaximumNumberOfIterations":100,
"StoreSupplementaryCalculations":[
"CostFunctionJ",
"CurrentState",
print(" L'écart absolu maximal obtenu lors du test est de %.2e."%ecart)
print(" Les résultats obtenus sont corrects.")
print("")
- #
- return xa
# ==============================================================================
def assertAlmostEqualArrays(first, second, places=7, msg=None, delta=None):