From: Jean-Philippe ARGAUD Date: Tue, 31 Jan 2017 20:38:12 +0000 (+0100) Subject: Improvement of internal pre run X-Git-Tag: V8_3_0rc1~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f2a4a71191bbd9d60ba1b736981b1d8711fcf3e8;p=modules%2Fadao.git Improvement of internal pre run --- diff --git a/src/daComposant/daAlgorithms/TabuSearch.py b/src/daComposant/daAlgorithms/TabuSearch.py index b16c1bd..9efa49b 100644 --- a/src/daComposant/daAlgorithms/TabuSearch.py +++ b/src/daComposant/daAlgorithms/TabuSearch.py @@ -111,17 +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() - # - # Paramètres de pilotage - # ---------------------- - self.setParameters(Parameters) - # - if self._parameters.has_key("Bounds") and (type(self._parameters["Bounds"]) is type([]) or type(self._parameters["Bounds"]) is type(())) and (len(self._parameters["Bounds"]) > 0): - Bounds = self._parameters["Bounds"] - logging.debug("%s Prise en compte des bornes effectuee"%(self._name,)) - else: - Bounds = None + self._pre_run(Parameters) # if self._parameters["NoiseDistribution"] == "Uniform": nrange = numpy.ravel(self._parameters["NoiseHalfRange"]) # Vecteur @@ -166,7 +156,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): for state in TL: if numpy.all(numpy.abs( _X - numpy.ravel(state) ) <= 1e-16*numpy.abs(_X)): _xInList = True - if _xInList: sys.exit() + # if _xInList: import sys ; sys.exit() return _xInList # # Minimisation de la fonctionnelle