Skip to main content

A Python optimization package using Differential Evolution.

Project description

pymoode

A Python framework for Differential Evolution using pymoo (Blank & Deb, 2020).

Contents

Install / Algorithms / Survival Operators / Crowding Metrics / Usage / Citation / References / Contact / Acknowledgements

Install

First, make sure you have a Python 3 environment installed.

From PyPi:

pip install pymoode

From the current version on github:

pip install -e git+https://github.com/mooscalia/pymoode#egg=pymoode

Algorithms

  • DE: Differential Evolution for single-objective problems proposed by Storn & Price (1997). Other features later implemented are also present, such as dither, jitter, selection variants, and crossover strategies. For details see Price et al. (2005).
  • NSDE: Non-dominated Sorting Differential Evolution, a multi-objective algorithm that combines DE mutation and crossover operators to NSGA-II (Deb et al., 2002) survival.
  • GDE3: Generalized Differential Evolution 3, a multi-objective algorithm that combines DE mutation and crossover operators to NSGA-II survival with a hybrid type survival strategy. In this algorithm, individuals might be removed in a one-to-one comparison before truncating the population by the multi-objective survival operator. It was proposed by Kukkonen, S. & Lampinen, J. (2005).
  • NSDE-R: Non-dominated Sorting Differential Evolution based on Reference directions (Reddy & Dulikravich, 2019). It is an algorithm for many-objective problems that works as an extension of NSDE using NSGA-III (Deb & Jain, 2014) survival strategy.

Survival Operators

  • RankSurvival: Flexible structure to implement NSGA-II rank and crowding survival with different options for crowding metric and elimination of individuals.
  • ConstrainedRankSurvival: A survival operator based on rank and crowding with a special constraint handling approach proposed by Kukkonen, S. & Lampinen, J. (2005).

Crowding Metrics

  • Crowding Distance ('cd'): Proposed by Deb et al. (2002) in NSGA-II. Imported from pymoo.
  • Crowding Entropy ('ce'): Proposed by Wang et al. (2010) in MOSADE.
  • M-Nearest Neighbors ('mnn'): Proposed by Kukkonen & Deb (2006) in an extension of GDE3 to many-objective problems.
  • 2-Nearest Neighbors ('2nn'): Also proposed by Kukkonen & Deb (2006), it is a variant of M-Nearest Neighbors in which the number of neighbors is two.

Usage

For more examples, see the example notebooks single, multi, many objective problems, and a complete tutorial

import matplotlib.pyplot as plt
from pymoo.factory import get_problem
from pymoo.util.plotting import plot
from pymoo.optimize import minimize
from pymoode.nsde import NSDE

problem = get_problem("tnk")
gde3 = GDE3(pop_size=50, variant="DE/rand/1/bin", CR=0.5, F=(0.0, 0.9))
    
res = minimize(problem, nsde, ('n_gen', 200), save_history=True, verbose=True)
fig, ax = plt.subplots(figsize=[6, 5], dpi=100)
ax.scatter(pf[:, 0], pf[:, 1], color="navy", label="True Front")
ax.scatter(res.F[:, 0], res.F[:, 1], color="firebrick", label="GDE3")
ax.set_ylabel("$f_2$")
ax.set_xlabel("$f_1$")
ax.legend()
fig.tight_layout()
plt.show()

tnk_nsde

Citation

Please cite this library via its current ResearchGate file:

Leite, B., 2022. pymoode: Differential Evolution in Python. doi:10.13140/RG.2.2.12935.27043

References

Blank, J. & Deb, K., 2020. pymoo: Multi-Objective Optimization in Python. IEEE Access, Volume 8, pp. 89497-89509.

Deb, K. & Jain, H., 2014. An evolutionary many-objective optimization algorithm using reference-point-based nondominated sorting approach, part I: solving problems with box constraints. IEEE Transactions on Evolutionary Computation, 18(4), pp. 577–601.

Deb, K., Pratap, A., Agarwal, S. & Meyarivan, T. A. M. T., 2002. A Fast and Elitist Multiobjective Genetic Algorithm: NSGA-II. IEEE transactions on evolutionary computation, 6(2), pp. 182-197.

Kukkonen, S. & Deb, K., 2006. A fast and effective method for pruning of non-dominated solutions in many-objective problems. In: Parallel problem solving from nature-PPSN IX. Berlin: Springer, pp. 553-562.

Kukkonen, S. & Lampinen, J., 2005. GDE3: The third evolution step of generalized differential evolution. 2005 IEEE congress on evolutionary computation, Volume 1, pp. 443-450.

Reddy, S. R. & Dulikravich, G. S., 2019. Many-objective differential evolution optimization based on reference points: NSDE-R. Struct. Multidisc. Optim., Volume 60, pp. 1455-1473.

Price, K. V., Storn, R. M. & Lampinen, J. A., 2005. Differential Evolution: A Practical Approach to Global Optimization. 1st ed. Springer: Berlin.

Storn, R. & Price, K., 1997. Differential evolution–a simple and efficient heuristic for global optimization over continuous spaces. J. Glob. Optim., 11(4), pp. 341-359.

Wang, Y.-N., Wu, L.-H. & Yuan, X.-F., 2010. Multi-objective self-adaptive differential evolution with elitist archive and crowding entropy-based diversity measure. Soft Comput., 14(3), pp. 193-209.

Contact

e-mail: bruscalia12@gmail.com

Acknowledgements

To Julian Blank, who created the amazing structure of pymoo, making such a project possible.

To Esly F. da Costa Junior, who made it possible all along, trusted in me from the start, and guided me through the path of modeling and optimization.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymoode-0.1.8.tar.gz (22.7 kB view details)

Uploaded Source

Built Distributions

pymoode-0.1.8-py3.9.egg (44.2 kB view details)

Uploaded Egg

pymoode-0.1.8-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

Details for the file pymoode-0.1.8.tar.gz.

File metadata

  • Download URL: pymoode-0.1.8.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for pymoode-0.1.8.tar.gz
Algorithm Hash digest
SHA256 86b294c4c974d1ea2f4afc6adedf8acb0a69b249516c4df7c8c3ed285f35aec7
MD5 2f48924bdb577639180f1c8174ac1d3f
BLAKE2b-256 071ba99ff464cc14a0e79ccfc66fac9d76acf1f6eb98b50004021cca6631b8be

See more details on using hashes here.

File details

Details for the file pymoode-0.1.8-py3.9.egg.

File metadata

  • Download URL: pymoode-0.1.8-py3.9.egg
  • Upload date:
  • Size: 44.2 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for pymoode-0.1.8-py3.9.egg
Algorithm Hash digest
SHA256 d41d1f255358a5fe430a1d26888e801628fbc2cd2fbbd19986276719707ef468
MD5 ebf06f89d7291bca4415b4c95010dd35
BLAKE2b-256 3b5ec99150c26d5ffeb11d3b953875286ae28acfb0df058c896fc4644bc38304

See more details on using hashes here.

File details

Details for the file pymoode-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: pymoode-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 25.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for pymoode-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 24d2bc618e4fd54a401f1a883b5217f711876af1ac5228f03467964c9951a3f3
MD5 bcf45e86c25527bea9fb7b43004f60e0
BLAKE2b-256 cfb20c5bf1a5c5ed402f295498d755c4687f887e9380dbfe0557ec19870db643

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page