From 19033474d28437bf58393a4d2df24f3e5d6eb48f Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Mon, 16 Oct 2023 13:03:31 +0200 Subject: [PATCH] Documentation review corrections --- doc/en/snippets/ModuleCompatibility.rst | 2 +- ...ef_algorithm_ParticleSwarmOptimization.rst | 28 +++++++++++++------ doc/fr/snippets/ModuleCompatibility.rst | 2 +- .../InterpolationByReducedModelTest.py | 1 - .../daAlgorithms/ParticleSwarmOptimization.py | 5 ++-- src/daComposant/daAlgorithms/TangentTest.py | 2 +- 6 files changed, 25 insertions(+), 15 deletions(-) diff --git a/doc/en/snippets/ModuleCompatibility.rst b/doc/en/snippets/ModuleCompatibility.rst index 517c3c7..c77a27f 100644 --- a/doc/en/snippets/ModuleCompatibility.rst +++ b/doc/en/snippets/ModuleCompatibility.rst @@ -14,7 +14,7 @@ versions within the range described below. :header: "Tool", "Minimal version", "Reached version" :widths: 20, 10, 10 - Python, 3.6.5, 3.11.5 + Python, 3.6.5, 3.11.6 Numpy, 1.14.3, 1.26.0 Scipy, 0.19.1, 1.11.3 MatplotLib, 2.2.2, 3.8.0 diff --git a/doc/fr/ref_algorithm_ParticleSwarmOptimization.rst b/doc/fr/ref_algorithm_ParticleSwarmOptimization.rst index 1cf5541..831b7b9 100644 --- a/doc/fr/ref_algorithm_ParticleSwarmOptimization.rst +++ b/doc/fr/ref_algorithm_ParticleSwarmOptimization.rst @@ -65,21 +65,31 @@ stables et robustes suivantes : - "OGCR" (Simple Particule Swarm Optimisation), algorithme simplifié d'essaim particulaire sans bornes sur les insectes ou les vitesses, déconseillé car peu robuste, mais parfois beaucoup plus rapide, -- "SPSO-2011" (Standard Particle Swarm Optimisation 2011, voir - [ZambranoBigiarini13]_), algorithme de référence 2011 d'essaim particulaire, - robuste, performant et défini comme une référence des algorithmes d'essaims - particulaires. Cet algorithme est parfois appelé ":math:`\omega`-PSO" ou - "Inertia PSO" car il intègre une contribution dite d'inertie, ou encore - appelé "AIS" (pour "Asynchronous Iteration Strategy") ou "APSO" (pour - "Advanced Particle Swarm Optimisation") car il intègre la mise à jour - évolutive des meilleurs éléments, conduisant à une convergence +- "SPSO-2011" ou "SPSO-2011-AIS" (Standard Particle Swarm Optimisation 2011, + voir [ZambranoBigiarini13]_), algorithme de référence 2011 d'essaim + particulaire, robuste, performant et défini comme une référence des + algorithmes d'essaims particulaires. Cet algorithme est parfois appelé + ":math:`\omega`-PSO" ou "Inertia PSO" car il intègre une contribution dite + d'inertie, ou encore appelé "AIS" (pour "Asynchronous Iteration Strategy") ou + "APSO" (pour "Advanced Particle Swarm Optimisation") car il intègre la mise à + jour évolutive des meilleurs éléments, conduisant à une convergence intrinsèquement améliorée de l'algorithme. +- "SPSO-2011-SIS" (Standard Particle Swarm Optimisation 2011 with Synchronous + Iteration Strategy), très similaire à l'algorithme de référence 2011 et avec + une mise à jour synchrone, appelée "SIS", des particules. +- "SPSO-2011-PSIS" (Standard Particle Swarm Optimisation 2011 with Parallel + Synchronous Iteration Strategy), similaire à l'algorithme "SPSO-2011-SIS" + avec mise à jour synchrone et parallélisation, appelée "PSIS", des + particules. Voici quelques suggestions pratiques pour une utilisation efficace de ces algorithmes : - La variante recommandée de cet algorithme est le "SPSO-2011" même si - l'algorithme "CanonicalPSO" reste par défaut le plus robuste. + l'algorithme "CanonicalPSO" reste par défaut le plus robuste. Dans le cas où + l'évaluation de l'état peut être réalisé en parallèle, on peut utiliser + l'algorithme "SPSO-2011-PSIS" même si sa convergence est parfois un peu moins + performante. - Le nombre de particules ou d'insectes usuellement recommandé varie entre 40 et 100 selon l'algorithme, à peu près indépendamment de la dimension de l'espace des états. En général, les meilleurs performances sont obtenues pour diff --git a/doc/fr/snippets/ModuleCompatibility.rst b/doc/fr/snippets/ModuleCompatibility.rst index ff9fd39..78b9942 100644 --- a/doc/fr/snippets/ModuleCompatibility.rst +++ b/doc/fr/snippets/ModuleCompatibility.rst @@ -15,7 +15,7 @@ l'étendue décrite ci-dessous. :header: "Outil", "Version minimale", "Version atteinte" :widths: 20, 10, 10 - Python, 3.6.5, 3.11.5 + Python, 3.6.5, 3.11.6 Numpy, 1.14.3, 1.26.0 Scipy, 0.19.1, 1.11.3 MatplotLib, 2.2.2, 3.8.0 diff --git a/src/daComposant/daAlgorithms/InterpolationByReducedModelTest.py b/src/daComposant/daAlgorithms/InterpolationByReducedModelTest.py index f764d01..b366d0f 100644 --- a/src/daComposant/daAlgorithms/InterpolationByReducedModelTest.py +++ b/src/daComposant/daAlgorithms/InterpolationByReducedModelTest.py @@ -128,7 +128,6 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): msgs += (__marge + "Warning: in order to be coherent, this test has to use the same norm\n") msgs += (__marge + "than the one used to build the reduced basis. The user chosen norm in\n") msgs += (__marge + "this test is presently \"%s\". Check the RB building one.\n"%(self._parameters["ErrorNorm"],)) - msgs += (__marge + "\n") msgs += ("\n") msgs += (__flech + "Information before launching:\n") msgs += (__marge + "-----------------------------\n") diff --git a/src/daComposant/daAlgorithms/ParticleSwarmOptimization.py b/src/daComposant/daAlgorithms/ParticleSwarmOptimization.py index 1a9c8f5..2611100 100644 --- a/src/daComposant/daAlgorithms/ParticleSwarmOptimization.py +++ b/src/daComposant/daAlgorithms/ParticleSwarmOptimization.py @@ -37,11 +37,11 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): "CanonicalPSO", "OGCR", "SPSO-2011", - ], - listadv = [ "SPSO-2011-AIS", "SPSO-2011-SIS", "SPSO-2011-PSIS", + ], + listadv = [ "PSO", ], ) @@ -197,6 +197,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): elif self._parameters["Variant"] in ["OGCR"]: ecwopso.ecwopso(self, Xb, Y, HO, R, B) # + # Default SPSO-2011 = SPSO-2011-AIS elif self._parameters["Variant"] in ["SPSO-2011", "SPSO-2011-AIS"]: ecwapso.ecwapso(self, Xb, Y, HO, R, B) # diff --git a/src/daComposant/daAlgorithms/TangentTest.py b/src/daComposant/daAlgorithms/TangentTest.py index a61c55e..e653bed 100644 --- a/src/daComposant/daAlgorithms/TangentTest.py +++ b/src/daComposant/daAlgorithms/TangentTest.py @@ -159,7 +159,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm): msgs += ("\n") msgs += (__marge + "When |R-1|/Alpha is less than or equal to a stable value when Alpha varies,\n") msgs += (__marge + "the tangent is valid, until the accuracy of the calculation is reached.\n") - msgs += (__marge + "\n") + msgs += ("\n") msgs += (__marge + "If |R-1|/Alpha is very small, the code F is likely linear or quasi-linear,\n") msgs += (__marge + "and the tangent is valid until computational accuracy is reached.\n") # -- 2.30.2