Salome HOME
Code review and minor update for PSO
authorJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Fri, 28 Apr 2023 10:07:17 +0000 (12:07 +0200)
committerJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Fri, 28 Apr 2023 10:07:17 +0000 (12:07 +0200)
doc/en/index.rst
doc/fr/index.rst
src/daComposant/daAlgorithms/Atoms/ecwnpso.py
src/daComposant/daAlgorithms/Atoms/ecwopso.py
src/daComposant/daAlgorithms/Atoms/ecwspso.py
src/daComposant/daAlgorithms/ParticleSwarmOptimization.py

index cdc5666cc617ef42edf1a72a26b5e1b8feedc4fc..2eb2ffe1afbbfefa1185b64fd0a7666ee460c7ad 100644 (file)
@@ -45,7 +45,7 @@ estimation*, *optimal interpolation*, *mathematical regularization*,
 *meta-heuristics for optimization*, *model reduction*, *data smoothing*, etc.
 More details can be found in the section :ref:`section_theory`. The ADAO module
 currently offers more than one hundred different algorithmic methods and allows
-the study of about 350 distinct applied problems.
+the study of about 400 distinct applied problems.
 
 The documentation for this module is divided into several major categories,
 related to the **theoretical documentation** (indicated in the section title by
index fd23eef7ed51eeb6e3bb785f593199196b2d515f..4164da9e890cf9aafc4583d584f514b5872719c9 100644 (file)
@@ -47,7 +47,7 @@ inverses*, *inversion*, *estimation bayésienne*, *interpolation optimale*,
 de modèles*, *lissage de données*, etc. De plus amples détails peuvent être
 trouvés dans la partie proposant :ref:`section_theory`. Le module ADAO offre
 actuellement plus d'une centaine de méthodes algorithmiques différentes et
-permet l'étude d'environ 350 problèmes appliqués distincts.
+permet l'étude d'environ 400 problèmes appliqués distincts.
 
 La documentation de ce module est divisée en plusieurs grandes catégories,
 relatives à la **documentation théorique** (indiquée dans le titre de section
index 886ce545c8d51bcb51a3035e929e596aa177c1dd..fd097fa2508d26956075aaaac96152d542693346 100644 (file)
@@ -44,6 +44,7 @@ def ecwnpso(selfA, Xb, Y, HO, R, B):
         selfA._parameters["BoxBounds"],
         Xini,
         selfA._name,
+        0.5, # Similaire au SPSO-2011
         )
     #
     def CostFunction(x, QualityMeasure="AugmentedWeightedLeastSquares"):
@@ -101,7 +102,7 @@ def ecwnpso(selfA, Xb, Y, HO, R, B):
     # Initialisation de l'essaim
     # --------------------------
     LimitPlace = Bounds
-    LimitSpeed = 0.5 * BoxBounds # "1/2*([Xmin,Xmax]-Xini)"
+    LimitSpeed = BoxBounds
     #
     nbfct = 1 # Nb d'évaluations
     JXini, JbXini, JoXini = CostFunction(Xini,selfA._parameters["QualityCriterion"])
index e14f24b8e4cbbcd88d3ab899c0f9ef6894992995..cc5922353ee99b3282aa75126703fbcac5213bf4 100644 (file)
@@ -21,7 +21,7 @@
 # Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
 
 __doc__ = """
-    Standard Particle Swarm Optimization
+    Simple Particle Swarm Optimization
 """
 __author__ = "Jean-Philippe ARGAUD"
 
@@ -44,6 +44,7 @@ def ecwopso(selfA, Xb, Y, HO, R, B):
         selfA._parameters["BoxBounds"],
         Xini,
         selfA._name,
+        0.5, # Similaire au SPSO-2011
         )
     #
     def CostFunction(x, QualityMeasure="AugmentedWeightedLeastSquares"):
@@ -101,7 +102,7 @@ def ecwopso(selfA, Xb, Y, HO, R, B):
     # Initialisation de l'essaim
     # --------------------------
     LimitPlace = Bounds
-    LimitSpeed = 0.5 * BoxBounds # "1/2*([Xmin,Xmax]-Xini)"
+    LimitSpeed = BoxBounds
     #
     nbfct = 1 # Nb d'évaluations
     JXini, JbXini, JoXini = CostFunction(Xini,selfA._parameters["QualityCriterion"])
index c23a9070413dffe4faaa3be38cc0d7af13035f25..9b3dc2bd283544ee596c6efff313c8bc77ca933a 100644 (file)
@@ -21,7 +21,7 @@
 # Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
 
 __doc__ = """
-    SPSO-2011 Particle Swarm Optimization
+    Standard Particle Swarm Optimization 2011
 """
 __author__ = "Jean-Philippe ARGAUD"
 
index 6fbbe16cff2ca0ee10dc7a1fcf9800cbb7ae3379..7519e92b83305384a7c30f484edb047224d07e22 100644 (file)
@@ -64,7 +64,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm):
             )
         self.defineRequiredParameter(
             name     = "NumberOfInsects",
-            default  = 100,
+            default  = 40,
             typecast = int,
             message  = "Nombre d'insectes dans l'essaim",
             minval   = -1,