Skip to content

Commit

Permalink
Remove convenience functions from all files and fix NSGA2 performance
Browse files Browse the repository at this point in the history
  • Loading branch information
blankjul committed Jul 29, 2022
1 parent 70f0596 commit ee32a73
Show file tree
Hide file tree
Showing 39 changed files with 478 additions and 284 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
**/*.gif
**/*.cpp
**/nohup.out
benchmark


**/dask-worker-space/**
Expand Down
38 changes: 19 additions & 19 deletions docs/source/algorithms/algorithms.csv
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
:ref:`Genetic Algorithm <nb_ga>`, GA, ga, single, x,A modular implementation of a genetic algorithm. It can be easily customized with different evolutionary operators and applies to a broad category of problems.
:ref:`Differential Evolution <nb_de>`, DE, de, single, x, Different variants of differential evolution which is a well-known concept for in continuous optimization especially for global optimization.
:ref:`Biased Random Key Genetic Algorithm <nb_brkga>`, BRKGA, brkga, single, x, Mostly used for combinatorial optimization where instead of custom evolutionary operators the complexity is put into an advanced variable encoding.
:ref:`Nelder Mead <nb_nelder_mead>`, NelderMead, nelder-mead, single, x, A point-by-point based algorithm which keeps track of a simplex with is either extended reflected or shrunk.
:ref:`Pattern Search <nb_pattern_search>`, PatternSearch, pattern-search, single, x, Iterative approach where the search direction is estimated by forming a specific exploration pattern around the current best solution.
:ref:`CMAES <nb_cmaes>`, CMAES, cmaes, single, , Well-known model-based algorithm sampling from a dynamically updated normal distribution in each iteration.
:ref:`Evolutionary Strategy <nb_es>`, ES, es, single, , The evolutionary strategy algorithm proposed for real-valued optimization problems.
:ref:`Stochastic Ranking Evolutionary Strategy <nb_sres>`, SRES, sres, single, x, An evolutionary strategy with constrained handling using stochastic ranking.
:ref:`Improved Stochastic Ranking Evolutionary Strategy <nb_isres>`, ISRES, isres, single, x, An improved version of SRES being able to deal dependent variables efficiently.
:ref:`NSGA-II <nb_nsga2>`, NSGA2, nsga2, multi, x, Well-known multi-objective optimization algorithm based on non-dominated sorting and crowding.
:ref:`R-NSGA-II <nb_rnsga2>`, RNSGA2, rnsga2, multi, x, An extension of NSGA-II where reference/aspiration points can be provided by the user.
:ref:`NSGA-III <nb_nsga3>`, NSGA3, nsga3, many, x, An improvement of NSGA-II developed for multi-objective optimization problems with more than two objectives.
:ref:`U-NSGA-III <nb_unsga3>`, UNSGA3, unsga3, many, x, A generalization of NSGA-III to be more efficient for single and bi-objective optimization problems.
:ref:`R-NSGA-III <nb_rnsga3>`, RNSGA3, rnsga3, many, x, Allows defining aspiration points for NSGA-III to incorporate the user's preference.
:ref:`MOEA\D <nb_moead>`, MOEAD, moead, many,, Another well-known multi-objective optimization algorithm based on decomposition.
:ref:`AGE-MOEA <nb_agemoea>`, AGEMOEA, agemoea, many,, Similar to NSGA-II but estimates the shape of the Pareto-front to compute a score replacing the crowding distance.
:ref:`C-TAEA <nb_ctaea>`, CTAEA, ctaea, many, x, An algorithm with a more sophisticated constraint-handling for many-objective optimization algoritms.
:ref:`SMS-EMOA <nb_sms>`, CTAEA, ctaea, many, x, An algorithm that uses hypervolume during the environmental survival.
:ref:`RVEA <nb_rvea>`, RVEA, ctaea, many, x, A reference direction based algorithm used an angle-penalized metric.
:ref:`Genetic Algorithm <nb_ga>`, GA, single, x,A modular implementation of a genetic algorithm. It can be easily customized with different evolutionary operators and applies to a broad category of problems.
:ref:`Differential Evolution <nb_de>`, DE, single, x, Different variants of differential evolution which is a well-known concept for in continuous optimization especially for global optimization.
:ref:`Biased Random Key Genetic Algorithm <nb_brkga>`, BRKGA, single, x, Mostly used for combinatorial optimization where instead of custom evolutionary operators the complexity is put into an advanced variable encoding.
:ref:`Nelder Mead <nb_nelder_mead>`, NelderMead, single, x, A point-by-point based algorithm which keeps track of a simplex with is either extended reflected or shrunk.
:ref:`Pattern Search <nb_pattern_search>`, PatternSearch, single, x, Iterative approach where the search direction is estimated by forming a specific exploration pattern around the current best solution.
:ref:`CMAES <nb_cmaes>`, CMAES, single, , Well-known model-based algorithm sampling from a dynamically updated normal distribution in each iteration.
:ref:`Evolutionary Strategy <nb_es>`, ES, single, , The evolutionary strategy algorithm proposed for real-valued optimization problems.
:ref:`Stochastic Ranking Evolutionary Strategy <nb_sres>`, SRES, single, x, An evolutionary strategy with constrained handling using stochastic ranking.
:ref:`Improved Stochastic Ranking Evolutionary Strategy <nb_isres>`, ISRES, single, x, An improved version of SRES being able to deal dependent variables efficiently.
:ref:`NSGA-II <nb_nsga2>`, NSGA2, multi, x, Well-known multi-objective optimization algorithm based on non-dominated sorting and crowding.
:ref:`R-NSGA-II <nb_rnsga2>`, RNSGA2, multi, x, An extension of NSGA-II where reference/aspiration points can be provided by the user.
:ref:`NSGA-III <nb_nsga3>`, NSGA3, many, x, An improvement of NSGA-II developed for multi-objective optimization problems with more than two objectives.
:ref:`U-NSGA-III <nb_unsga3>`, UNSGA3, many, x, A generalization of NSGA-III to be more efficient for single and bi-objective optimization problems.
:ref:`R-NSGA-III <nb_rnsga3>`, RNSGA3, many, x, Allows defining aspiration points for NSGA-III to incorporate the user's preference.
:ref:`MOEA\D <nb_moead>`, MOEAD, many,, Another well-known multi-objective optimization algorithm based on decomposition.
:ref:`AGE-MOEA <nb_agemoea>`, AGEMOEA, many,, Similar to NSGA-II but estimates the shape of the Pareto-front to compute a score replacing the crowding distance.
:ref:`C-TAEA <nb_ctaea>`, CTAEA, many, x, An algorithm with a more sophisticated constraint-handling for many-objective optimization algoritms.
:ref:`SMS-EMOA <nb_sms>`, CTAEA, many, x, An algorithm that uses hypervolume during the environmental survival.
:ref:`RVEA <nb_rvea>`, RVEA, many, x, A reference direction based algorithm used an angle-penalized metric.
18 changes: 14 additions & 4 deletions docs/source/algorithms/list.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
{
"cell_type": "raw",
"metadata": {
"pycharm": {
"name": "#%% raw\n"
},
"raw_mimetype": "text/restructuredtext"
},
"source": [
Expand All @@ -11,20 +14,27 @@
},
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"# List Of Algorithms"
]
},
{
"cell_type": "raw",
"metadata": {
"pycharm": {
"name": "#%% raw\n"
},
"raw_mimetype": "text/restructuredtext"
},
"source": [
".. csv-table:: Algorithms available in pymoo\n",
" :header: \"Algorithm\", \"Class\", \"Convenience\", \"Objective(s)\", \"Constraints\", \"Description\"\n",
" :widths: 60, 10, 10, 10, 10, 200\n",
" :header: \"Algorithm\", \"Class\", \"Objective(s)\", \"Constraints\", \"Description\"\n",
" :widths: 60, 10, 10, 10, 200\n",
" :file: algorithms.csv\n"
]
}
Expand Down Expand Up @@ -59,4 +69,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
2 changes: 1 addition & 1 deletion docs/source/algorithms/moo/age.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
],
"source": [
"from pymoo.algorithms.moo.age import AGEMOEA\n",
"from pymoo.factory import get_problem\n",
"from pymoo.problems import get_problem\n",
"from pymoo.operators.crossover.pntx import TwoPointCrossover\n",
"from pymoo.operators.mutation.bitflip import BitflipMutation\n",
"from pymoo.operators.sampling.rnd import BinaryRandomSampling\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/algorithms/moo/nsga2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
],
"source": [
"from pymoo.algorithms.moo.nsga2 import NSGA2\n",
"from pymoo.factory import get_problem\n",
"from pymoo.problems import get_problem\n",
"from pymoo.operators.crossover.pntx import TwoPointCrossover\n",
"from pymoo.operators.mutation.bitflip import BitflipMutation\n",
"from pymoo.operators.sampling.rnd import BinaryRandomSampling\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/algorithms/moo/rnsga2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"import numpy as np\n",
"\n",
"from pymoo.algorithms.moo.rnsga2 import RNSGA2\n",
"from pymoo.factory import get_problem\n",
"from pymoo.problems import get_problem\n",
"from pymoo.optimize import minimize\n",
"from pymoo.visualization.scatter import Scatter\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/algorithms/moo/unsga3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"\n",
"from pymoo.algorithms.moo.nsga3 import NSGA3\n",
"from pymoo.algorithms.moo.unsga3 import UNSGA3\n",
"from pymoo.factory import get_problem\n",
"from pymoo.problems import get_problem\n",
"from pymoo.optimize import minimize\n",
"\n",
"problem = get_problem(\"ackley\", n_var=30)\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/algorithms/soo/ga.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
],
"source": [
"from pymoo.algorithms.soo.nonconvex.ga import GA\n",
"from pymoo.factory import get_problem\n",
"from pymoo.problems import get_problem\n",
"from pymoo.optimize import minimize\n",
"\n",
"problem = get_problem(\"g1\")\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/algorithms/soo/isres.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
],
"source": [
"from pymoo.algorithms.soo.nonconvex.isres import ISRES\n",
"from pymoo.factory import get_problem\n",
"from pymoo.problems import get_problem\n",
"from pymoo.optimize import minimize\n",
"\n",
"problem = get_problem(\"g1\")\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/customization/binary.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
2 changes: 1 addition & 1 deletion docs/source/customization/custom.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -422,4 +422,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
4 changes: 2 additions & 2 deletions docs/source/customization/initialization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"import numpy as np\n",
"\n",
"from pymoo.algorithms.moo.nsga2 import NSGA2\n",
"from pymoo.factory import get_problem\n",
"from pymoo.problems import get_problem\n",
"from pymoo.optimize import minimize\n",
"\n",
"problem = get_problem(\"zdt2\")\n",
Expand Down Expand Up @@ -169,7 +169,7 @@
"import numpy as np\n",
"\n",
"from pymoo.algorithms.moo.nsga2 import NSGA2\n",
"from pymoo.factory import get_problem\n",
"from pymoo.problems import get_problem\n",
"from pymoo.core.evaluator import Evaluator\n",
"from pymoo.core.population import Population\n",
"from pymoo.optimize import minimize\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/interface/callback.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"import numpy as np\n",
"\n",
"from pymoo.algorithms.soo.nonconvex.ga import GA\n",
"from pymoo.factory import get_problem\n",
"from pymoo.problems import get_problem\n",
"from pymoo.core.callback import Callback\n",
"from pymoo.optimize import minimize\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/interface/result.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"outputs": [],
"source": [
"from pymoo.algorithms.soo.nonconvex.ga import GA\n",
"from pymoo.factory import get_problem\n",
"from pymoo.problems import get_problem\n",
"from pymoo.optimize import minimize\n",
"\n",
"\n",
Expand Down
Loading

0 comments on commit ee32a73

Please sign in to comment.