Skip to content

xhuang-1121/pymoo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pymoo - Multi-Objective Optimization Framework

You can find the detailed documentation here: https://pymoo.org

build status python 3.6 license apache

We are currently working on a paper about pymoo. Meanwhile, if you have used our framework for research purposes, please cite us with:

@misc{pymoo,
    title={pymoo: Multi-objective Optimization in Python},
    author={Julian Blank and Kalyanmoy Deb},
    year={2020},
    eprint={2002.04504},
    archivePrefix={arXiv},
    primaryClass={cs.NE}
}

Installation

First, make sure you have a Python 3 environment installed. We recommend miniconda3 or anaconda3.

The official release is always available at PyPi:

pip install -U pymoo

For the current developer version:

git clone https://github.com/msu-coinlab/pymoo
cd pymoo
pip install .

Since for speedup some of the modules are also available compiled you can double check if the compilation worked. When executing the command be sure not already being in the local pymoo directory because otherwise not the in site-packages installed version will be used.

python -c "from pymoo.util.function_loader import is_compiled;print('Compiled Extensions: ', is_compiled())"

Usage

We refer here to our documentation for all the details. However, for instance executing NSGA2:

from pymoo.algorithms.nsga2 import NSGA2
from pymoo.factory import get_problem
from pymoo.optimize import minimize
from pymoo.visualization.scatter import Scatter

problem = get_problem("zdt1")

algorithm = NSGA2(pop_size=100)

res = minimize(problem,
               algorithm,
               ('n_gen', 200),
               seed=1,
               verbose=False)

plot = Scatter()
plot.add(problem.pareto_front(), plot_type="line", color="black", alpha=0.7)
plot.add(res.F, color="red")
plot.show()

Contact

Feel free to contact me if you have any question:

Julian Blank (blankjul [at] egr.msu.edu)
Michigan State University
Computational Optimization and Innovation Laboratory (COIN)
East Lansing, MI 48824, USA

About

NSGA2, NSGA3, R-NSGA3, MOEAD, GA, DE,

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Logos 77.7%
  • Forth 11.5%
  • Python 9.8%
  • Other 1.0%