Journal Pre-Proof: Swarm and Evolutionary Computation BASE DATA
Journal Pre-Proof: Swarm and Evolutionary Computation BASE DATA
Journal Pre-Proof: Swarm and Evolutionary Computation BASE DATA
PII: S2210-6502(19)30139-7
DOI: https://doi.org/10.1016/j.swevo.2019.100598
Reference: SWEVO 100598
Please cite this article as: A. Benítez-Hidalgo, A.J. Nebro, José. García-Nieto, I. Oregi, J. Del Ser,
jMetalPy: A Python framework for multi-objective optimization with metaheuristics, Swarm and
Evolutionary Computation BASE DATA (2019), doi: https://doi.org/10.1016/j.swevo.2019.100598.
This is a PDF file of an article that has undergone enhancements after acceptance, such as the addition
of a cover page and metadata, and formatting for readability, but it is not yet the definitive version of
record. This version will undergo additional copyediting, typesetting and review before it is published
in its final form, but we are providing this version to give early visibility of the article. Please note that,
during the production process, errors may be discovered which could affect the content, and all legal
disclaimers that apply to the journal pertain.
Antonio Benı́tez-Hidalgoa , Antonio J. Nebroa , José Garcı́a-Nietoa , Izaskun Oregib , Javier Del Serb,c,d
a Departamento de Lenguajes y Ciencias de la Computación, Ada Byron Research Building, University of Málaga, 29071 Málaga, Spain
b TECNALIA, 48160 Derio, Spain
c University of the Basque Country (UPV/EHU), 48013 Bilbao, Spain
d Basque Center for Applied Mathematics (BCAM), 48009 Bilbao, Spain
Abstract
This paper describes jMetalPy, an object-oriented Python-based framework for multi-objective optimization with metaheuristic
techniques. Building upon our experiences with the well-known jMetal framework, we have developed a new multi-objective
optimization software platform aiming not only at replicating the former one in a different programming language, but also at taking
advantage of the full feature set of Python, including its facilities for fast prototyping and the large amount of available libraries for
data processing, data analysis, data visualization, and high-performance computing. As a result, jMetalPy provides an environment
for solving multi-objective optimization problems focused not only on traditional metaheuristics, but also on techniques supporting
preference articulation, constrained and dynamic problems, along with a rich set of features related to the automatic generation of
statistical data from the results generated, as well as the real-time and interactive visualization of the Pareto front approximations
produced by the algorithms. jMetalPy offers additionally support for parallel computing in multicore and cluster systems. We
include some use cases to explore the main features of jMetalPy and to illustrate how to work with it.
Keywords: Multi-Objective Optimization, Metaheuristics, Software Framework, Python, Statistical Analysis, Visualization
2
Table 1: Most popular optimization frameworks written in Python.
Name Status Python License Parallel Dynamic Constrained Decision Post-processing Algorithms
version processing optimization optimization making facilities
GA, GP, CMA-ES, NSGA-II,
DEAP 1.2.2 [35] Active ≥2.7 LGPL-3.0 X X Statistics
SPEA2, MO-CMA-ES
Geatpy 1.1.5 [36] Active ≥3.5 MIT GA, MOEA
GA, ES, PSO, ACO, SA, PAES,
Inspyred 1.0.1 [37] Inactive ≥2.6 MIT X NSGA-II
Visualization, GA, DE, PSO, SA, ABC, IHS, MC,
PyGMO 2.10 [38] Active 3.x GPL-3.0 X X CMA-ES, NSGA-II, MOEA/D
statistics
Visualization, CMA-ES, NSGA-II, NSGA-III,
Platypus 1.0.3 [39] Active 3.6 GPL-3.0 X X GDE3, IBEA, MOEA/D,
statistics OMOPSO, EpsMOEA, SPEA2
GA, DE, NSGA-II, NSGA-III,
Visualization,
Pymoo 0.2.4 [40] Active 3.6 Apache 2.0 X U-NSGA-III,
statistics
reference point (R-NSGA-III)
GA, EA, SPEA2, NSGA-II, NSGA-III,
SMPSO, GDE3, OMOPSO,
HypE, IBEA, MOCell
Visualization, MOEA/D-DE, MOEA/D-DRA,
jMetalPy 1.5.0 Active ≥3.6 MIT X X X X
statistics constrained (MOEA/D-IEpsilon)
reference point (G-NSGA-II,
SMPSO/RP, G-GDE3),
dynamic (NSGA-II, SMPSO, GDE3)
the last six months) and work out-of-the-box with a simple pip 3. Architecture of jMetalPy
command. All of these frameworks support Python 3.x.
DEAP and Inspyred are not centered in multi-objective opti- The architecture of jMetalPy has an object-oriented design
mization, and they include a shorter number of implemented al- to make it flexible and extensible (see Figure 1). The core
gorithms. Pagmo/PyGMO, Platypus and Pymoo offer a higher classes define the basic functionality of jMetalPy: an Algorithm
number of features and algorithmic variants, including methods solves a Problem by using some Operator entities which manip-
for statistical post-processing and visualization of results. In ulate a set of Solution objects. We detail these classes next.
particular, Pagmo/PyGMO contains implementations of a num-
ber of single/multi-objective algorithms, including hybrid vari- 3.1. Core Architecture
ants, with statistical methods for racing algorithms, quality in- Class Algorithm contains a list of solutions (i.e. population
dicators and fitness landscape analysis. Platypus supports par- in Evolutionary Algorithms or swarm in Swarm Intelligence
allel processing in solution evaluation phase, whereas Pymoo is techniques) and a run() method that implements the behavior
rather focused on offering methods for preference articulation of a generic metaheuristic (for the sake of simplicity, full de-
based on reference points. tails of the codes are omitted):
The jMetalPy framework we proposed in this paper is also 1 class Algorithm(ABC):
def __init__(self):
an active open source project, which is focused mainly on multi- 3 self.evaluations = 0
self.solutions = List[]
objective optimization (although a number of single-objective 5 self.observable = DefaultObservable()
algorithms are included) providing an increasing number of al- 7 def run(self):
self.solutions = self.create_initial_solutions()
gorithms and modern methods for statistical post-processing 9 self.solutions = self.evaluate(self.solutions)
self.init_progress()
and visualization of results. It offers algorithmic variants with 11 while not self.stopping_condition_is_met():
self.step()
methods for parallel processing and preference articulation based 13 self.update_progress()
on reference points to provide decision making support. More-
over, jMetalPy incorporates algorithms and mechanisms for dy- In the above code we note the steps of creating the initial
namic problem optimization, which is an additional feature not set of solutions, their evaluation, and the main loop of the algo-
present in the other related frameworks. In this way, the pro- rithm, which performs a number of steps until a stopping condi-
posed framework attempts at covering as many enhancing fea- tion is met. The initialization of state variables of an algorithm
tures in optimization as possible to support experimentation and and their update at the end of each step are carried out in the
decision making in both research and industry communities. init progress() and update progress() methods, respectively. In
Besides these features, an important design goal in jMetalPy order to allow the communication of the status of an algorithm
has been to make the code easy to understand (in particular, the while running we have adopted the observer pattern [49], so
implementation of the algorithms), to reuse and to extend, as is that any algorithm is an observable entity which notifies to reg-
illustrated in the next two sections. istered observers some information specified in advance (e.g.,
the current evaluation number, running time, or the current so-
lution list), typically in the update progress() method. In this
way we provide a structured method, for example, to display in
3
interface
Algorithm
+ evaluations: int = 0
+ solutions: List[Solution] = list()
* + observable = DefaultObservable() Solve
Use 1
+ init progress()
+ step()
+ update progress() interface
+ run() Problem
interface + get result()
Operator + number of objectives: int
+ number of variables: int
+ number of constraints: int
+ execute(solution: Solution)
1 Manage + create solution()
+ evaluate(solution: Solution)
interface
Solution
* Manipulate * Create/Evaluate
+ number of objectives: int
+ number of variables: int
real-time the current Pareto front approximation or to store it in being solved is detected. The code of the DynamicAlgorithm
a file. class is as follows:
A problem is responsible of creating and evaluating solu- 1 class DynamicAlgorithm(Algorithm, ABC):
4
11 @abstractmethod puting for a maximum time, a key has been pressed, or the cur-
def selection(self, population):
13 pass rent population achieves a minimum level of quality according
15 @abstractmethod to some indicator. Fourth, the reproduction method applies the
def reproduction(self, population):
17 pass crossover and mutation operators over the mating pool to gen-
19 @abstractmethod
def replacement(self, population, offspring):
erate the offspring population. Finally, the replacement method
21 pass combines the population and the offspring population to pro-
23 def init_progress(self):
self.evaluations = self.population_size
duce a new population.
25
def step(self):
Departing from the implemented GeneticAlgorithm class,
27 mating_pool = self.selection(self.solutions)
offspring = self.reproduction(mating_pool)
we are ready to implement the standard NSGA-II algorithm and
29 offspring = self.evaluate(offspring) some variants, which will be described in the next subsections.
self.solutions = self.replacement(self.solutions, offspring)
31 Computing times will be reported when running the algorithm
def update_progress(self):
33 self.evaluations += self.offspring_size to solve the ZDT1 benchmark problem [25] on a MacBook Pro
with macOS Mojave, 2.2 GHz Intel Core i7 processor (Turbo
On every step, the selection operator is used (line 27) to re- boost up to 3.4GHz), 16 GB 1600 MHz DDR3 RAM, Python
trieve the mating pool from the solution list (the population) of 3.6.7 :: Anaconda.
the algorithm. Solutions of the mating pool are taken for re-
production (line 28), which yields a new list of solutions called 4.1. Standard Generational NSGA-II
offspring. Solutions of this offspring population must be evalu-
NSGA-II is a generational genetic algorithm, so the popu-
ated (line 29), and thereafter a replacement strategy is applied to
lation and the offspring population have the same size. Its main
update the population (line 30). We can observe that the eval-
feature is the use of a non-dominated sorting for ranking the
uation counter is initialized and updated in the init progress()
solutions in a population to foster convergence, and a crowd-
(line 23) and update progress (line 32), respectively.
ing distance density estimator to promote diversity [14]. These
The EvolutionaryAlgorithm class is very generic. We pro-
mechanisms are applied in the replacement method, as shown
vide a complete implementation of a Genetic Algorithm, which
in the following snippet:
is an evolutionary algorithm where the reproduction is com-
1 class NSGAII(GeneticAlgorithm):
posed by combining a crossover and mutation operator. We def __init__(self,
3 problem: Problem,
partially illustrate this implementation next: population_size,
5 offspring_size,
1 class GeneticAlgorithm(EvolutionaryAlgorithm): mutation: Mutation,
def __init__(self, 7 crossover: Crossover,
3 problem: Problem[Solution], selection: Selection,
population_size: int, 9 termination_criterion: TerminationCriterion,
5 offspring_population_size: int, population_generator=RandomGenerator(),
mutation: Mutation, 11 population_evaluator=SequentialEvaluator()
7 crossover: Crossover, dominance_comparator=DominanceComparator()):
selection: Selection, 13 ...
9 termination_criterion: TerminationCriterion, def replacement(self, population, offspring):
population_generator=RandomGenerator(), 15 join_population = population + offspring
11 population_evaluator=SequentialEvaluator()):
... 17 return RankingAndCrowdingDistanceSelection(
13 self.population_size, self.dominance_comparator).execute(
def create_initial_solutions(self): join_population)
15 return [self.population_generator.new(self.problem)
for _ in range(self.population_size)]
17
def evaluate(self, solutions): No more code is needed. To configure and run the algorithm
19 return self.population_evaluator.evaluate(solutions, self.problem)
we include some examples, such as the following code:
21 def stopping_condition_is_met(self):
return self.termination_criterion.is_met # Standard generational NSGAII runner
23 2 problem = ZDT1()
def selection(self, population: List[Solution]):
25 # select solutions to get the mating pool 4 max_evaluations = 25000
algorithm = NSGAII(
27 def reproduction(self, mating_pool): 6 problem=problem,
# apply crossover and mutation population_size=100,
29 8 offspring_population_size=100,
def replacement(self, population, offspring): mutation=PolynomialMutation(...),
31 # combine the population and offspring populations 10 crossover=SBXCrossover(...),
selection=BinaryTournamentSelection(...),
12 termination_criterion=StoppingByEvaluations(max=max_evaluations),
There are some interesting features to point out here. First, 14 )
dominance_comparator=DominanceComparator()
the initial solution list is created from a Generator object (line 16 progress_bar = ProgressBarObserver(max=max_evals)
14), which, given a problem, returns a number of new solutions 18
algorithm.observable.register(observer=progress_bar)
5
1 reference_point = [0.5, 0.5]
algorithm = NSGAII(
3 ...
dominance_comparator=GDominanceComparator(reference_point)
5 )
can configure NSGA-II with this comparator as follows: 9 def update(self, *args, **kwargs):
counter = kwargs[’COUNTER’]
11 self.time = (1.0 / self.nT) * floor(counter * 1.0 / self.tau_T)
self.problem_modified = True
6
Pareto front approximation Pareto front approximation Pareto front approximation
NSGAII-ZDT1 ssNSGAII-ZDT1 gNSGAII-ZDT1
1.0 1.0 1.0
y
0.4 0.4 0.4
Figure 3: Pareto front approximations when solving the ZDT1 produced by the standard NSGA-II algorithm (left), a steady-state version (center), and G-NSGA-II
(using the reference point [ f1 , f2 ] = [0.5, 0.5], shown in red).
0.8
The key point in this class is the update() method which,
when invoked by an observable entity (e.g., an instance of the 0.6
aforementioned TimeCounter class), sets the problem modified
1
flag to True. We can observe that this flag can be queried and 0.4
reset.
The code presented next shows how to configure and run 0.2
the dynamic NSGA-II algorithm:
# Dynamic NSGAII runner 0.0
2 problem = FDA2()
time_counter = TimeCounter(delay=1)) 0.0 0.2 0.4 0.6 0.8 1.0
4 time_counter.observable.register(problem) 0
time_counter.start()
6
algorithm = DynamicNSGAII(
8 ... Figure 4: Pareto front approximations when solving the dynamic FDA2 prob-
termination_criterion=StoppingByEvaluations(max=
10 max_evals)
lem produced by the dynamic version of NSGA-II.
)
12 algorithm.run()
7
stages, to be sent again for evaluation. This way, all the proces-
sors/cores of the target cluster will be busy most of the time.
Preliminary results on our target multicore laptop indicate
that speedups around 5.45 can obtained with the 8 cores of the
system where simulations were performed. We will discuss on
this lack of scalability and other aspects of this use case in the
next subsection.
4.7. Discussion
In this section we have presented five different versions of
NSGA-II , most of them (except for the distributed variant) re-
quiring minor changes on the base class implementing NSGA-
II. Not all algorithms can be adapted in the same way, but some
of the variations of NSGA-II can be implemented in a straight-
forward manner. Thus, we include in jMetalPy examples of dy-
namic, preference-based, and parallel versions of some of the
included algorithms, such as SMPSO, GDE3, and OMOPSO.
We would like to again stress on the readability of the codes,
by virtue of which all the steps of the algorithms can be clearly
identified. Some users may find the class hierarchy Evolution-
aryAlgorithm → GeneticAlgorithm → NSGAII cumbersome,
and prefer to have all the code of NSGA-II in a single class.
However, this alternative design approach would hinder the flex-
ibility of the current implementation, and would require to repli-
cate most of the code when developing algorithmic variants.
In the case of parallel algorithms, an exhaustive performance
assessment is beyond the scope of this paper. The reported
speedups are not remarkable due to the Turbo Boost feature
of the processor of the laptop used for performing the experi-
ments, but they give an idea of the time reductions that can be
achieved when using a modern multicore computer.
5. Visualization
8
returns a Pareto front approximation but, unlike the static ones, f 1( x) 0
1
the user can manipulate them interactively. There are two kinds 46
of interactive charts: those that produce an HTML page includ-
0
1
ing a chart (allowing to apply actions such as zooming, select-
f0
0
ing part of the graph, or clicking in a point to see its objective
(
42
x)
0
values are allowed) and charts such as the Chord diagram that
allows hovering the mouse over the chart and visualizing rela-
tionships among objective values. Finally, streaming charts de-
pict graphs in real time, during the execution of the algorithms
xf2 ( )
(and they can also be included in a Jupyter notebook); this can 0 37
0
1
be useful to observe the evolution of the current Pareto front
approximation produced by the algorithm.
Figure 5 shows three examples of interactive plots based
0
on Plotly. The target problem is DTLZ1 [26], which is solved 1 48
x)
2, 3 and 5 objectives. For any problem with more than 3 objec-
(
f4
0
tives, a parallel coordinates graph is generated. An example of
44
Chord diagram for a problem with 5 objectives is shown in Fig-
ure 6; each depicted chord represents a solution of the obtained
f3 (
x) 1
0
Pareto front, and ties together its objective values. When hov-
Figure 6: Example of Chord diagram for the front obtained by SMPSO when
ering over a sector box of a certain objective fi , this chart only solving a problem with 5 objectives.
renders those solutions whose fi values fall within the value
support of this objective delimited by the extremes of the sector
box. Finally, the outer partitioned torus of the chart represents programmed from scratch and embedded into the core of jMet-
a histogram of the values covered in the obtained Pareto front alPy. Specifically, the statistical tests included in jMetalPy are
for every objective. listed next:
• A diverse set of non-parametric null hypothesis significance
6. Experimental Use Case tests, namely, the Wilcoxon rank sum test, Sign test, Fried-
man test, Friedman aligned rank test and Quade test. These
In previous sections, we have shown examples of Pareto tests have been traditionally used by the community to shed
front approximations produced by some of the metaheuristics light on their comparative performance by inspecting a statis-
included in jMetalPy. In this section, we describe how our tic computed from their scores.
framework can be used to carry out rigorous experimental stud-
ies based on comparing a number of algorithms to determine • Bayesian tests (sign test and signed rank test), which have
which of them presents the best overall performance. been recently postulated to overcome the shortcomings of
null hypothesis significance testing for performance assess-
6.1. Experimentation Methodology ment [53]. These tests are complemented by a posterior plot
An experimental comparison requires a number of steps: in barycentric coordinates to compare pairs of algorithms un-
der a Bayesian approach by also accounting for possible sta-
1. Determine the algorithms to be compared and the bench- tistical ties.
mark problems to be used.
• Posthoc tests to compare among multiple algorithms, either
2. Run a number of independent runs per algorithm-problem one-vs-all (Bonferroni-Dunn, Holland, Finner, and Hochberg)
configuration and get the produced fronts. or all-vs-all (Li, Holm, Shaffer).
3. Apply quality indicators to the fronts (e.g., Hypervolume, The results of these tests are displayed by default in the
Epsilon, etc.). screen and most of them can be exported to LATEX tables. Fur-
thermore, boxplot diagrams can be also generated. Finally,
4. Apply a number of statistical test to assess the statistical sig-
LATEX tables containing means and medians (and their corre-
nificance of the performance differences found among the
sponding standard deviation and interquartile range dispersion
algorithms considered in the benchmark.
measures, respectively) are automatically generated.
The first three steps can be done with jMetalPy, but also
with jMetal or even manually (e.g., running algorithms using a 6.2. Implementation Details
script). The point where jMetalPy stands out is the fourth one, jMetalPy has a laboratory module containing utilities for
as it contains a large amount of statistical features to provide defining experiments, which require three lists: the algorithms
the user with a broad set of tools to analyze the results gener- to be compared (which must be properly configured), the bench-
ated by a comparative study. All these functionalities have been mark problems to be solved, and the quality indicators to be
9
applied for performance assessment. Additional parameters are
Table 3: Median and Interquartile Range of the EP quality indicator.
the number of independent runs and the output directory. NSGAII SMPSO MOEAD GDE3 MOCell
ZDT1 1.29e − 022.69e−03 5.59e − 032.64e−04 2.50e − 029.32e−03 1.31e − 022.96e−03 6.26e − 032.44e−04
Once the experiment is executed, a summary in the form ZDT2 1.33e − 022.63e−03 5.47e − 032.82e−04 4.78e − 022.27e−02 1.25e − 023.16e−03 5.72e − 032.72e−04
of a CSV file is generated. This file contains all the informa- ZDT3
ZDT4
7.94e − 032.27e−03
1.42e − 022.43e−03
5.23e − 031.22e−03
6.12e − 034.06e−04
1.02e − 012.68e−02
4.05e − 014.32e−01
7.13e − 031.39e−03
4.08e + 008.64e−01
5.19e − 031.24e−03
9.07e − 032.65e−03
tion of the quality indicator values, for each configuration and ZDT6 1.97e − 023.62e−03 6.79e − 032.85e−04 7.73e − 031.23e−04 1.73e − 023.73e−03 8.43e − 038.69e−04
run. Each line of this file has the following schema: Algorithm,
Problem, Indicator, ExecutionId, IndicatorValue. An example Table 4: Median and Interquartile Range of the SPREAD quality indicator.
of its contents follows: NSGAII SMPSO MOEAD GDE3 MOCell
ZDT1 3.45e − 012.80e−02 6.92e − 021.95e−02 3.56e − 015.41e−02 3.33e − 013.05e−02 7.17e − 021.44e−02
1 Algorithm,Problem,Indicator,ExecutionId,IndicatorValue ZDT2 3.63e − 013.84e−02 7.19e − 021.31e−02 2.97e − 019.69e−02 3.33e − 013.95e−02 8.50e − 022.30e−02
NSGAII,ZDT1,EP,0,0.015705992620067832
3 NSGAII,ZDT1,EP,1,0.012832504015918067 ZDT3 7.47e − 011.50e−02 7.10e − 011.07e−02 9.96e − 014.02e−02 7.34e − 011.26e−02 7.04e − 015.88e−03
NSGAII,ZDT1,EP,2,0.01071189935186434 ZDT4 3.57e − 012.93e−02 9.04e − 021.26e−02 9.53e − 011.32e−01 8.92e − 016.10e−02 1.20e − 013.50e−02
5 ... ZDT6 4.71e − 012.76e−02 2.49e − 011.06e−02 2.91e − 016.55e−04 6.73e − 013.90e−02 2.68e − 011.22e−02
MOCell,ZDT6,IGD+,22,0.0047265135903854704
7 MOCell,ZDT6,IGD+,23,0.004496215669027173
MOCell,ZDT6,IGD+,24,0.005483899232523609
Table 5: Median and Interquartile Range of the HV quality indicator.
where we can see the header with the column names, followed ZDT1
NSGAII
6.59e − 013.73e−04
SMPSO
6.62e − 011.09e−04
MOEAD
6.42e − 015.71e−03
GDE3
6.61e − 011.89e−04
MOCell
6.61e − 011.72e−04
by four lines corresponding to the values of the Epsilon in- ZDT2 3.26e − 013.39e−04 3.29e − 011.18e−04 3.12e − 016.94e−03 3.27e − 012.89e−04 3.28e − 011.97e−04
ZDT3 5.15e − 012.53e−04 5.15e − 016.44e−04 4.41e − 012.99e−02 5.15e − 011.28e−04 5.15e − 013.51e−04
dicator of three runs of the NSGA-II algorithm when solving ZDT4 6.57e − 013.38e−03 6.61e − 012.10e−04 2.76e − 012.33e−01 0.00e + 000.00e+00 6.58e − 011.87e−03
ZDT6 3.88e − 011.63e−03 4.00e − 019.21e−05 4.00e − 012.92e−06 3.97e − 015.83e−04 3.97e − 011.20e−03
the ZDT1 problem. The end of the file shows the value of
the IGD+ indicator for three runs of MOCell when solving the
ZDT6 problem. The file contains as many lines as the product Nevertheless, it is well known that taking into account only
of the numbers of algorithms, problems, quality indicators, and median values for algorithm ranking does not ensure that their
independent runs. differences are statistically significant. Statistical rankings are
The summary file is the input of all the statistical tests, so also needed if we intend to rank the algorithm performance con-
that they can be applied to any valid file having the proper sidering all the problems globally. Finally, in studies involving
format. This is particularly interesting to combine jMetal and a large number of problems (we have used only five for simplic-
jMetalPy. The last versions of jMetal generates a summary file ity), the visual analysis of the medians can be very complicated,
after running a set of algorithms in an experimental study, so so statistical diagrams gathering all the information are needed.
then we can take advantage of the features of jMetal (providing This is the reason why jMetalPy can also generate a second set
many algorithms and benchmark problems, faster execution of of LATEX tables compiling, in a visually intuitive fashion, the
Java compared with Python) and jMetalPy (better support for result of non-parametric null hypothesis significance tests run
data analysis and visualization). We detail an example of com- over a certain quality indicator for all algorithms. Tables 6, 7
bining both frameworks in the next section. and 8 are three examples of these tables computed by using the
Wilcoxon rank sum test between every pair of algorithms (at the
6.3. Experimental Case Study 5% level of significance) for the EP, SPREAD and HV indica-
Let us consider the following case study. We are interested tors, respectively. In each cell, results for each of the 5 datasets
in assessing the performance of five metaheuristics (GDE3, MO- are represented by using three symbols: – if there is not statisti-
Cell, MOEA/D, NSGA-II, and SMPSO) when solving the ZDT cal significance between the algorithms represented by the row
suite of continuous problems (ZDT1-4, ZDT6). The quality in- and column of the cell; O if the approach labeling the column
dicators to calculate are set to the additive Epsilon (EP), Spread is statistically better than the algorithm in the row; and N if the
(SPREAD), and Hypervolume (HV), which give a measure of algorithm in the row significantly outperforms the approach in
convergence, diversity and both properties, respectively. The the column.
number of independent runs for every algorithm is set to 25.
We configure an experiment with this information in jMetal Table 6: Wilcoxon values of the EP quality indicator (ZDT1, ZDT2, ZDT3,
and, after running the algorithms and applying the quality indi- ZDT4, ZDT6).
cators, the summary file is obtained. Then, by giving this file SMPSO MOEAD GDE3 MOCell
as input to the jMetalPy statistical analysis module, we obtain NSGAII NNNNN OOOON ––NON NNNNN
a set of LATEX files and figures in an output directory as well SMPSO OOOOO OOOOO OO–OO
MOEAD NNNOO NNNNO
as information displayed in the screen. We analyze next the GDE3 NNNNN
obtained results.
Tables 3, 4, and 5 show the median and interquartile range
of the three selected quality indicators. To facilitate the analy-
sis of the tables, some cells have a grey background. Two grey Table 7: Wilcoxon values of the SPREAD quality indicator (ZDT1, ZDT2,
ZDT3, ZDT4, ZDT6).
levels are used, dark and light, to highlight the algorithms yield- SMPSO MOEAD GDE3 MOCell
ing the best and second best indicator values, respectively (note NSGAII NNNNN ONOON –NNOO NNNNN
that this is automatically performed by jMetalPy). From the ta- SMPSO OOOOO OOOOO –ONOO
bles, we can observe that SMPSO is the overall best performing MOEAD NONNO NNNNN
algorithm, achieving the best indicator values in four problems GDE3 NNNNN
and one second best value.
10
comparison approach.
Table 8: Wilcoxon values of the HV quality indicator (ZDT1, ZDT2, ZDT3,
ZDT4, ZDT6).
SMPSO MOEAD GDE3 MOCell
NSGAII OOOOO NNNNO OOONO OO–OO
SMPSO NNNNN NN–NN NNNNN
MOEAD OOONN OOOON
GDE3 OONO–
ZDT6
0.4000
0.3975
0.3950
0.3925
0.3900
0.3875 Figure 9: Posterior plot of the HV indicator using a Bayesian sign test.
0.3850
Finally, we end up our experimental use case by showing
NSGAII SMPSO MOEAD GDE3 MOCell
the Posterior plot that allows comparing pair of algorithms by
using Bayesian sign test (Figure 9). When relying on Bayesian
Figure 7: Boxplot diagram of the HV indicator for the ZDT6 problem.
hypothesis testing we can directly evaluate the posterior prob-
The boxplots and tables described heretofore allow observ- ability of the hypotheses from the available quality indicator
ing the dispersion of the results, as well as the presence of values, which enables a more intuitive understanding of the
outliers, but they do not allow to get a global vision of the comparative performance of the considered algorithms. Fur-
performance of the algorithms in all the problems. This mo- thermore, a region of practical equivalence (also denoted rope)
tivates the incorporation of principled methods for comparing can be defined to account for ties between the considered multi-
multiple techniques over different problem instances, such as objective solvers. The plot in Figure 9 is in essence a barycen-
those proposed by Demsar [54] in the context of classification tric projection of the posterior probabilities: the region at the
problems and machine learning models. As anticipated pre- bottom-right of the chart, for instance, delimits the area where:
viously, our developed framework includes Critical Distance
(CD) plots (Figure 8, computed for the HV indicator) and Pos- θr ≥ max(θe , θl ), (1)
terior plots (Figure 9, again for the HV indicator). The former with θr = P(z > r), θe = P(−r ≤ z ≤ r), θl = P(z < −r),
plot is used to depict the average ranking of the algorithms com- and z denoting the difference between the indicator values of
puted over the considered problems, so that the chart connects the algorithm on the right and the left (in that order). Based on
with a bold line those algorithms whose difference in ranks is this notation, the figure exposes, in our case and for r = 0.002,
less than the so-called critical distance. This critical distance than in most cases z = HV(NSGA-II) − HV(SMPSO) fulfills
is a function of the number of problems, the number of tech- θl ≥ max(θe , θr ), i.e. it is more probable, on average, than the
niques under comparison, and a critical value that results from HV values of SMPSO are higher than those of NSGA-II. Par-
a Studentized range statistic and a specified confidence level. ticularly these probabilities can be estimated by counting the
As shown in Figure 8, SMPSO, MOCell, GDE3 and NSGA-II number of points that fall in every one of the three regions, from
are reported to perform statistically equivalently, which clashes which we conclude that in this use case 1) SMPSO is practically
with the conclusions of the previously discussed table set due better than NSGA-II with probability 0.918; 2) both algorithms
to the relatively higher strictness of the statistic from which the perform equivalently with probability 0.021; and 3) NSGA-II
critical distance is computed. A higher number of problems is superior than SMPSO with probability 0.061.
would be required to declare statistical significance under this
11
7. Conclusions and Future Work [9] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion,
O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Van-
In this paper we have presented jMetalPy, a Python-based derplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, E. Duchesnay,
Scikit-learn: Machine learning in Python, Journal of Machine Learning
framework for multi-objective optimization with metaheuris-
Research 12 (2011) 2825–2830.
tics. It is released under the MIT license and made freely avail- [10] J. D. Hunter, Matplotlib: A 2d graphics environment, Computing In Sci-
able for the community in GitHub. We have detailed its core ence & Engineering 9 (3) (2007) 90–95. doi:10.1109/MCSE.2007.55.
architecture and described the implementation of NSGA-II and [11] P. T. Inc., Collaborative data science (2015).
URL https://plot.ly
some of its variants as illustrative examples of how to operate [12] Dask Development Team, Dask: Library for dynamic task scheduling
with this framework. (2016).
jMetalPy provides support for dynamic optimization, paral- URL https://dask.org
lelism, and decision making. Other salient features involves [13] S. Salloum, R. Dautov, X. Chen, P. X. Peng, J. Z. Huang, Big data analyt-
ics on apache spark, International Journal of Data Science and Analytics
visualization (static, streaming, and interactive graphics) for 1 (3-4) (2016) 145–164.
multi- and many-objective problems, and a large set of statis- [14] K. Deb, A. Pratap, S. Agarwal, T. Meyarivan, A Fast and Elitist Multi-
tical tests for performance assessment. It is worth noting that objective Genetic Algorithm: NSGA-II, IEEE Trans. Evol. Comput. 6 (2)
jMetalPy is still a young research project, which is intended (2002) 182–197.
[15] K. Deb, H. Jain, An evolutionary many-objective optimization algorithm
to be useful for the research community interested in multi- using reference-point-based nondominated sorting approach, part i: Solv-
objective optimization with metaheuristics. Thus, it is expected ing problems with box constraints, IEEE Transactions on Evolution-
to evolve quickly, incorporating new algorithms and problems ary Computation 18 (4) (2014) 577–601. doi:10.1109/TEVC.2013.
by both the development team and by external contributors. 2281535.
[16] S. Kukkonen, J. Lampinen, GDE3: the third evolution step of gener-
Specific lines of future work includes evaluating the perfor- alized differential evolution, in: Evolutionary Computation, 2005. The
mance of parallel and distributed metaheuristics in clusters, as 2005 IEEE Congress on, Vol. 1, 2005, pp. 443–450. doi:10.1109/
well as applying them to solve new real-world problems. Fur- CEC.2005.1554717.
[17] A. J. Nebro, J. J. Durillo, J. Garcia-Nieto, C. A. Coello Coello, F. Luna,
thermore, we plan to open the analysis and visualization fea- E. Alba, SMPSO: A new PSO-based metaheuristic for multi-objective
tures of jMetalPy by including different input data formats to optimization, in: IEEE Symposium on Computational Intelligence in
foster their use by other external frameworks. Multi-Criteria Decision-Making, 2009, pp. 66–73. doi:10.1109/MCDM.
2009.4938830.
[18] C. A. C. Coello, G. T. Pulido, M. S. Lechuga, Handling multiple ob-
Acknowledgements jectives with particle swarm optimization, IEEE Transactions on Evolu-
tionary Computation 8 (3) (2004) 256–279. doi:10.1109/TEVC.2004.
This work has been partially funded by Grants TIN2017- 826067.
[19] A. J. Nebro, J. J. Durillo, F. Luna, B. Dorronsoro, E. Alba, MOCell: A
86049-R (Spanish Ministry of Education and Science). José cellular genetic algorithm for multiobjective optimization, International
Garcı́a-Nieto is the recipient of a Post-Doctoral fellowship of Journal of Intelligent Systems 24 (7) (2009) 726–746. doi:10.1002/
“Captación de Talento para la Investigación” Plan Propio at int.20358.
Universidad de Málaga. Javier Del Ser and Izaskun Oregui re- [20] E. Zitzler, S. Künzli, Indicator-based selection in multiobjective search,
in: in Proc. 8th International Conference on Parallel Problem Solving
ceive funding support from the Basque Government through the from Nature, PPSN VIII, Springer, 2004, pp. 832–842.
EMAITEK Program. [21] E. Zitzler, M. Laumanns, L. Thiele, SPEA2: Improving the strength
pareto evolutionary algorithm, in: K. Giannakoglou, D. Tsahalis, J. Peri-
aux, P. Papailou, T. Fogarty (Eds.), EUROGEN 2001. Evolutionary Meth-
Bibliography ods for Design, Optimization and Control with Applications to Industrial
Problems, Athens, Greece, 2002, pp. 95–100.
[1] C. A. C. Coello, G. B. Lamont, D. A. V. Veldhuizen, Evolutionary Algo- [22] J. Bader, E. Zitzler, HypE: An Algorithm for Fast Hypervolume-Based
rithms for Solving Multi-Objective Problems (Genetic and Evolutionary Many-Objective Optimization, TIK Report 286, Computer Engineering
Computation), Springer-Verlag, Berlin, Heidelberg, 2006. and Networks Laboratory (TIK), ETH Zurich (Nov. 2008).
[2] K. Deb, Multi-Objective Optimization Using Evolutionary Algorithms, [23] Q. Zhang, H. Li, MOEA/D: A Multiobjective Evolutionary Algorithm
John Wiley & Sons, 2001. Based on Decomposition, IEEE T. Evolut. Comput. 11 (6) (2007) 712–
[3] T. Weise, M. Zapf, R. Chiong, A. J. Nebro, Why Is Optimization Diffi- 731. doi:10.1109/TEVC.2007.892759.
cult?, in: R. Chiong (Ed.), Nature-Inspired Algorithms for Optimisation, [24] Q. Zhang, W. Liu, H. Li, The performance of a new version of moea/d on
Springer, Berlin, 2009, pp. 1–50, iSBN 978-3-642-00266-3. cec09 unconstrained mop test instances, Tech. Rep. CES-491, School of
[4] C. Blum, A. Roli, Metaheuristics in combinatorial optimization: CS & EE, University of Essex (2009).
Overview and conceptual comparison, ACM Computing Surveys 35 (3) [25] E. Zitzler, K. Deb, L. Thiele, Comparison of Multiobjective Evolutionary
(2003) 268–308. Algorithms: Empirical Results, Evolutionary Computation 8 (2) (2000)
[5] J. J. Durillo, A. J. Nebro, jmetal: A java framework for multi-objective 173–195.
optimization, Advances in Engineering Software 42 (10) (2011) 760–771. [26] K. Deb, L. Thiele, M. Laumanns, E. Zitzler, Scalable Test Problems
[6] A. Nebro, J. J. Durillo, M. Vergne, Redesigning the jmetal multi-objective for Evolutionary Multiobjective Optimization, in: A. Abraham, L. Jain,
optimization framework, in: Proceedings of the Companion Publication R. Goldberg (Eds.), Evolutionary Multiobjective Optimization. Theoreti-
of the 2015 Annual Conference on Genetic and Evolutionary Computa- cal Advances and Applications, Springer, 2001, pp. 105–145.
tion, GECCO Companion ’15, ACM, 2015, pp. 1093–1100. [27] H. Li, Q. Zhang, Multiobjective Optimization Problems With Compli-
[7] T. Oliphant, NumPy: A guide to NumPy, http://www.numpy.org/, cated Pareto Sets, MOEA/D and NSGA-II, IEEE Transactions on Evolu-
[Online; accessed 02-08-2019] (2006). tionary Computation 13 (2) (2009) 229–242.
[8] E. Jones, T. Oliphant, P. Peterson, et al., SciPy: Open source scientific [28] Z. Fan, W. Li, X. Cai, H. Huang, Y. Fang, Y. You, J. Mo, C. Wei,
tools for Python, [Online; accessed 02-08-2019] (2001–). E. Goodman, An improved epsilon constraint-handling method in moea/d
URL http://www.scipy.org/ for cmops with large infeasible regions, Soft Computingdoi:10.1007/
s00500-019-03794-x.
12
[29] M. Farina, K. Deb, P. Amato, Dynamic multiobjective optimization prob- dan (Eds.), Advances in Multi-Objective Nature Inspired Computing,
lems: test cases, approximations, and applications, IEEE Transactions on Springer, Studies in Computational Intelligence, Vol. 272, Berlin, Ger-
Evolutionry Computation 8 (5) (2004) 425–442. doi:10.1109/TEVC. many, 2010, Ch. 5, pp. 87–117, iSBN 978-3-642-11217-1.
2004.831456. [47] S. Bleuler, M. Laumanns, L. Thiele, E. Zitzler, PISA — A Platform and
[30] A. J. Nebro, J. J. Durillo, J. Garcı́a-Nieto, C. Barba-González, J. Del Ser, Programming Language Independent Interface for Search Algorithms,
C. A. Coello Coello, A. Benı́tez-Hidalgo, J. F. Aldana-Montes, Extending TIK Report 154, Computer Engineering and Networks Laboratory (TIK),
the speed-constrained multi-objective pso (smpso) with reference point ETH Zurich (October 2002).
based preference articulation, in: A. Auger, C. M. Fonseca, N. Lourenço, [48] Y. Tian, R. Cheng, X. Zhang, Y. Jin, Platemo: A matlab platform for evo-
P. Machado, L. Paquete, D. Whitley (Eds.), Parallel Problem Solving from lutionary multi-objective optimization [educational forum], IEEE Com-
Nature – PPSN XV, Springer International Publishing, Cham, 2018, pp. putational Intelligence Magazine 12 (4) (2017) 73–87. doi:10.1109/
298–310. MCI.2017.2742868.
[31] E. Zitzler, L. Thiele, Multiobjective evolutionary algorithms: a compar- [49] E. Gamma, R. Helm, R. Johnson, J. Vlissides, Design Patterns: Elements
ative case study and the strength pareto approach, IEEE Transactions on of Reusable Object-Oriented Software, 1st Edition, Addison-Wesley Pro-
Evolutionary Computation 3 (4) (1999) 257–271. doi:10.1109/4235. fessional, 1994.
797969. [50] J. J. Durillo, A. J. Nebro, F. Luna, E. Alba, A study of master-slave ap-
[32] E. Zitzler, L. Thiele, M. Laumanns, C. M. Fonseca, V. G. da Fonseca, proaches to parallelize nsga-ii, in: 2008 IEEE International Symposium
Performance assessment of multiobjective optimizers: an analysis and re- on Parallel and Distributed Processing, 2008, pp. 1–8. doi:10.1109/
view, IEEE Transactions on Evolutionary Computation 7 (2) (2003) 117– IPDPS.2008.4536375.
132. doi:10.1109/TEVC.2003.810758. [51] J. Molina, L. V. Santana, A. G. Hernández-Dı́az, C. A. C.
[33] C. A. Coello Coello, M. Reyes Sierra, A study of the parallelization of Coello, R. Caballero, g-dominance: Reference point based dom-
a coevolutionary multi-objective evolutionary algorithm, in: R. Monroy, inance for multiobjective metaheuristics, European Journal of
G. Arroyo-Figueroa, L. E. Sucar, H. Sossa (Eds.), MICAI 2004: Ad- Operational Research 197 (2) (2009) 685 – 692. doi:https:
vances in Artificial Intelligence, Springer Berlin Heidelberg, Berlin, Hei- //doi.org/10.1016/j.ejor.2008.07.015.
delberg, 2004, pp. 688–697. URL http://www.sciencedirect.com/science/article/pii/
[34] M. Zaharia, M. Chowdhury, M. J. Franklin, S. Shenker, I. Stoica, S0377221708005146
Spark: Cluster computing with working sets, in: Proceedings of the 2Nd [52] C. Barba-Gonzaléz, J. Garcı́a-Nieto, A. J. Nebro, J. F. Aldana-Montes,
USENIX Conference on Hot Topics in Cloud Computing, HotCloud’10, Multi-objective big data optimization with jmetal and spark, in: H. Traut-
USENIX Association, 2010, pp. 10–10. mann, G. Rudolph, K. Klamroth, O. Schütze, M. Wiecek, Y. Jin,
[35] F.-A. Fortin, F.-M. De Rainville, M.-A. Gardner, M. Parizeau, C. Gagné, C. Grimme (Eds.), Evolutionary Multi-Criterion Optimization, Springer
DEAP: Evolutionary algorithms made easy, Journal of Machine Learning International Publishing, Cham, 2017, pp. 16–30.
Research 13 (2012) 2171–2175. [53] A. Benavoli, G. Corani, J. Demšar, M. Zaffalon, Time for a change: a
[36] G. core team, Geatpy - The Genetic and Evolutionary Algorithm Toolbox tutorial for comparing multiple classifiers through bayesian analysis, The
for Python, http://www.geatpy.com, [Online; accessed: 01-21-2019] Journal of Machine Learning Research 18 (1) (2017) 2653–2688.
(2018). [54] J. Demšar, Statistical comparisons of classifiers over multiple data sets,
[37] A. Garrett, inspyred (Version 1.0.1) [software]. Inspired Intelligence, Journal of Machine learning research 7 (Jan) (2006) 1–30.
https://github.com/aarongarrett/inspyred, [Online; accessed:
01-08-2019] (2012).
[38] F. Biscani, D. Izzo, C. H. Yam, A global optimisation toolbox for
massively parallel engineering optimisation, arXiv:1004.3824 [cs.DC]
https://esa.github.io/pagmo2/index.html, [Online; accessed:
01-18-2019] (2010).
[39] D. Hadka, Platypus. A Free and Open Source Python Library for Multi-
objective Optimization, https://github.com/Project-Platypus/
Platypus, [Online; accessed: 01-08-2019] (2015).
[40] J. Blank, pymoo - multi-objective optimization framework, https://
github.com/msu-coinlab/pymoo (2019).
[41] S. Luke, Ecj then and now, in: Proceedings of the Genetic and Evolution-
ary Computation Conference Companion, GECCO ’17, ACM, New York,
NY, USA, 2017, pp. 1223–1230. doi:10.1145/3067695.3082467.
URL http://doi.acm.org/10.1145/3067695.3082467
[42] J. Wakunda, A. Zell, Eva: a tool for optimization with evolution-
ary algorithms, in: EUROMICRO 97. Proceedings of the 23rd EU-
ROMICRO Conference: New Frontiers of Information Technology (Cat.
No.97TB100167), 1997, pp. 644–651. doi:10.1109/EURMIC.1997.
617395.
[43] A. Ramı́rez, J. R. Romero, S. Ventura, An extensible jclec-based solu-
tion for the implementation of multi-objective evolutionary algorithms,
in: Genetic and Evolutionary Computation Conference, GECCO 2015,
Madrid, Spain, July 11-15, 2015, Companion Material Proceedings,
2015, pp. 1085–1092. doi:10.1145/2739482.2768461.
URL https://doi.org/10.1145/2739482.2768461
[44] D. Hadka, Moea framework: A free and open source java framework
for multiobjective optimization, http://moeaframework.org/, [On-
line; accessed 02-08-2019] (2017).
[45] M. Lukasiewycz, M. Glaß, F. Reimann, J. Teich, Opt4J - A Modular
Framework for Meta-heuristic Optimization, in: Proceedings of the Ge-
netic and Evolutionary Computing Conference (GECCO 2011), Dublin,
Ireland, 2011, pp. 1723–1730.
[46] A. Liefooghe, L. Jourdan, T. Legrand, J. Humeau, E.-G. Talbi,
ParadisEO-MOEO: A Software Framework for Evolutionary Multi-
Objective Optimization, in: C. A. Coello Coello, C. Dhaenens, L. Jour-
13