Optimization Algorithm
Optimization Algorithm
fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2020.2990567, IEEE Access
Date of publication xxxx 00, 0000, date of current version xxxx 00, 0000.
Digital Object Identifier 10.1109/ACCESS.2017.DOI
ABSTRACT Python has become the programming language of choice for research and industry projects
related to data science, machine learning, and deep learning. Since optimization is an inherent part of these
research fields, more optimization related frameworks have arisen in the past few years. Only a few of them
support optimization of multiple conflicting objectives at a time, but do not provide comprehensive tools
for a complete multi-objective optimization task. To address this issue, we have developed pymoo, a multi-
objective optimization framework in Python. We provide a guide to getting started with our framework
by demonstrating the implementation of an exemplary constrained multi-objective optimization scenario.
Moreover, we give a high-level overview of the architecture of pymoo to show its capabilities followed by
an explanation of each module and its corresponding sub-modules. The implementations in our framework
are customizable and algorithms can be modified/extended by supplying custom operators. Moreover, a
variety of single, multi- and many-objective test problems are provided and gradients can be retrieved by
automatic differentiation out of the box. Also, pymoo addresses practical needs, such as the parallelization
of function evaluations, methods to visualize low and high-dimensional spaces, and tools for multi-criteria
decision making. For more information about pymoo, readers are encouraged to visit: https://pymoo.org.
VOLUME 4, 2016 1
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2020.2990567, IEEE Access
of lower and higher-dimensional data are available and multi- tion or visualization, over the programming language itself.
criteria decision making methods guide the selection of a An overview of some existing multi-objective optimization
single solution from a solution set based on preferences. frameworks in Python is listed in Table 1, each of which is
Our framework is designed to be extendable through of its described in the following.
modular implementation. For instance, a genetic algorithm Recently, the well-known multi-objective optimization
is assembled in a plug-and-play manner by making use of framework jMetal [5] developed in Java [6] has been ported
specific sub-modules, such as initial sampling, mating selec- to a Python version, namely jMetalPy [7]. The authors aim
tion, crossover, mutation and survival selection. Each sub- to further extend it and to make use of the full feature set
module takes care of an aspect independently and, therefore, of Python, for instance, data analysis and data visualization.
variants of algorithms can be initiated by passing different In addition to traditional optimization algorithms, jMetalPy
combinations of sub-modules. This concept allows end-users also offers methods for dynamic optimization. Moreover, the
to incorporate domain knowledge through custom imple- post analysis of performance metrics of an experiment with
mentations. For example, in an evolutionary algorithm a several independent runs is automated.
biased initial sampling module created with the knowledge Parallel Global Multiobjective Optimizer, PyGMO [8], is
of domain experts can guide the initial search. an optimization library for the easy distribution of massive
Furthermore, we like to mention that our framework is optimization tasks over multiple CPUs. It uses the gener-
well-documented with a large number of available code- alized island-model paradigm for the coarse grained paral-
snippets. We created a starter’s guide for users to become lelization of optimization algorithms and, therefore, allows
familiar with our framework and to demonstrate its capabili- users to develop asynchronous and distributed algorithms.
ties. As an example, it shows the optimization results of a bi- Platypus [9] is a multi-objective optimization framework
objective optimization problem with two constraints. An ex- that offers implementations of state-of-the art algorithms. It
tract from the guide will be presented in this paper. Moreover, enables users to create an experiment with various algorithms
we provide an explanation of each algorithm and source code and provides post-analysis methods based on metrics and
to run it on a suitable optimization problem in our software visualization.
documentation. Additionally, we show a definition of test
A Distributed Evolutionary Algorithms in Python (DEAP)
problems and provide a plot of their fitness landscapes. The
[10] is novel evolutionary computation framework for rapid
framework documentation is built using Sphinx [3] and cor-
prototyping and testing of ideas. Even though, DEAP does
rectness of modules is ensured by automatic unit testing [4].
not focus on multi-objective optimization, however, due to
Most algorithms have been developed in collaboration with
the modularity and extendibility of the framework multi-
the second author and have been benchmarked extensively
objective algorithms can be developed. Moreover, paral-
against the original implementations.
lelization and load-balancing tasks are supported out of the
In the remainder of this paper, we first present related
box.
existing optimization frameworks in Python and in other
programming languages. Then, we provide a guide to getting Inspyred [11] is a framework for creating bio-inspired
started with pymoo in Section III which covers the most computational intelligence algorithms in Python which is
important steps of our proposed framework. In Section IV we not focused on multi-objective algorithms directly, but on
illustrate the framework architecture and the corresponding evolutionary computation in general. However, an example
modules, such as problems, algorithms and related analytics. for NSGA-II [12] is provided and other multi-objective algo-
Each of the modules is then discussed separately in Sec- rithms can be implemented through the modular implemen-
tions V to VII. Finally, concluding remarks are presented in tation of the framework.
Section VIII. If the search for frameworks is not limited to Python, other
popular frameworks should be considered: PlatEMO [13] in
II. RELATED WORKS Matlab, MOEA [14] and jMetal [5] in Java, jMetalCpp [15]
In the last decades, various optimization frameworks in and PaGMO [16] in C++. Of course this is not an exhaustive
diverse programming languages were developed. However, list and readers may search for other available options.
some of them only partially cover multi-objective optimiza-
tion. In general, the choice of a suitable framework for an III. GETTING STARTED 1
optimization task is a multi-objective problem itself. More- In the following, we provide a starter’s guide for pymoo. It
over, some criteria are rather subjective, for instance, the covers the most important steps in an optimization scenario
usability and extendibility of a framework and, therefore, the starting with the installation of the framework, defining an
assessment regarding criteria as well as the decision making optimization problem, and the optimization procedure itself.
process differ from user to user. For example, one might have
decided on a programming language first, either because of
personal preference or a project constraint, and then search 1 ALL SOURCE CODES IN THIS PAPER ARE RELATED TO PYMOO
for a suitable framework. One might give more importance to VERSION 0.4.0. A GETTING STARTED GUIDE FOR UPCOMING VER-
the overall features of a framework, for example paralleliza- SIONS CAN BE FOUND AT HTTPS://PYMOO.ORG.
2 VOLUME 4, 2016
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2020.2990567, IEEE Access
x2
Platypus GPL-3.0 3 3 7 7
DEAP LGPL-3.0 7 3 7 7 0.00
Inspyred MIT 7 3 7 7
0.25
pymoo Apache 2.0 3 3 3 3
0.50
0.5 0.0 0.5 1.0 1.5
x1
A. INSTALLATION
Our framework pymoo is available on PyPI [17] which is a FIGURE 1: Contour plot of the test problem (Equation 2).
central repository to make Python software package easily
accessible. The framework can be installed by using the
package manager: In the following, we illustrate a bi-objective optimization
problem with two constraints.
$ pip install -U pymoo
min f1 (x) = (x21 + x22 ),
Some components are available in Python and addition- max f2 (x) = −(x1 − 1)2 − x22 ,
ally in Cython [18]. Cython allows developers to annotate
existing Python code which is translated to C or C++ pro- s.t. g1 (x) = 2 (x1 − 0.1) (x1 − 0.9) ≤ 0,
(2)
gramming languages. The translated files are compiled to a g2 (x) = 20 (x1 − 0.4) (x1 − 0.6) ≥ 0,
binary executable and can be used to speed up computations.
− 2 ≤ x1 ≤ 2,
During the installation of pymoo, attempts are made for
compilation, however, if unsuccessful due to the lack of a − 2 ≤ x2 ≤ 2.
suitable compiler or other reasons, the pure Python version is It consists of two objectives (M = 2) where f1 (x) is
installed. We would like to emphasize that the compilation is minimized and f2 (x) maximized. The optimization is with
optional and all features are available without it. More detail subject to two inequality constraints (J = 2) where g1 (x)
about the compilation and troubleshooting can be found in is formulated as a less-than-equal-to and g2 (x) as a greater-
our installation guide online. than-equal-to constraint. The problem is defined with respect
to two variables (N = 2), x1 and x2 , which both are in
B. PROBLEM DEFINITION the range [−2, 2]. The problem does not contain any equality
In general, multi-objective optimization has several objective constraints (K = 0). Contour plots of the objective functions
functions with subject to inequality and equality constraints are shown in Figure 1. The contours of the objective function
to optimize[19]. The goal is to find a set of solutions (variable f1 (x) are represented by solid lines and f2 (x) by dashed
vectors) that satisfy all constraints and are as good as possible lines. Constraints g1 (x) and g2 (x) are parabolas which in-
regarding all its objectives values. The problem definition in tersect the x1 -axis at (0.1, 0.9) and (0.4, 0.6). The Pareto-
its general form is given by: optimal set is marked by a thick orange line. Through the
combination of both constraints the Pareto-set is split into
two parts. Analytically, the Pareto-optimal set is given by
min fm (x) m = 1, .., M, P S = {(x1 , x2 ) | (0.1 ≤ x1 ≤ 0.4) ∨ (0.6 √≤ x1 ≤
0.9) ∧ x2 = 0} and the efficient-front by f2 = ( f1 − 1)2
s.t. gj (x) ≤ 0, j = 1, .., J, where f1 is defined in [0.01, 0.16] and [0.36, 0.81].
(1)
hk (x) = 0, k = 1, .., K, In the following, we provide an example implementation
of the problem formulation above using pymoo. We assume
xL U
i ≤ xi ≤ xi , i = 1, .., N. the reader is familiar with Python and has a fundamental
knowledge of NumPy [20] which is utilized to deal with
The formulation above defines a multi-objective optimiza- vector and matrix computations.
tion problem with N variables, M objectives, J inequality, In pymoo, we consider pure minimization problems for
and K equality constraints. Moreover, for each variable xi , optimization in all our modules. However, without loss of
lower and upper variable boundaries (xL U
i and xi ) are also generality an objective which is supposed to be maximized,
defined. can be multiplied by −1 and be minimized [19]. Therefore,
VOLUME 4, 2016 3
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2020.2990567, IEEE Access
we minimize −f2 (x) instead of maximizing f2 (x) in our NumPy called Autograd [22]. Note that this is not obligatory
optimization problem. Furthermore, all constraint functions for a problem definition.
need to be formulated as a less-than-equal-to constraint.
For this reason, g2 (x) needs to be multiplied by −1 to flip C. ALGORITHM INITIALIZATION
the ≥ to a ≤ relation. We recommend the normalization Next, we need to initialize a method to optimize the prob-
of constraints to give equal importance to each of them. lem. In pymoo, an algorithm object needs to be created for
For g1 (x), the constant ‘resource’ value of the constraint is optimization. For each of the algorithms an API documenta-
2 · (−0.1) · (−0.9) = 0.18 and for g2 (x) it is 20 · (−0.4) · tion is available and through supplying different parameters,
(−0.6) = 4.8, respectively. We achieve normalization of algorithms can be customized in a plug-and-play manner. In
constraints by dividing g1 (x) and g2 (x) by the corresponding general, the choice of a suitable algorithm for optimization
constant [21]. problems is a challenge itself. Whenever problem character-
Finally, the optimization problem to be optimized using istics are known beforehand we recommended using those
pymoo is defined by: through customized operators. However, in our case the opti-
mization problem is rather simple, but the aspect of having
min f1 (x) = (x21 + x22 ), two objectives and two constraints should be considered.
For this reason, we decided to use NSGA-II [12] with its
min f2 (x) = (x1 − 1)2 + x22 ,
default configuration with minor modifications. We chose
s.t. g1 (x) = 2 (x1 − 0.1) (x1 − 0.9) / 0.18 ≤ 0, a population size of 40, but instead of generating the same
(3)
g2 (x) = −20 (x1 − 0.4) (x1 − 0.6) / 4.8 ≤ 0, number of offsprings, we create only 10 in each generation.
This is a steady-state variant of NSGA-II and it is likely to
− 2 ≤ x1 ≤ 2, improve the convergence property for rather simple optimiza-
− 2 ≤ x2 ≤ 2. tion problems without much difficulties, such as the existence
of local Pareto-fronts. Moreover, we enable a duplicate check
Next, the derived problem formulation is implemented in
which makes sure that the mating produces offsprings which
Python. Each optimization problem in pymoo has to inherit
are different with respect to themselves and also from the
from the Problem class. First, by calling the super()
existing population regarding their variable vectors. To illus-
function the problem properties such as the number of
trate the customization aspect, we listed the other unmodified
variables (n_var), objectives (n_obj) and constraints
default operators in the code-snippet below. The constructor
(n_constr) are initialized. Furthermore, lower (xl) and
of NSGA2 is called with the supplied parameters and returns
upper variables boundaries (xu) are supplied as a NumPy
an initialized algorithm object.
array. Additionally, the evaluation function _evaluate
needs to be overwritten from the superclass. The method from pymoo.algorithms.nsga2 import NSGA2
from pymoo.factory import get_sampling, get_crossover,
takes a two-dimensional NumPy array x with n rows and get_mutation
m columns as an input. Each row represents an individual
algorithm = NSGA2(
and each column an optimization variable. After doing the pop_size=40,
necessary calculations, the objective values are added to the n_offsprings=10,
sampling=get_sampling("real_random"),
dictionary out with the key F and the constraints with key crossover=get_crossover("real_sbx", prob=0.9, eta=15)
G. ,
mutation=get_mutation("real_pm", eta=20),
import autograd.numpy as anp eliminate_duplicates=True
from pymoo.model.problem import Problem )
class MyProblem(Problem):
4 VOLUME 4, 2016
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2020.2990567, IEEE Access
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2020.2990567, IEEE Access
Architecture
pymoo
Constraint Termination
Parallelization Decomposition
Handling Criterion
In case the category does not apply, for example because we TABLE 2: Multi-objective Optimization Test problems.
refer to a test problem family with several functions, we use
(·). Problem Variables Objectives Constraints
The implementations in pymoo let end-users define what Single-Objective
values of the corresponding problem should be returned. Ackley (s) 1 -
On an implementation level, the evaluate function of a Cantilevered Beams 4 1 2
Problem instance takes a list return_value_of which Griewank (s) 1 -
contains the type of values being returned. By default the Himmelblau 2 1 -
objective values "F" and if the problem has constraints the Knapsack (s) 1 1
constraint violation "CV" are included. The constraint func- Pressure Vessel 4 1 4
tion values can be returned independently by adding "G". Rastrigin (s) 1 -
This gives developers the flexibility to receive the values that Rosenbrock (s) 1 -
are needed for their methods. Schwefel (s) 1 -
Sphere (s) 1 -
B. GRADIENTS Zakharov (s) 1 -
All our test problems are implemented using Autograd [22]. G1-9 (·) (·) (·)
Therefore, automatic differentiation is supported out of the Multi-Objective
box. We have shown in Section III how a new optimization BNH 2 2 2
problem is defined. Carside 7 3 10
If gradients are desired to be calculated the prefix "d" Kursawe 3 2 -
needs to be added to the corresponding value of the OSY 6 2 6
return_value_of list. For instance to ask for the ob- TNK 2 2 2
jective values and its gradients return_value_of = Truss2D 3 2 1
["F", "dF"]. Welded Beam 4 2 4
Let us consider the problem we have implemented shown CTP1-8 (s) 2 (s)
in Equation 3. The derivation of the objective functions F ZDT1-3 (30) 2 -
with respect to each variable is given by: ZDT4 (10) 2 -
ZDT5 (80) 2 -
ZDT6 (10) 2 -
2x1 2x2
∇F = . (4) Many-Objective
2(x1 − 1) 2x2
DTLZ 1-7 (s) (s) -
The gradients at the point [0.1, 0.2] are calculated by: CDTLZ (s) (s) -
DTLZ1−1 (s) (s) -
F, dF = problem.evaluate(np.array([0.1, 0.2]),
return_values_of=["F", "dF"]) SDTLZ (s) (s) -
WFG (s) (s) -
returns the following output
6 VOLUME 4, 2016
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2020.2990567, IEEE Access
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2020.2990567, IEEE Access
Individuals
Individuals
exist. Contrarily, the Uniform Crossover (UX) does not
have any clear pattern, because each variable is chosen
50 50
randomly either from the first or from the second parent.
For the Half Uniform Crossover (HUX) half of the 0 100 0 100
Variables Variables
variables, which are different, are exchanged. For the
purpose of illustration, we have created two parents that (a) One Point (b) Two Point
have different values in 10 different positions. For real
0 0
Individuals
Individuals
variables, Simulated Binary Crossover [42] is known
to be an efficient crossover. It mimics the crossover of 50 50
binary encoded variables. In Figure 4e the probability
distribution when the parents x1 = 0.2 and x2 = 0.8 0 100 0 100
where xi ∈ [0, 1] with η = 0.8 are recombined is shown. Variables Variables
Analogously, in case of integer variables we subtract 0.5 (c) UX (d) HUX
from the lower and add (0.5 − ) to the upper bound
before applying the crossover and round to the nearest
integer afterwards (see Figure 4f).
(iii) Mutation: For real and integer variables Polynomial
p(x)
p(x)
Mutation [19, 43] and for binary variables Bitflip mu-
tation [44] is provided.
Different problems require different type of operators. In 0.2 0.8 10 10
practice, if a problem is supposed to be solved repeatedly x x
and routinely, it makes sense to customize the evolutionary (e) SBX (real, eta=0.8) (f) SBX (int, eta=3)
operators to improve the convergence of the algorithm. More-
over, for custom variable types, for instance trees or mixed FIGURE 4: Illustration of some crossover operators for dif-
variables [45], custom operators [46] can be implemented ferent variables types.
easily and called by algorithm class. Our software documen-
tation contains examples for custom modules, operators and
technique can be either embedded in a multi-objective al-
variable types.
gorithm and solved simultaneously or independently using a
single-objective optimizer. Some decomposition methods are
C. TERMINATION CRITERION
based on the lp-metrics with different p values. For instance,
For every algorithm it must be determined when it should a naive but frequently used decomposition approach is the
terminate a run. This can be simply based on a predefined Weighted-Sum Method (p = 1), which is known to be not
number of function evaluations, iterations, or a more ad- able to converge to the non-convex part of a Pareto-front [19].
vanced criterion, such as the change of a performance metric Moreover, instead of summing values, Tchebysheff Method
over time. For example, we have implemented a termination (p = ∞) considers only the maximum value of the differ-
criterion based on the variable and objective space differ- ence between the ideal point and a solution. Similarly, the
ence between generations. To make the termination crite- Achievement Scalarization Function (ASF) [49] and a modi-
rion more robust the last k generations are considered. The fied version Augmented Achievement Scalarization Function
largest movement from a solution to its closest neighbour is (AASF) [50] use the maximum of all differences. Further-
tracked across generation and whenever it is below a certain more, Penalty Boundary Intersection (PBI) [40] is calculated
threshold, the algorithm is considered to have converged. by a weighted sum of the norm of the projection of a point
Analogously, the movement in the objective space can also be onto the reference direction and the perpendicular distance.
used. In the objective space, however, normalization is more Also it is worth to note that normalization is essential for
challenging and has to be addressed carefully. The default any kind of decomposition. All decomposition techniques
termination criterion for multi-objective problems in pymoo mentioned above are implemented in pymoo.
keeps track of the boundary points in the objective space and
uses them, when they have settled down, for normalization. VII. ANALYTICS
More details about the proposed termination criterion can be A. PERFORMANCE INDICATORS
found in [47]. For single-objective optimization algorithms the compari-
son regarding performance is rather simple because each
D. DECOMPOSITION optimization run results in a single best solution. In multi-
Decomposition transforms multi-objective problems into objective optimization, however, each run returns a non-
many single-objective optimization problems [48]. Such a dominated set of solutions. To compare sets of solutions,
8 VOLUME 4, 2016
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2020.2990567, IEEE Access
various performance indicators have been proposed in the two points. It might be desired to normalize each objective
past [51]. In pymoo most commonly used performance in- to make sure a comparison between values is based on
dicators are described: relative and not absolute values. Pairwise Scatter Plots (see
(i) GD/IGD: Given the Pareto-front PF the deviation be- Figure 5c) visualize more than 3 objectives by showing each
tween the non-dominated set S found by the algorithm pair of axes independently. The diagonal is used to label the
and the optimum can be measured. Following this prin- corresponding objectives.
ciple, Generational Distance (GD) indicator [52] cal- Also, high-dimensional data can be illustrated by Parallel
culates the average Euclidean distance in the objective Coordinate Plots (PCP) as shown in Figure 5d. All axes are
space from each solution in S to the closest solution in plotted vertically and represent an objective. Each solution is
PF. This measures the convergence of S, but does not illustrated by a line from the left to the right. The intersection
indicate whether a good diversity on the Pareto-front has of a line and an axis indicate the value of the solution
been reached. Similarly, Inverted Generational Distance regarding the corresponding objective. For the purpose of
(IGD) indicator [52] measures the average Euclidean comparison solution(s) can be highlighted by varying color
distance in the objective space from each solution in PF and opacity.
to the closest solution in S. The Pareto-front as a whole Moreover, a common practice is to project the higher
needs to be covered by solutions from S to minimize dimensional objective values onto the 2D plane using a
the performance metric. Thus, lower the GD and IGD transformation function. Radviz (Figure 5e) visualizes all
values, the better is the set. However, IGD is known to points in a circle and the objective axes are uniformly posi-
be not Pareto compliant [53]. tioned around on the perimeter. Considering a minimization
(ii) GD+/IGD+: A variation of GD and IGD has been problem and a set of non-dominated solutions, an extreme
proposed in [53]. The Euclidean distance is replaced by point very close to an axis represents the worst solution
a distance measure that takes the dominance relation for that corresponding objective, but is comparably "good"
into account. The authors show that IGD+ is weakly in one or many other objectives. Similarly, Star Coordinate
Pareto compliant. Plots (Figure 5f) illustrate the objective space, except that the
(iii) Hypervolume: Moreover, the dominated portion of the transformation function allows solutions outside of the circle.
objective space can be used to measure the quality of Heatmaps (Figure 5g) are used to represent the goodness
non-dominated solutions [54]. The higher the hypervol- of solutions through colors. Each row represents a solution
ume, the better is the set. Instead of the Pareto-front a and each column a variable. We leave the choice to the end-
reference point needs to be provided. It has been shown user of what color map to use and whether light or dark
that Hypervolume is Pareto compliant [55]. Because colors illustrate better or worse solutions. Also, solutions can
the performance metric becomes computationally ex- be sorted lexicographically by their corresponding objective
pensive in higher dimensional spaces the exact measure values.
becomes intractable. However, we plan to include some Instead of visualizing a set of solutions, one solution can
proposed approximation methods in the near future. be illustrated at a time. The Petal Diagram (Figure 5h) is a
pie diagram where the objective value is represented by each
Performance indicators are used to compare existing algo- piece’s diameter. Colors are used to further distinguish the
rithms. Moreover, the development of new algorithms can be pieces. Finally, the Spider-Web or Radar Diagram (Figure 5i)
driven by the goodness of different metrics itself. shows the objectives values as a point on an axis. The ideal
and nadir point [19] is represented by the inner and outer
B. VISUALIZATION polygon. By definition, the solution lies in between those two
The visualization of intermediate steps or the final result is extremes. If the objective space ranges are scaled differently,
inevitable. In multi and many-objective optimization, visual- normalization for the purpose of plotting can be enabled and
ization of the objective space is of interest so that trade-off the diagram becomes symmetric. New and emerging methods
information among solutions can be easily experienced from for visualizing more than three-dimensional efficient solu-
the plots. Depending on the dimension of the objective space, tions, such as 2.5-dimensional PaletteViz plots [57], would
different types of plots are suitable to represent a single be implemented in the future.
or a set of solutions. In pymoo the implemented visualiza-
tions wrap around the well-known plotting library in Python C. DECISION MAKING
Matplotlib [56]. Keyword arguments provided by Matplotlib In practice, after obtaining a set of non-dominated solutions a
itself are still available which allows to modify for instance single solution has to be chosen for implementation. pymoo
the color, thickness, opacity of lines, points or other shapes. provides a few “a posteriori” approaches for decision making
Therefore, all visualization techniques are customizable and [19].
extendable. (i) Compromise Programming: One way of making a de-
For 2 or 3 objectives, scatter plots (see Figure 5a and cision is to compute value of a scalarized and aggregated
5b) can give a good intuition about the solution set. Trade- function and select one solution based on minimum or
offs can be observed by considering the distance between maximum value of the function. In pymoo a number of
VOLUME 4, 2016 9
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2020.2990567, IEEE Access
f2
f3
f4
1.0 0.0
0.0
f1
0.5
0.0
0.0
f1
0.5
0.0
0.0
f1
0.5
f1
f3
f4
0.0 0.0 0.0
0.5 0.0 0.5 0.0 0.5 0.0 0.5
0.4 f2 f2 f2
0.0
f2
f3
0.2
f1
f2
f4
0.1 0.0 0.0 0.0
0.5 0.0 0.0
f3
0.5 0.0
f3
0.5 0.0
f3
0.5
f1
f2
f3
0.0 0.0 0.0
0.3 0.3
f1 f2 0.4
0.5 0.5
0.4 f1
0.0
f4
0.5 0.0
f4
0.5 0.0
f4
0.5
f4 f3
f4 f3
f5 f2
f5 f2
f6 f1 f6 f1
f7 f10
f7 f10 f8 f9
f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f8 f9
(d) PCP [59] (e) Radviz [60] (f) Star Coordinate Graph [61]
f2
f2 f3
f3 f1 f1
f4 f6 f4
f1 f2 f3 f4 f5 f6 f5 f5
(g) Heatmap [62] (h) Petal Diagram [63] (i) Spider-Web/Radar [64]
scalarization functions described in Section VI-D can be pseudo-weight to a target preference vector of objectives
used to come to a decision regarding desired weights of (f1 being preferred twice as important as f2 results in a
objectives. target preference vector of (0.667, 0.333)) can be chosen
as the preferred solution from the efficient set.
(ii) Pseudo-Weights: However, a more intuitive way to
chose a solution out of a Pareto-front is the pseudo- (iii) High Trade-Off Solutions: Furthermore, high trade-off
weight vector approach proposed in [19]. The pseudo solutions are usually of interest, but not straightforward
weight wi for the i-th objective function is calculated to detect in higher-dimensional objective spaces. We
by: have implemented the procedure proposed in [65]. It
was described to be embedded in an algorithm to guide
(f max − fi (x)) / (fimax − fimin ) the search; we, however, use it for post-processing.
wi = PM i . (5)
max − f (x)) / (f max − f min ) The metric for each solution pair xi and xj in a non-
m=1 (fm m m m
dominated set is given by:
The normalized distance to the worst solution regarding
PM
each objective i is calculated. It is interesting to note that max[0, fm (xj ) − fm (xi )]
for non-convex Pareto-fronts, the pseudo weight does T (xi , xj ) = Pi=1
M
, (6)
i=1 max[0, fm (xi ) − fm (xj )]
not correspond to the result of an optimization using
the weighted-sum method. A solution having the closest where the numerator represents the aggregated sacrifice
10 VOLUME 4, 2016
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2020.2990567, IEEE Access
and the denominator the aggregated gain. The trade-off collaboration with industries. In the future, we plan to im-
measure µ(xi , S) for each solution xi with respect to a plement more optimization algorithms and test problems to
set of neighboring solutions S is obtained by: provide more choices to end-users. Also, we aim to imple-
ment some methods from the classical literature on single-
µ(xi , S) = min T (xi , xj ) (7) objective optimization which can also be used for multi-
xj ∈S
objective optimization through decomposition or embedded
It finds the minimum T (xi , xj ) from xi to all other as a local search. So far, we have provided a few basic perfor-
solutions xj ∈ S. Instead of calculating the metric mance metrics. We plan to extend this by creating a module
with respect to all others, we provide the option to that runs a list of algorithms on test problems automatically
only consider the k closest neighbors in the objective and provides a statistics of different performance indicators.
space to reduce the computational complexity. Based Furthermore, we like to mention that any kind of con-
on circumstances, the ‘min’ operator can be replaced tribution is more than welcome. We see our framework as
with ‘average’, or ‘max’, or any other suitable operator. a collaborative collection from and to the multi-objective
Thereafter, the solution having the maximum µ can be optimization community. By adding a method or algorithm
chosen as the preferred solution, meaning that this solu- to pymoo the community can benefit from a growing compre-
tion causes a maximum sacrifice in one of the objective hensive framework and it can help researchers to advertise
values for a unit gain in another objective value for it be their methods. Interested researchers are welcome to con-
the most valuable solution for implementation. tact the authors. In general, different kinds of contributions
The above methods are algorithmic, but requires an user are possible and more information can be found online.
interaction to choose a single preferred solution. However, Moreover, we would like to mention that even though we
in real practice, a more problem specific decision-making try to keep our framework as bug-free as possible, in case
method must be used, such as an interaction EMO method of exceptions during the execution or doubt of correctness,
suggested elsewhere [66]. We emphasize here the fact please contact us directly or use our issue tracker.
that multi-objective frameworks should include methods for
multi-criteria decision making and support end-user further REFERENCES
in choosing a solution out of a trade-off solution set. [1] G. Rossum, “Python reference manual,” Amsterdam,
The Netherlands, The Netherlands, Tech. Rep., 1995.
VIII. CONCLUDING REMARKS [2] M. Bücker, G. Corliss, P. Hovland, U. Naumann,
This paper has introduced pymoo, a multi-objective opti- and B. Norris, Automatic Differentiation: Applications,
mization framework in Python. We have walked through our Theory, and Implementations (Lecture Notes in Com-
framework beginning with the installation up to the opti- putational Science and Engineering). Berlin, Heidel-
mization of a constrained bi-objective optimization problem. berg: Springer-Verlag, 2006.
Moreover, we have presented the overall architecture of the [3] R. Lehmann, “Sphinx documentation,” 2019.
framework consisting of three core modules: Problems, Op- [4] A. Pajankar, Python Unit Test Automation: Practical
timization, and Analytics. Each module has been described Techniques for Python Developers and Testers, 1st ed.
in depth and illustrative examples have been provided. We Berkely, CA, USA: Apress, 2017.
have shown that our framework covers various aspects of [5] J. J. Durillo and A. J. Nebro, “jMetal: a java
multi-objective optimization including the visualization of framework for multi-objective optimization,” Advances
high-dimensional spaces and multi-criteria decision making in Engineering Software, vol. 42, pp. 760–771,
to finally select a solution out of the obtained solution set. 2011. [Online]. Available: http://www.sciencedirect.
One distinguishing feature of our framework with other com/science/article/pii/S0965997811001219
existing ones is that we have provided a few options for [6] J. Gosling, B. Joy, G. L. Steele, G. Bracha, and A. Buck-
various key aspects of a multi-objective optimization task, ley, The Java Language Specification, Java SE 8 Edi-
providing standard evolutionary operators for optimization, tion, 1st ed. Addison-Wesley Professional, 2014.
standard performance metrics for evaluating a run, standard [7] A. Benítez-Hidalgo, A. J. Nebro, J. García-
visualization techniques for showcasing obtained trade-off Nieto, I. Oregi, and J. D. Ser, “jmetalpy: A
solutions, and a few approaches for decision-making. Most python framework for multi-objective optimization
such implementations were originally suggested and devel- with metaheuristics,” Swarm and Evolutionary
oped by the second author and his collaborators for more than Computation, vol. 51, p. 100598, 2019. [Online]. Avail-
25 years. Hence, we consider that the implementations of all able: http://www.sciencedirect.com/science/article/pii/
such ideas are authentic and error-free. Thus, the results from S2210650219301397
the proposed framework should stay as benchmark results of [8] D. Izzo, “PyGMO and PyKEP: open source
implemented procedures. tools for massively parallel optimization in
However, the framework can be definitely extended to astrodynamics (the case of interplanetary trajectory
make it more comprehensive and we are constantly adding optimization),” in 5th International Conference on
new capabilities based on practicalities learned from our Astrodynamics Tools and Techniques (ICATT 2012),
VOLUME 4, 2016 11
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2020.2990567, IEEE Access
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2020.2990567, IEEE Access
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2020.2990567, IEEE Access
gence Magazine, vol. 15, no. 2, pp. 36–48, 2020. JULIAN BLANK received his B.Sc. in Busi-
[58] J. M. Chambers and B. Kleiner, “10 graphical tech- ness Information Systems from Otto von Guericke
University, Germany in 2010. He was a visiting
niques for multivariate data and for clustering,” 1982. scholar for six months at the Michigan State Uni-
[59] E. Wegman, “Hyperdimensional data analysis using versity, Michigan, USA in 2015, and, finished
parallel coordinates,” Journal of the American Statis- his M.Sc. in Computer Science at Otto von Gu-
tical Association, vol. 85, pp. 664–675, 09 1990. ericke University, Germany in 2016. He is cur-
rently a Ph.D. student in Computer Science at the
[60] P. Hoffman, G. Grinstein, and D. Pinkney, “Dimen- Michigan State University, Michigan, USA. His
sional anchors: a graphic primitive for multidimen- current research interests include multi-objective
sional multivariate information visualizations,” in Proc. optimization, evolutionary computation, surrogate-assisted optimization and
Workshop on new Paradigms in Information Visualiza- machine learning.
tion and Manipulation in conjunction with the ACM
International Conference on Information and Knowl-
edge Management (NPIVM99). New York, NY, USA:
ACM, 1999, pp. 9–16.
[61] E. Kandogan, “Star coordinates: A multi-dimensional
visualization technique with uniform treatment of di-
mensions,” in In Proceedings of the IEEE Information
Visualization Symposium, Late Breaking Hot Topics,
2000, pp. 9–12.
[62] A. Pryke, S. Mostaghim, and A. Nazemi, “Heatmap
visualization of population based multi objective al-
gorithms,” in Evolutionary Multi-Criterion Optimiza-
tion, S. Obayashi, K. Deb, C. Poloni, T. Hiroyasu, and
T. Murata, Eds. Berlin, Heidelberg: Springer Berlin
Heidelberg, 2007, pp. 361–375. KALYANMOY DEB is the Koenig Endowed Chair
[63] Y. S. Tan and N. M. Fraser, “The modified star graph Professor with the Department of Electrical and
and the petal diagram: two new visual aids for discrete Computer Engineering, Michigan State Univer-
sity, East Lansing, Michigan, USA. He received
alternative multicriteria decision making,” Journal of his Bachelor’s degree in Mechanical Engineering
Multi-Criteria Decision Analysis, vol. 7, no. 1, pp. 20– from IIT Kharagpur in India, and his Master’s and
33, 1998. Ph.D. degrees from the University of Alabama,
[64] E. Kasanen, R. Östermark, and M. Zeleny, “Gestalt Tuscaloosa, USA, in 1989 and 1991. He is largely
known for his seminal research in evolutionary
system of holistic graphics: New management support multi-criterion optimization. He has authored two
view of MCDM,” Computers & OR, vol. 18, no. 2, pp. text books on optimization and published over 535 international journal and
233–239, 1991. [Online]. Available: https://doi.org/10. conference research papers to date. His current research interests include
1016/0305-0548(91)90093-7 evolutionary optimization and its application in design, AI, and machine
learning. He is one of the top cited EC researchers with more than 140,000
[65] L. Rachmawati and D. Srinivasan, “Multiobjective evo- Google Scholar citations. Dr. Deb is a recipient of the IEEE CIS EC Pioneer
lutionary algorithm with controllable focus on the knees Award in 2018, the Lifetime Achievement Award from Clarivate Analytics
of the pareto front,” Evolutionary Computation, IEEE in 2017, the Infosys Prize in 2012, the TWAS Prize in Engineering Sciences
Transactions on, vol. 13, pp. 810 – 824, 09 2009. in 2012, the CajAstur Mamdani Prize in 2011, the Distinguished Alumni
Award from IIT Kharagpur in 2011, the Edgeworth-Pareto Award in 2008,
[66] K. Deb, A. Sinha, P. Korhonen, and J. Wallenius, the Shanti Swarup Bhatnagar Prize in Engineering Sciences in 2005, and the
“An interactive evolutionary multi-objective optimiza- Thomson Citation Laureate Award from Thompson Reuters. He is a fellow
tion method based on progressively approximated value of IEEE and ASME. More information about his work can be found from
functions,” IEEE Transactions on Evolutionary Compu- http://www.coin-lab.org.
tation, vol. 14, no. 5, pp. 723–739, 2010.
14 VOLUME 4, 2016
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/.