jMetal¶
jMetal stands for Metaheuristic Algorithms in Java, and it is an object-oriented Java-based framework for multi-objective optimization with metaheuristics.
Warning
Documentation is WIP!! Some information may be missing.
Contributing¶
Contributions to the jMetal project are welcome. Please, take into account the following guidelines (all developers should follow these guidelines):
Git WorkFlow¶
We have a set of branches on the remote Git server. Some branches are temporary, and others are constant throughout the life of the repository.
- Branches always present in the repository:
- master: You have the latest released to production, receive merges from the develop branch, or merge from a hotfix branch (emergency).
- Do I have to put a TAG when doing a merge from develop to master? yes
- Do I have to put a TAG when doing a merge from a hotfix branch to master? yes
- After merge from a hotfix to master, do I have to merge from master to develop? yes
- develop: It is considered the “Next Release”, receives merges from branches of each developer, either corrections (fix) or new features (feature).
- Temporary branches:
- feature/<task-id>-<description>: When we are doing a development, we create a local branch with the prefix “feature/”, then only if there is a task id, we indicate it and we add a hyphen. The following we indicate a description according to the functionality that we are developing. The words are separated by hyphens.
- Where does this branch emerge? This branch always emerge from the develop branch
- When I finish the development in my feature branch, which branch to merge into?: You always merge feature branch into develop branch
- fix/<task-id>-<description>: When we are making a correction, we create a local branch with the prefix “fix/”, then only if there is a task id, we indicate it and we add a hyphen. The following we indicate a description according to the functionality that we are correcting. The words are separated by hyphens.
- Where does this branch emerge? This branch always emerge from the develop branch
- When I finish the correction in my fix branch, which branch to merge into?: You always merge feature branch into develop branch
- hotfix/<task-id>-<description>: When we are correcting an emergency incidence in production, we create a local branch with the prefix “hotfix/”, then only if there is a task id, we indicate it and we add a hyphen. The following we indicate a description according to the functionality that we are correcting. The words are separated by hyphens.
- Where does this branch emerge?: This branch always emerge from the master branch
- When I finish the correction in my hotfix branch, which branch to merge into?: This branch always emerge from the master and develop branch
- Steps to follow when you are creating or going to work on a branch of any kind (feature / fix / hotfix):
- After you create your branch (feature / fix / hotfix) locally, upload it to the remote Git server. The integration system will verify your code from the outset.
- Each time you commit, as much as possible, you send a push to the server. Each push will trigger the automated launch of the tests, etc.
- Once the development is finished, having done a push to the remote Git server, and that the test phase has passed without problem, you create an pull request.
Note
Do not forget to remove your branch (feature / fix / hotfix) once the merge has been made.
Some useful Git commands:
- git fetch –prune: Cleaning branches removed and bringing new branches
Installation steps¶
Requirements¶
jMetal is implemented in Java. Since version 5.2, we are using features of Java 8, so a Java 8 JDK or higher is required to compile the project.
As jMetal is a Maven project, this tool is also a requirement to compile, test and package the code.
Optionally, R and Latex are needed if you use the code to carry out experimental studies to run the R scripts and compile the Latex files that will be generated.
Compiling¶
Once you have the source code of jMetal you can use it in to ways: from an IDE or from the command line of a terminal. The IDE alternative is the simplest one and, if you are used to the tool, compiling and running algorithms is easy.
Eclipse¶
If the Project -> Build Automatically is set, Eclipse will automatically build the project. Otherwise, select Project -> Build Project

Building from the command line¶
Once you have downloaded the source code you can use the command line to build the project by using Maven commands. If you open a terminal you will have something similar to this:

Then you have Maven to your disposal to work with the project:
- mvn clean: cleaning the project
- mvn compile: compiling
- mvn test: testing
- mvn package: compiling, testing, generating documentation, and packaging in jar files
- mvn site: generates a site for the project
Getting started¶
The Algorithm
interface¶
A metaheuristic or algorithm in jMetal 5 is an entity that implements the Algorithm
interface:
package org.uma.jmetal.algorithm;
/**
* Interface representing an algorithm
* @author Antonio J. Nebro
* @version 0.1
* @param <Result> Result
*/
public interface Algorithm<Result> extends Runnable {
void run() ;
Result getResult() ;
}
This interface is very generic: it specifies that an algorithm must have a run()
method and return a result by the getResult()
method. As it extends Runnable
, any algorithm can be executed in a thread.
The symplicity of Algorithm
offers plenty of freedom to implement a metaheuristic according to your favorite preferences. However, as jMetal 5 is a framework it includes a set of resources and strategies to help in the implementation of algorithms with the idea of promoting good design, code reusing, and flexibility. The key components are the use of the builder pattern and algorithm templates. In the next section we give a detailed description of how the well-known NSGA-II algorithm is implemented, configured, and extended.
Case study: NSGA-II¶
NSGA-II is a genetic algorithm (GA), i.e. it belongs to the evolutionary algorithms (EAs) family. The implementation of NSGA-II provided in jMetal 5.0 follows the evolutionary algorithm template described in the algorithm templates section of the documentation. This means that it must define the methods of the AbstractEvolutionaryAlgorithm
class. According to this template, the flow control of the algorithm is defined in the run()
method:
@Override public void run() {
List<S> offspringPopulation;
List<S> matingPopulation;
population = createInitialPopulation();
population = evaluatePopulation(population);
initProgress();
while (!isStoppingConditionReached()) {
matingPopulation = selection(population);
offspringPopulation = reproduction(matingPopulation);
offspringPopulation = evaluatePopulation(offspringPopulation);
population = replacement(population, offspringPopulation);
updateProgress();
}
}
We describe next how these methods are implemented in the NSGAII class.
The class declaration is as follows:
public class NSGAII<S extends Solution<?>> extends AbstractGeneticAlgorithm<S, List<S>> {
...
}
which indicates that it extends the AbstractGeneticAlgorithm
. The generic S
allows to specify the encoding of the solutions that will manipulate the algorithm, and it will determine the kind of problems that can be solved as well as the operators that can be used. This is exemplified in the class constructor:
public NSGAII(Problem<S> problem, int maxIterations, int populationSize,
CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator,
SelectionOperator<List<S>, S> selectionOperator, SolutionListEvaluator<S> evaluator) {
super() ;
this.problem = problem;
this.maxIterations = maxIterations;
this.populationSize = populationSize;
this.crossoverOperator = crossoverOperator;
this.mutationOperator = mutationOperator;
this.selectionOperator = selectionOperator;
this.evaluator = evaluator;
}
The constructor parameter contains:
- The problem to solve.
- The main algorithm parameters: the population size and the maximum number of iterations.
- The genetic operators: crossover, mutation, and selection.
- An evaluator object to evaluate the solutions in the population.
We can observe that all the parameters depend on S
. This way, if S
is instantiated e.g. to DoubleSolution
, then the problems to be solved must extend Problem<DoubleSolution>
and all the operators must manipulate DoubleSolution
objects. The interesting point of this approch is the compiler can ensure that there are no errors related with the application of wrong operators to a given solution.
The default createInitialPopulation()
method adds a number of populationSize
new solutions to a list:
@Override protected List<S> createInitialPopulation() {
List<S> population = new ArrayList<>(populationSize);
for (int i = 0; i < populationSize; i++) {
S newIndividual = problem.createSolution();
population.add(newIndividual);
}
return population;
}
The evalution of lists of solutions are delegated to Evaluator
objects, so the evaluatePopulation()
method is very simple:
@Override protected List<S> evaluatePopulation(List<S> population) {
population = evaluator.evaluate(population, problem);
return population;
}
The NSGA-II implementation assumes that the stopping condition will be defined around a maximum number of iterations:
@Override protected boolean isStoppingConditionReached() {
return iterations >= maxIterations;
}
so the initProgress()
method initalizes the iteration counter (the initial value is 1 because it is assumed that the initial populatio has been already evaluated):
@Override protected void initProgress() {
iterations = 1;
}
and the updateProgress()
method merely increments the counter:
@Override protected void updateProgress() {
iterations++;
}
Accordig to the EA template, the Selection()
method must create a mating pool from the population, so it is implemented this way:
@Override protected List<S> selection(List<S> population) {
List<S> matingPopulation = new ArrayList<>(population.size());
for (int i = 0; i < populationSize; i++) {
S solution = selectionOperator.execute(population);
matingPopulation.add(solution);
}
return matingPopulation;
}
and the reproduction()
method applies the crossover and mutation operators to the mating population, leading to new individuals that are added to an offspring population:
@Override protected List<S> reproduction(List<S> population) {
List<S> offspringPopulation = new ArrayList<>(populationSize);
for (int i = 0; i < populationSize; i += 2) {
List<S> parents = new ArrayList<>(2);
parents.add(population.get(i));
parents.add(population.get(i + 1));
List<S> offspring = crossoverOperator.execute(parents);
mutationOperator.execute(offspring.get(0));
mutationOperator.execute(offspring.get(1));
offspringPopulation.add(offspring.get(0));
offspringPopulation.add(offspring.get(1));
}
return offspringPopulation;
}
Finally, the replacement()
method joins the current and offspring populations to produce the population of the next generation by applying the ranking and crowding distance selection:
@Override protected List<S> replacement(List<S> population, List<S> offspringPopulation) {
List<S> jointPopulation = new ArrayList<>();
jointPopulation.addAll(population);
jointPopulation.addAll(offspringPopulation);
Ranking<S> ranking = computeRanking(jointPopulation);
return crowdingDistanceSelection(ranking);
}
Case study: Steady-state NSGA-II¶
An advantage of using the EA template to implement NSGA-II is that it allows to simplify the implementation of variants of the algorithm. To give an example, we describe here the SteadyStateNSGAII class, which implements a steady-state version of NSGA-II. This version is basically NSGA-II but with an auxiliar population of size 1, so the SteadyStateNSGAII
is an extension of class NSGAII
:
public class SteadyStateNSGAII<S extends Solution<?>> extends NSGAII<S> {
}
and the class constructor is similar to the one of NSGA-II:
public SteadyStateNSGAII(Problem<S> problem, int maxIterations, int populationSize,
CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator,
SelectionOperator<List<S>, S> selectionOperator, SolutionListEvaluator<S> evaluator) {
super(problem, maxIterations, populationSize, crossoverOperator, mutationOperator,
selectionOperator, evaluator);
}
The only differences between the two algorithm variants are in the selection()
(the mating pool is composed of two parents) and reproduction()
(only a child is generated) methods:
@Override protected List<S> selection(List<S> population) {
List<S> matingPopulation = new ArrayList<>(2);
matingPopulation.add(selectionOperator.execute(population));
matingPopulation.add(selectionOperator.execute(population));
return matingPopulation;
}
@Override protected List<S> reproduction(List<S> population) {
List<S> offspringPopulation = new ArrayList<>(1);
List<S> parents = new ArrayList<>(2);
parents.add(population.get(0));
parents.add(population.get(1));
List<S> offspring = crossoverOperator.execute(parents);
mutationOperator.execute(offspring.get(0));
offspringPopulation.add(offspring.get(0));
return offspringPopulation;
}
This way, most of the code of the NSGAII
class is reused and only two methods have had to be redefined.
Using the builder pattern to configure NSGA-II¶
To configure the algorithms in jMetal 5 we have adopted the approach of using the builder pattern, which is represented by the AlgorithmBuilder
interface:
/**
* Interface representing algorithm builders
*
* @author Antonio J. Nebro <antonio@lcc.uma.es>
*/
public interface AlgorithmBuilder<A extends Algorithm<?>> {
public A build() ;
}
TO BE COMPLETED
Algorithm templates¶
Most of metaheuristic families are characterized by a common behaviour which is shared by all the algorithms belonging to the family. This behaviour can be expressed as a template that can be instatiated to implement a particular algorithm. From a software engineering point of view, an algorithm whose behavior falls in a basic template would only require to implement some specific methods for the new technique; the common behavior would not be needed to be programmed, therefore resulting in less code replication. This inversion of control if a characteristic of software frameworks, as is the case of jMetal.
The Evolutionary Algorithm Template¶
Many papers about evolutionary algorithms (EAs) include a pseudo-code to describe them similar to this one:
P(0) ← GenerateInitialSolutions()
t ← 0
Evaluate(P(0))
while not StoppingCriterion() do
P'(t) ← selection(P(t))
P''(t) ← Variation(P'(t))
Evaluate(P''(t))
P (t + 1) ← Update(P (t), P''(t))
t←t+1
end while
To mimic this pseudo-code, jMetal 5 incorporates a template in the form of an abstract class named AbstractEvolutionaryAlgorithm
, which contains the following code:
package org.uma.jmetal.algorithm.impl;
/**
* Created by Antonio J. Nebro on 26/10/14.
* @param <S> Solution
* @param <R> Result
*/
public abstract class AbstractEvolutionaryAlgorithm<S extends Solution<?>, R> implements Algorithm<R>{
private List<S> population;
public List<S> getPopulation() {
return population;
}
public void setPopulation(List<S> population) {
this.population = population;
}
protected abstract void initProgress();
protected abstract void updateProgress();
protected abstract boolean isStoppingConditionReached();
protected abstract List<S> createInitialPopulation();
protected abstract List<S> evaluatePopulation(List<S> population);
protected abstract List<S> selection(List<S> population);
protected abstract List<S> reproduction(List<S> population);
protected abstract List<S> replacement(List<S> population, List<S> offspringPopulation);
@Override public abstract R getResult();
@Override public void run() {
List<S> offspringPopulation;
List<S> matingPopulation;
population = createInitialPopulation();
population = evaluatePopulation(population);
initProgress();
while (!isStoppingConditionReached()) {
matingPopulation = selection(population);
offspringPopulation = reproduction(matingPopulation);
offspringPopulation = evaluatePopulation(offspringPopulation);
population = replacement(population, offspringPopulation);
updateProgress();
}
}
}
The generics in the class declaration indicate that an algorithm works with subclasses of the Solution
interface (e.g., DoubleSolution
, BinarySolution
, and so on) and returns a result (typically, a single solution in the case of single-objective metaheuristics and a list of solutions in the case of multi-objective techniques). We can observe as the population is implemented a list of solutions.
To develop an EA, all the abstract the methods used in the run()
method must be implemented. We describe those methods next:
createInitialPopulation()
: This method fills the population with a set of tentative solutions. The typical strategy consists in generating randomly initialized solutions, but any other approach can be applied.evaluatePopulation(population)
: All the solutions in thepopulation
argument are evaluated and a population, which can be the same one passed as a parameter or a new one, is returned as a result.initProgress()
: The progress of an EA is usually measured by counting iterations or function evaluations. This method initializes the progess counter.isStoppingConditionReached()
: the stopping condition establishes when the algorithm finishes its execution.selection(population)
: the selection method chooses a number of solutions from the population to become the mating pool.reproduction(matingPopulation)
: the solutions in the mating pool are manipulated somehow, by modifying them or by using them to create new ones, yielding to new solutions that constitute the offspring population.replacement(population, offspringPopulation)
: the population for the next generation is built from individuals of the current and the offspring populations.updateProgress()
: the counter of the progress of the algorithm (evaluations, iterations, or whatever) is updated.
Genetic algorithms¶
If we are interested in implementing a genetic algorithm, a subfamily of EAs characterized by applying a selection operator and by using a crossover and a mutation operator for the reproduction step, a subclass of AbstractEvolutionaryAlgorithm
called AbstractGeneticAlgorithm is provided:
package org.uma.jmetal.algorithm.impl;
/**
* Created by ajnebro on 26/10/14.
*/
public abstract class AbstractGeneticAlgorithm<S extends Solution<?>, Result> extends AbstractEvolutionaryAlgorithm<S, Result> {
protected SelectionOperator<List<S>, S> selectionOperator ;
protected CrossoverOperator<S> crossoverOperator ;
protected MutationOperator<S> mutationOperator ;
}
Popular metaheuristics such as NSGA-II, SPEA2, PESA2, MOCell or SMS-EMOA are based on this template.
Evolution strategies¶
Another subfamily of EAs are evolution strategies, which are based on applying only mutation in the reproduction step. The corresponding abstract class for EAs is AbstractEvolutionStragegy
:
package org.uma.jmetal.algorithm.impl;
/**
* Created by ajnebro on 26/10/14.
*/
public abstract class AbstractEvolutionStrategy<S extends Solution<?>, Result> extends AbstractEvolutionaryAlgorithm<S, Result> {
protected MutationOperator<S> mutationOperator ;
}
The PAES algorithm is based on this template
TO BE COMPLETED
Architecture¶
The architecture of jMetal 5 relies on four interfaces:
This diagram captures the typical functionality provided by jMetal: an Algorithm
solves a Problem
by manipulating a set of potential Solution
objects through the use of several Operators
. The Solution
interface represents the individuals in evolutionary algorithms and the particles in the case of particle swarm optmization algorithms. A Problem
can create new solutions and evaluate them.
Compared to previous versions of jMetal, there is not a class for the concept of population or swarm. In jMetal 5 a population is merely a list of solutions (List<Solution>
in Java).
Generics¶
We can observe the use of parametrized types to model the use of Java generics, which are now widely applied.
The use of generics in the architecture allows to align all the components in metaheuristic so that the Java compiler can check that everything fit. For example, this code represents all the elements to configure a the well-known NSGA-II algorithm to solve a continuous problem:
Problem<DoubleSolution> problem;
Algorithm<List<DoubleSolution>> algorithm;
CrossoverOperator<DoubleSolution> crossover;
MutationOperator<DoubleSolution> mutation;
SelectionOperator<List<DoubleSolution>, DoubleSolution> selection;
...
algorithm = new NSGAIIBuilder<DoubleSolution>(problem, crossover, mutation)
.setSelectionOperator(selection)
.setMaxEvaluations(25000)
.setPopulationSize(100)
.build() ;
Evaluators¶
To be written ...
Experimental studies¶
Since version 5.1, jMetal incorporates support for making experimental studies, i.e. configuring an experiment where a set of algorithms solve a number of problems and, as a result, a number of output files (latex tables, R scripts) are generated.
Some examples of experimental studies are included in jMetal 5.2:
- NSGAIIStudy: four variants of NSGA-II (with different values of the polynomial mutation and SBX crossover distribution indexes) are tested to solve the five ZDT real-coded problems. The experiment carries out 25 inpendent runs per configuration and 8 cores are used.
- NSGAIIStudy2: the same as before but it is assumed that the reference Pareto fronts are not known, so they are obtained from all the fronts obtained by all the algorithms per problem; the contributio of each algorithm to the reference is also computed (only for continuous problems)
- ZDTStudy: the same as
NSGAIIStudy
but three diffent algorithms are compared: NSGA-II, SPEA2 and SMPSO. - ZDTStudy2: the same as before, but the reference Pareto fronts are computed as in
NSGAIIStudy
. - BinaryProblemsStudy: An example of experiment solving binary-coded problems.
- ZDTScalabilityIStudy: This is an example of how using several variants of same problem in an experimental study. Concretely, this study is about solving five variants of the ZDT1 problem, each of them having a different number of decision variables.
Measures¶
A novelty in jMetal 5.0 is the inclusion of measures, which allows to obtain algorithm-specific information during its execution. The current implementation supports two types of measures: a PullMeasure
provides the value of the measure on demand (synchronous), while a PushMeasure
allows to register listeners (or observers) to receive the value of the measure when it is produced (asynchronous).
What are measures?¶
Measures are designed to access specific properties of a running algorithm. For instance, one could know the size of the current population in a genetic algorithm, the current velocity of the particles in a particle swarm optimization, the current iteration, etc. In order to deal properly with the many properties that an algorithm could have, two types of measures are provided.
Usually, properties are accessed by getters, like getPopulationSize()
or getCurrentIteration()
. These properties are accessed in a synchronous way, which means that we obtain (and process) them on the user's demand. Each property of this kind can be accessed through a PullMeasure
, as shows the PullMeasure.get()
method:
public interface PullMeasure<Value> extends Measure<Value> {
public Value get();
}
At the opposite, a PushMeasure
allows to obtain the value of a property in an asynchronous way, which means that the value is provided upon generation, the user having no control on when such a value will be provided to him. This is achieved by using an observer design pattern, such that the user registers one or several MeasureListener
instances to receive and process the value when it is produced:
public interface PushMeasure<Value> extends Measure<Value> {
public void register(MeasureListener<Value> listener);
public void unregister(MeasureListener<Value> listener);
}
public interface MeasureListener<Value> {
public void measureGenerated(Value value);
}
Some people could wonder why these interfaces only require reading methods: the PullMeasure
does not provide a set(value)
method to assign its value, and the PushMeasure
does not provide some kind of push(value)
method neither. This is because these interfaces are designed from a user perspective, not an algorithm designer perspective, and the user can only read these values, not write them. One could say that it makes the thing harder for the designer, but actually the designer needs to know exactly which implementation to use, because he is the one who know how the values will be provided. So if he uses an existing implementation, he should of course know the specific methods of this implementation, which can include methods to set/push his values. Only the user does not need to know about the specific implementation used by the measure, so he is the one who will have to deal with generic PullMeasure
and PushMeasure
. Moreover, while it is natural to think about these set and push methods, it is actually not the only way to implement these measures. For instance, the algorithm designer could use a field to store the value of a property, and the update of this property (and the related PullMeasure
) will be done through this variable rather than through the call of some methods. More detailed explanations are provided in the section How to create measures?.
One could notice that both the measure interfaces extend Measure
. This one is an empty interface which is used as a root interface to both PullMeasure
and PushMeasure
. By having it, we give the possibility for programers to manage measures in a generic way, without having to consider both types of measures separately nor to use Object
to have them together. Thus, it is only here to simplify the use of measures for some highly generic cases in jMetal. No algorithm designer nor user should normally need it.
Additionally to the measures themselves, jMetal 5 also provides the notion of MeasureManager
, which deals with measures management features:
public interface MeasureManager {
public Collection<Object> getMeasureKeys();
public <T> PullMeasure<T> getPullMeasure(Object key);
public <T> PushMeasure<T> getPushMeasure(Object key);
}
You can notice that we provide a method for each type rather than a generic method returning a Measure
. This is because, as mentionned before, the Measure
interface is empty, thus has no practical value. Moreover, when the user want to exploit a measure, he should know which type of measure is implemented to know how to interact with it. Rather than providing a Measure
and arbitrarily cast it, we prefered to provide methods which directly provide the right type of measure. Notice that a measure instance can implement both interfaces (or two instances can be made available for the same property), so both methods can return an instance (same or not) for the same key, giving to the user the choice of using one way or another. In the case where only one is provided (the other being null
), it is possible to complete it, as described in the section dedicated to conversions. The key identifies the specific property to measure and is algorithm-dependent, justifying the presence of an additional getMeasureKeys()
for the user to retrieve them.
Finally, in order for an algorithm to explicit that it provides measures, it should implement the Measurable
interface, which simply requires to provide a MeasureManager
:
public interface Measurable {
public MeasureManager getMeasureManager();
}
So far, an Algorithm
does not automatically implements Measurable
, but it may change in future releases if we assess the relevance of the interface for a generic purpose.
One could wonder why we introduced the intermediary concept of MeasureManager
rather than putting directly its methods into the Measurable
interface. Indeed, by construction, the designer could simply decide to implement both the interfaces on the algorithm and implement getMeasureManager()
by simply returning this
, showing that we can artificially ignore the intermediary concept. Also, in the case where we actually reduce to the Measurable
interface, the designer could add an intermediary objects which implements Measurable
(so the methods of MeasureManager
), and implement it also for the algorithm, but using his custom object in background. So technically, we see that introducing an intermediary notion of MeasureManager
does not impose any constraint, justifying that we use the most simple design (no intermediary concept). Anyway, we made this design choice for the following reason: while the MeasureManager
should focus on the measure management strategy, a Measurable
should focus on which measures to provide. For instance, a MeasureManager
could implement an advanced management strategy which, for measures implementing only one of the measure interfaces, would automatically instantiate a PullMeasure
/PushMeasure
in order to have all the features for each measure, with some smart inspection management for PushMeasures
corresponding to PullMeasures
. On the other hand, a Measurable
instance, typically an algorithm, would focus on choosing which measures to provide and feeding them, delegating any measure management process to a dedicated MeasureManager
implementation.
Why using measures?¶
Usually, properties are accessed by getters, like getPopulationSize()
or getCurrentIteration()
. The advantage of this design is that it gives a simple way to access these properties. However, we quickly face the limitations of this design when we want to read properties which evolve in time, like the current iteration. Indeed, such a design imposes to read these properties on a regular basis, sometime on a frequent basis to see all the updates (also called polling, spinning, or busy-waiting). Such a design becomes particularly cumbersome when we want to access short-term values, like which individuals have been generated at a given iteration of a genetic algorithm. These individuals are usually forgotten at the next iteration (only the good ones are kept), thus imposing a frequent check. Accessing such properties at runtime would require whether to consume a lot of computation time to continuously inspect some getGeneratedIndividuals()
method, or to consume a lot of space to store all the data generated and access it through some getGeneratedIndividuals(int iteration)
method.
The design we choose for jMetal 5 is based on the notion of measure, which further split into two categories: PullMeasure
and PushMeasure
. The simplest one, the PullMeasure
, is designed for the first kind of property, which can be easily accessed (pulled) from a getter. While one could simply use a getter, the PullMeasure
provides a more generic access to the property, allowing to apply generic evaluations on the algorithm (like generic experiments, which are not yet available in jMetal 5.0). The other type of measure, the PushMeasure
, is designed for the other kind of properties, which are not easily managed through getters and need to be provided (pushed) in real-time by the algorithm. By using such a measure, the values can be received and processed without risking to loose any update, and without the need to continuously inspect the property.
Another advantage of having both these measures is that it can be easily integrated to an algorithm without requiring significant additional resources: indeed, for cases where a value have to be stored into a variable for the algorithm to use it, like an iteration counter to stop after N iterations, such a value can be covered (or replaced) by a PullMeasure
. At the opposite, when a value is generated but not stored during the running of the algorithm, a PushMeasure
can be used to push the value to any potential listener and forget about it, letting the listeners decide whether or not this value should be stored or further processed. The additional resources consumed are only:
- the stored measures, which are often lightweight and less numerous than the solutions to store
- the calls to the listeners of the
PushMeasures
, which are negligible if no listener is registered, otherwise fully controlled by the user (not by a priori decisions from the algorithm designer)
How to use measures?¶
Measures have been defined to be particularly easy to use. On one hand, a PullMeasure
can be used basically like a getter, where instead of calling getXxx()
we call xxxMeasure.get()
. This results in using a PullMeasure
directly when required by the user. On the other hand, because a PushMeasure
only allows a user to register and unregister listeners (the notification generation is the responsibility of the algorithm), the user have no control on when the processing will occur: the process have to be put in the listener to exploit the data when it arrives, or the listener should store the value while letting another thread dealing with the processing. It is generally recommended to reduce the time spent in a listener to the minimum in order to let the source of the notification (the algorithm here) continues its job.
In other words, a process using PullMeasures
should generally have this form, where the measures are used once the algorithm is running:
Algorithm<?> algorithm = new MyAlgorithm();
/* retrieval of the measures */
/* (only if the algorithm implements Measurable) */
MeasureManager measures = algorithm.getMeasureManager();
PullMeasure<Object> pullMeasure = measures.getPullMeasure(key);
...
/* preparation of the run */
...
/* run the algorithm in parallel */
Thread thread = new Thread(algorithm);
thread.start();
/* user process */
while (thread.isAlive()) {
...
/* use the value */
Object value = pullMeasure.get();
...
}
At the opposite, a process using PushMeasures
should generally have this form, where the process is setup before to run the algorithm:
Algorithm<?> algorithm = new MyAlgorithm();
/* retrieval of the measures */
/* (only if the algorithm implements Measurable) */
MeasureManager measures = algorithm.getMeasureManager();
PushMeasure<Object> pushMeasure = measures.getPushMeasure(key);
pushMeasure.register(new MeasureListener<Object>() {
@Override
public void measureGenerated(Object value) {
/* use the value */
...
}
});
...
/* preparation of the run */
...
/* run the algorithm in parallel */
Thread thread = new Thread(algorithm);
thread.start();
/* other processes */
while (thread.isAlive()) {
...
}
In the case where only PushMeasures
are used, one could also remove all the Thread
management and simply call algorithm.run()
and wait for it to finish. All the processes setup via PushMeasures
will occur automatically.
How to create measures?¶
Create a PullMeasure
¶
Usually, one implements an algorithm by storing some values in dedicated public fields, so a user can retrieve them on the fly. A really common example is a population of solutions, that we can find in many algorithms managing several solutions at the same time, like a genetic algorithm. Some others prefer to use getters, like getPopulation()
, to provide a read-only access (while the field can be changed by the external user). These fields and getters are the best candidates for PullMeasures
, because they can be wrapped in a straightforward manner. For our population example:
PullMeasure<Collection<Path>> populationMeasure = new PullMeasure<Collection<Path>>() {
@Override
public String getName() {
return "population";
}
@Override
public String getDescription() {
return "The set of paths used so far.";
}
@Override
public Collection<Path> get() {
return getPopulation();
}
};
The name and description are additional data to describe the measure itself, to know what it provides, and any measure should implement it, which makes the implementation of the interface quite heavy. However, this code can be reduced by using SimplePullMeasure
, which takes the name and description in argument to focus on the value to retrieve:
PullMeasure<Collection<Path>> populationMeasure
= new SimplePullMeasure<Collection<Path>>("population",
"The set of paths used so far.") {
@Override
public Collection<Path> get() {
return getPopulation();
}
};
If no getter is available, a field can also be used exactly the same way. These cases are the most basic uses of a PullMeasure
. They are also the most common if you adapt an existing implementation to use the jMetal formalism. Indeed, using fields and getters is the simple way to provide an access to the internal data of an algorithm, which gives a lot of occasions to use PullMeasures
. But these cases are not the only ones. Indeed, any computation can be defined in the get()
method, which allows to add new measures even for inexistent fields and getters. For instance, assuming that the algorithm manages the time spent in some of its steps, it could store an internal startTime
value which indicates when the algorithm have been started. From this variable, one could measure how long the algorithm has run:
PullMeasure<Long> runningTimeMeasure
= new SimplePullMeasure<Long>("running time",
"The time spent so far in running the algorithm.") {
@Override
public Long get() {
return System.currentTimeMillis() - startTime;
}
};
The advantage of putting the computation directly into the get()
method is that the value is computed only when requested. Thus, it is the responsibility of the external user to decide when it is worth to compute it.
So far, we saw that a PullMeasure
is basically used in the same way than a getter (we can also use a getter to make some computation). This is actually its principal purpose, but it does it in a standardised way: indeed, given that you have an algorithm which provides you some getters or equivalent, you can wrap all of them into PullMeasures
, which gives you a unified way to access these values in a generic context (where you do not know which method to use nor how to use them, unless reflexion is used). Moreover, if you have an algorithm which provides a set of PullMeasures
, you can extend them by creating new ones (while you cannot add getters nor fields to an instance):
PullMeasure<Integer> populationSizeMeasure
= new SimplePullMeasure<Integer>("population size",
"The number of solutions used so far.") {
@Override
public Integer get() {
// reuse a measure to compute another property
return populationMeasure.get().size();
}
};
With the ability to extend a set of measures, one can create the relevant measures for a specific experiments for instance (not yet implemented in jMetal 5.0). In other words, the algorithm designer can focus on providing a minimal set of measures and let the external user define new ones when required.
Finally, additional facilities are provided by jMetal to simplify the creation of PullMeasures
. We already mentionned the SimplePullMeasure
which focuses on defining the get()
method, but in the case where the measure wraps a field, one could prefer to use directly the measure instead of the field itself by using a BasicMeasure
, which directly stores the value by defining an additional set(value)
method. More specific measures are also defined, like the CountingMeasure
which allows to count occurrences, typically like a number of iterations or a number of solutions generated, or the DurationMeasure
to evaluate the time spent in some activities. Several implementations of PullMeasure
also implement PushMeasure
, thus allowing a high flexibility on their use. In the case where one want to add PullMeasures
to an existing algorithm, it is also possible to use the MeasureFactory
to facilitate the instantiation of several PullMeasures
at once:
createPullsFromFields(object)
instantiates aPullMeasure
for each field of an object and returns aMap
associating the name of each field to the corresponding measure,createPullsFromGetters(object)
instantiates aPullMeasure
for each getter in a similar way.
Create a PushMeasure
¶
A PushMeasure
standardises the observer design pattern for algorithms. As an observer is supposed to be notified when the value it observes is updated, a PushMeasure
notifies a listener (a broadly used term for observers in Java, especially in Swing) when a property of the algorithm changes. Noticeably, the interface PushMeasure
is really reduced: it only requires the methods to add and remove listeners. Because of that, it is the responsibility of the measure implementer to decide how the listeners are notified. Several implementations are already provided in jMetal to simplify this work. In particular, probably most of the cases will find their way in using SimplePushMeasure
, for instance if we want to notify when a new solution is generated:
SimplePushMeasure<MySolution> lastGeneratedSolution = new SimplePushMeasure<>(
"last solution",
"The last solution generated during the running of the algorithm.");
At the opposite of a passive PullMeasure
(this is the user who decides when to call it), a PushMeasure
is an active measure, in the sense that it is a particular event occuring during the run of the algorithm which triggers the notification process. For our example of last generated solution, we could have a basic hill-climbing method which starts from a random solution and then creates mutants to iteratively improve it. These random and mutant generations are the two relevant events in the algorithm for using our measure:
MySolution best = createRandomSolution();
lastGeneratedSolution.push(best);
while (running) {
MySolution mutant = createMutantSolutionFrom(best);
lastGeneratedSolution.push(mutant);
// ...
// remaining of the loop
// ...
}
This example is illustrative in two ways: first, there can have several events to consider for a single measure, and second, the notification process should be done as soon as the event has occurred. This implies that a PushMeasure
is generally deeply involved in the code of the algorithm itself, at the opposite of a PullMeasure
which can wrap a field or a getter method, letting the algorithm itself untouched. Moreover, it also means that some extra computation time is consumed each time such a relevant event occurs. Because of that, a PushMeasure
is well suited for notifying about a result already computed (because the algorithm need it) rather than to compute extra data for the sole purpose of measuring some properties. For an extra computation, it is wiser to exploit both a PushMeasure
, to notify about the already computed stuff which serves as a basis for the extra computation (if any), with an additional PullMeasure
, which will make the extra computation only if requested by the user.
Several implementations provided by jMetal already implement the PushMeasure
interface. We already saw the SimplePushMeasure
, which should be sufficient for many cases, but one can also notice the CountingMeasure
, which allows to count the events (the value notified is an integer incremented at each notification). This implementation is for instance well suited for notifying the start/end of an iteration or how many solutions have been generated so far. It also implements the PullMeasure
interface, allowing to retrieve the last value notified on demand.
Conversions PullMeasure
<-> PushMeasure
¶
Some measures implement both PullMeasure
and PushMeasure
, but in the case where a single one is implemented, it is still possible to create another measure to complement it. This can be achieved by using the MeasureFactory
, which provides conversions in both directions:
createPullFromPush(push, initialValue)
creates aPullMeasure
from aPushMeasure
. Every time the initialPushMeasure
notifies its listeners, thePullMeasure
is updated and stores the value for future calls of itsget()
. TheinitialValue
provided to the method tells which value to use before the next notification occurs (typicallynull
or the actual value if it is known).createPushFromPull(pull, period)
creates aPushMeasure
from aPullMeasure
. Because there is no particular event produced by aPullMeasure
, we artificially poll it (frequently check its value) at the givenperiod
to see when it changes. Identifying a change will result in generating a notification from the createdPushMeasure
. A shortperiod
offers a better reactivity but increases the computation cost, explaining why this method should not be used unless it is necessary. This is also why it is generally preferable, when it is possible to choose, to setup aPushMeasure
rather than aPullMeasure
: the conversion costs way less in that direction.
Add measures to an algorithm¶
In order for an algorithm to provide measures, it should implement the Measurable
interface, which asks to provide a MeasureManager
. This manager is the one storing and giving access to all the measures of the algorithm. While one can implement his own manager, jMetal already provide the SimpleMeasureManager
implementation which provides the following methods:
public class SimpleMeasureManager implements MeasureManager {
// Methods to configure the PullMeasures
public void setPullMeasure(Object key, PullMeasure<?> measure) {...}
public <T> PullMeasure<T> getPullMeasure(Object key) {...}
public void removePullMeasure(Object key) {...}
// Methods to configure the PushMeasures
public void setPushMeasure(Object key, PushMeasure<?> measure) {...}
public <T> PushMeasure<T> getPushMeasure(Object key) {...}
public void removePushMeasure(Object key) {...}
// Methods to configure any measure (auto-recognition of the type)
public void setMeasure(Object key, Measure<?> measure) {...}
public void removeMeasure(Object key) {...}
public void setAllMeasures(Map<? extends Object, ? extends Measure<?>> measures) {...}
public void removeAllMeasures(Iterable<? extends Object> keys) {...}
// Provide the keys of the configured measures
public Collection<Object> getMeasureKeys() {...}
}
While there is the basic, type-specific methods, there is also generic methods which automatically recognize the type of the measure provided, and apply the corresponding type-specific methods. Measures which implement both PullMeasure
and PushMeasure
are also recognized and added both as a PullMeasure
and a PushMeasure
, so calling getPullMeasure(key)
and getPushMeasure(key)
with the same key
will return the same measure. The generic methods also provide a massive configuration feature by managing several keys and measures at once.
It is worth noting that, if an instance of a non-jMetal algorithm is provided, one can easily try to retrieve some measures from it by using MeasureFactory.createPullsFromFields(object)
and MeasureFactory.createPullsFromGetters(object)
. The maps returned by these two methods can then be provided to SimpleMeasureManager.setAllMeasures(measures)
to have a fully featured, ready to use MeasureManager
, without knowing anything about the actual algorithm. Given that we know how to run it, it is then possible to run it in a dedicated thread, as described in the section How to use measures?, and to exploit the available measures to obtain some information about the algorithm. However, as underlined in the section Conversions PullMeasure
<-> PushMeasure
, it is costly to make PushMeasures
from PullMeasures
, while the reverse is quite cheap. Thus, although it can be tempting to simply implement an algorithm independently of jMetal and use this procedure to obtain a set of PullMeasures
, someone designing an algorithm with the possibility to use the formalism of jMetal should focus on PushMeasures
(or a combination of both) to retrieve more information in a more optimized way.
The Operator
interface¶
Metaheuristic techniques are based on modifying or generating new solutions from existing ones by
means of the application of different operators. For example, EAs make use of crossover, mutation, and
selection operators for modifying solutions. In jMetal, any operation altering or generating solutions (or
sets of them) implements or extends the Operator
interface:
package org.uma.jmetal.operator;
/**
* Interface representing an operator
*
* @author Antonio J. Nebro <antonio@lcc.uma.es>
* @version 0.1
* @param <Source> Source Class of the object to be operated with
* @param <Result> Result Class of the result obtained after applying the operator
*/
public interface Operator<Source, Result> {
/**
* @param source The data to process
*/
public Result execute(Source source) ;
}
The generics in this interface are intended to indicate that an operator is applied to a Source
object and returns as a result Result
object.
The framework already incorporates a number of operators, which can be classiffed into four different classes:
- Crossover. Represents the recombination or crossover operators used in EAs. Some of the included operators are the simulated binary (SBX) crossover and the single-point crossover for real and binary encodings, respectively.
- Mutation. Represents the mutation operator used in EAs. Examples of included operators are polynomial mutation (real encoding) and bit-flip mutation (binary encoding).
- Selection. This kind of operator is used for performing the selection procedures in many metaheuristics. An example of selection operator is the binary tournament.
- LocalSearch. This class is intended for representing local search procedures. It contains a method for consulting how many evaluations have been performed after been applied.
We review the interfaces and implementations of these operators next.
Crossover operators¶
The CrossoverOperator
interface represents any crossover in jMetal 5:
package org.uma.jmetal.operator;
/**
* Interface representing crossover operators. They will receive a list of solutions and return
* another list of solutions
*
* @author Antonio J. Nebro <antonio@lcc.uma.es>
*
* @param <S> The class of the solutions
*/
public interface CrossoverOperator<S extends Solution<?>> extends Operator<List<S>,List<S>> {
}
This interface simply states that a crossover has as a source a list of Solution
objects and return as a result another list of solutions. Let us examine two implementations of this interface, one for double solutons and another one for binary solutions.
The simulated binary crossover (SBX) is the default crossover operator in many multiobjective evolutionary algorithms (e.g., NSGA-II, SPEA2, SMS-EMOA, MOCell, etc). A scheme of the SBXCrossover
class is shown next:
package org.uma.jmetal.operator.impl.crossover;
/**
* This class allows to apply a SBX crossover operator using two parent solutions (Double encoding).
* A {@link RepairDoubleSolution} object is used to decide the strategy to apply when a value is out
* of range.
*
* The implementation is based on the NSGA-II code available in
* <a href="http://www.iitk.ac.in/kangal/codes.shtml">http://www.iitk.ac.in/kangal/codes.shtml</a>
*
* @author Antonio J. Nebro <antonio@lcc.uma.es>
* @author Juan J. Durillo
*/
public class SBXCrossover implements CrossoverOperator<DoubleSolution> {
/** EPS defines the minimum difference allowed between real values */
private static final double EPS = 1.0e-14;
private double distributionIndex ;
private double crossoverProbability ;
private RepairDoubleSolution solutionRepair ;
private JMetalRandom randomGenerator ;
/** Constructor */
public SBXCrossover(double crossoverProbability, double distributionIndex) {
this (crossoverProbability, distributionIndex, new RepairDoubleSolutionAtBounds()) ;
}
/** Constructor */
public SBXCrossover(double crossoverProbability, double distributionIndex, RepairDoubleSolution solutionRepair) {
if (crossoverProbability < 0) {
throw new JMetalException("Crossover probability is negative: " + crossoverProbability) ;
} else if (distributionIndex < 0) {
throw new JMetalException("Distribution index is negative: " + distributionIndex);
}
this.crossoverProbability = crossoverProbability ;
this.distributionIndex = distributionIndex ;
this.solutionRepair = solutionRepair ;
randomGenerator = JMetalRandom.getInstance() ;
}
/** Execute() method */
@Override
public List<DoubleSolution> execute(List<DoubleSolution> solutions) {
if (null == solutions) {
throw new JMetalException("Null parameter") ;
} else if (solutions.size() != 2) {
throw new JMetalException("There must be two parents instead of " + solutions.size()) ;
}
return doCrossover(crossoverProbability, solutions.get(0), solutions.get(1)) ;
}
...
TO BE COMPLETED
The Problem
interface¶
To include a problem in jMetal, it must implement the Problem
interface:
package org.uma.jmetal.problem;
/**
* Interface representing a multi-objective optimization problem
*
* @author Antonio J. Nebro <antonio@lcc.uma.es>
*
* @param <S> Encoding
*/
public interface Problem<S extends Solution<?>> extends Serializable {
/* Getters */
public int getNumberOfVariables() ;
public int getNumberOfObjectives() ;
public int getNumberOfConstraints() ;
public String getName() ;
/* Methods */
public void evaluate(S solution) ;
public S createSolution() ;
Every problem is characterized by the number of decision variables, the number of objective functions and the number of constraints, so getter methods for returning those values have to be defined. The genetic type S
allows to determine the encoding of the solutions of the problem. This way, a problem must include a method for evaluating any solution of class S
as well as providing a createSolution()
method for creating a new solution.
The Solution
interface is generic, so jMetal 5 has a number of interfaces extending it to represent double (i.e., continous) problems, binary problems, etc. This way, the DoubleProblem
interface is defined in this way:
package org.uma.jmetal.problem;
/**
* Interface representing continuous problems
*
* @author Antonio J. Nebro <antonio@lcc.uma.es>
*/
public interface DoubleProblem extends Problem<DoubleSolution> {
Double getLowerBound(int index) ;
Double getUpperBound(int index) ;
}
Problems implementing DoubleProblem
only accept DoubleSolution
objects, and methods for getting the lower and upper limits of each variable have to be implemented. jMetal 5 provides a default abstract class that implements DoubleProblem
called AbstractDoubleProblem
:
package org.uma.jmetal.problem.impl;
public abstract class AbstractDoubleProblem extends AbstractGenericProblem<DoubleSolution>
implements DoubleProblem {
private List<Double> lowerLimit ;
private List<Double> upperLimit ;
/* Getters */
@Override
public Double getUpperBound(int index) {
return upperLimit.get(index);
}
@Override
public Double getLowerBound(int index) {
return lowerLimit.get(index);
}
/* Setters */
protected void setLowerLimit(List<Double> lowerLimit) {
this.lowerLimit = lowerLimit;
}
protected void setUpperLimit(List<Double> upperLimit) {
this.upperLimit = upperLimit;
}
@Override
public DoubleSolution createSolution() {
return new DefaultDoubleSolution(this) ;
}
}
As an example of double problem, we include next the implementation of the known Kursawe
problem:
package org.uma.jmetal.problem.multiobjective;
/**
* Class representing problem Kursawe
*/
public class Kursawe extends AbstractDoubleProblem {
/**
* Constructor.
* Creates a default instance of the Kursawe problem.
*/
public Kursawe() {
// 3 variables by default
this(3);
}
/**
* Constructor.
* Creates a new instance of the Kursawe problem.
*
* @param numberOfVariables Number of variables of the problem
*/
public Kursawe(Integer numberOfVariables) {
setNumberOfVariables(numberOfVariables);
setNumberOfObjectives(2);
setName("Kursawe");
List<Double> lowerLimit = new ArrayList<>(getNumberOfVariables()) ;
List<Double> upperLimit = new ArrayList<>(getNumberOfVariables()) ;
for (int i = 0; i < getNumberOfVariables(); i++) {
lowerLimit.add(-5.0);
upperLimit.add(5.0);
}
setLowerLimit(lowerLimit);
setUpperLimit(upperLimit);
}
/** Evaluate() method */
public void evaluate(DoubleSolution solution){
double aux, xi, xj;
double[] fx = new double[getNumberOfObjectives()];
double[] x = new double[getNumberOfVariables()];
for (int i = 0; i < solution.getNumberOfVariables(); i++) {
x[i] = solution.getVariableValue(i) ;
}
fx[0] = 0.0;
for (int var = 0; var < solution.getNumberOfVariables() - 1; var++) {
xi = x[var] * x[var];
xj = x[var + 1] * x[var + 1];
aux = (-0.2) * Math.sqrt(xi + xj);
fx[0] += (-10.0) * Math.exp(aux);
}
fx[1] = 0.0;
for (int var = 0; var < solution.getNumberOfVariables(); var++) {
fx[1] += Math.pow(Math.abs(x[var]), 0.8) +
5.0 * Math.sin(Math.pow(x[var], 3.0));
}
solution.setObjective(0, fx[0]);
solution.setObjective(1, fx[1]);
}
}
Similarly to the DoubleProblem
interface and AbstractDoubleProblem
, we can found BinaryProblem
and AbstractBinaryProblem
, IntegerProblem
and AbstractIntegerProblem
, etc. The packages related to defining and implementing problems are:
org.uma.jmetal.problem
(modulejmetal-core
): Interface definitions.org.uma.jmetal.problem.impl
(modulejmetal-core
): Default implementations.org.uma.jmetal.problem
(modulejmetal-problem
): Implemented problems.
Constrained problems¶
There are two ways of dealing with constrained problems in jMetal 5. The first choice is to include the code to deal with constraint violation in the evaluate()
method; the second one is to implement the ConstrainedProblem
interface which includes a method for evaluating constraints:
package org.uma.jmetal.problem;
/**
* Interface representing problems having constraints
*
* @author Antonio J. Nebro <antonio@lcc.uma.es>
*/
public interface ConstrainedProblem<S extends Solution<?>> extends Problem<S> {
/* Getters */
public int getNumberOfConstraints() ;
/* Methods */
public void evaluateConstraints(S solution) ;
}
In jMetal 5 the default approach is the second one. The following code contains the implementation of the Tanaka
problem, which has two constraints:
package org.uma.jmetal.problem.multiobjective;
/**
* Class representing problem Tanaka
*/
public class Tanaka extends AbstractDoubleProblem implements ConstrainedProblem<DoubleSolution> {
public OverallConstraintViolation<DoubleSolution> overallConstraintViolationDegree ;
public NumberOfViolatedConstraints<DoubleSolution> numberOfViolatedConstraints ;
/**
* Constructor.
* Creates a default instance of the problem Tanaka
*/
public Tanaka() {
setNumberOfVariables(2);
setNumberOfObjectives(2);
setNumberOfConstraints(2);
setName("Tanaka") ;
List<Double> lowerLimit = new ArrayList<>(getNumberOfVariables()) ;
List<Double> upperLimit = new ArrayList<>(getNumberOfVariables()) ;
for (int i = 0; i < getNumberOfVariables(); i++) {
lowerLimit.add(10e-5);
upperLimit.add(Math.PI);
}
setLowerLimit(lowerLimit);
setUpperLimit(upperLimit);
overallConstraintViolationDegree = new OverallConstraintViolation<DoubleSolution>() ;
numberOfViolatedConstraints = new NumberOfViolatedConstraints<DoubleSolution>() ;
}
@Override
public void evaluate(DoubleSolution solution) {
solution.setObjective(0, solution.getVariableValue(0));
solution.setObjective(1, solution.getVariableValue(1));
}
/** EvaluateConstraints() method */
@Override
public void evaluateConstraints(DoubleSolution solution) {
double[] constraint = new double[this.getNumberOfConstraints()];
double x1 = solution.getVariableValue(0) ;
double x2 = solution.getVariableValue(1) ;
constraint[0] = (x1 * x1 + x2 * x2 - 1.0 - 0.1 * Math.cos(16.0 * Math.atan(x1 / x2)));
constraint[1] = -2.0 * ((x1 - 0.5) * (x1 - 0.5) + (x2 - 0.5) * (x2 - 0.5) - 0.5);
double overallConstraintViolation = 0.0;
int violatedConstraints = 0;
for (int i = 0; i < getNumberOfConstraints(); i++) {
if (constraint[i]<0.0){
overallConstraintViolation+=constraint[i];
violatedConstraints++;
}
}
overallConstraintViolationDegree.setAttribute(solution, overallConstraintViolation);
numberOfViolatedConstraints.setAttribute(solution, violatedConstraints);
}
}
Discussion¶
The inclusion of the ConstrainedProblem
interface was motivated by the former jMetal versions, where every problem had the evaluate()
and evaluateConstraints()
methods. In the case of a non-constrained problem, evaluateConstraints()
was implemented as an empty method. To avoid this violation of the Interface Segregation Principle, in jMetal 5 only those problems having side constraints need to evaluate constraints.
In the original jMetal, evaluating a solution needed two sentences:
Problem problem ;
Solution solution ;
...
problem.evaluate(solution) ;
problem.evaluateContraints(solution) ;
Now a check has to be included to determine whether a problem has constraints or not:
DoubleProblem problem ;
DoubleSolution solution ;
problem.evaluate(solution);
if (problem instanceof ConstrainedProblem) {
((ConstrainedProblem<DoubleSolution>) problem).evaluateConstraints(solutionn);
}
Quality indicators¶
Quality indicators are considered in jMetal 5 as components of the core package (jmetal-core
). As many other components, there is a generic interface and an impl
package containing the provided implementations of that interface.
The QualityIndicator
interface is very simple:
package org.uma.jmetal.qualityindicator;
/**
* @author Antonio J. Nebro <antonio@lcc.uma.es>
*
* @param <Evaluate> Entity to evaluate
* @param <Result> Result of the evaluation
*/
public interface QualityIndicator<Evaluate, Result> extends DescribedEntity {
public Result evaluate(Evaluate evaluate) ;
public String getName() ;
}
The idea is than every quality indicator is applied to some entity (Evaluate
) to be evaluated, and it returns a Result
. The use of generics allows to represent indicators returning anything, from a double value (the most usual return type) to a pair of values as in the case of our implementation of Set Coverage. The quality indicators also has an associated name.
Auxiliary classes¶
Before describing how quality indicators are implemented, we must comment before a number of auxiliary classes that are used:
- The
Front
interface andArrayFront
class: Frequently, a reference Pareto front is stored in a file containing the objective values of a number of solutions. AFront
is an entity intended to store the contents of these files; in the case of theArrayFront
class, it stores the front into an array of points. - The
FrontNormalizer
class: many indicators normalize the list of solutions to be evaluated, and this class is intended to do this: given a reference front or the maximum and minimum values, it returns a normalized list of solutions.
An example of indicator: Epsilon¶
To illustrate a quality indicator in jMetal 5, we describe next the code of the Epsilon indicator.
The declaration of the Epsilon class is included in this piece of code:
public class Epsilon<Evaluate extends List<? extends Solution<?>>>
extends SimpleDescribedEntity
implements QualityIndicator<Evaluate,Double> {
...
Although at a first glance it seems a very complex declaration, it simply states that Evaluate
must be a List of any kind of jMetal Solution
, so any attempt to use the indicator with a non compatible object will be detected at compiling time.
Our approach to implement most of indicators is to consider that most of them require a reference front to be computed, so that front must be incorporated as a parameter of the class constructor:
private Front referenceParetoFront ;
/**
* Constructor
*
* @param referenceParetoFrontFile
* @throws FileNotFoundException
*/
public Epsilon(String referenceParetoFrontFile) throws FileNotFoundException {
super("EP", "Epsilon quality indicator") ;
if (referenceParetoFrontFile == null) {
throw new JMetalException("The reference pareto front is null");
}
Front front = new ArrayFront(referenceParetoFrontFile);
referenceParetoFront = front ;
}
...
Then, the evaluate
method computes the indicator value by using the reference front:
/**
* Evaluate() method
*
* @param solutionList
* @return
*/
@Override public Double evaluate(Evaluate solutionList) {
if (solutionList == null) {
throw new JMetalException("The pareto front approximation list is null") ;
}
return epsilon(new ArrayFront(solutionList), referenceParetoFront);
}
Readers interested in how the Epsilon is computed can find all the code here
About normalization¶
An important issue to take into account is that quality indicators do not normalize the solution list to be evaluated. Instead, the user can choose if the fronts are normalized or not before using them.
This piece of code shows an example of how reading a reference from a file and how to get a FrontNormalized
from it:
Front referenceFront = new ArrayFront("fileName");
FrontNormalizer frontNormalizer = new FrontNormalizer(referenceFront) ;
Then, the front normalizer can be use to a normalized reference front:
Front normalizedReferenceFront = frontNormalizer.normalize(referenceFront) ;
And then, given any solution list to be normalized, it can be done this way:
List<Solution> population ;
...
Front normalizedFront = frontNormalizer.normalize(new ArrayFront(population)) ;
Using quality indicators¶
One we have decided about normalization, we can create a quality indicator and use it. We select the Hypervolume as an example:
Hypervolume<List<? extends Solution<?>>> hypervolume ;
hypervolume = new Hypervolume<List<? extends Solution<?>>>(referenceFront) ;
double hvValue = hypervolume.evaluate(population) ;
Discussion¶
Leaving the normalization up to the user can be error prone, but there is a performance advantage: if the same indicator has to be applied to many solution lists, the normalization of the reference front is carried out only once. This is the case, for example, when some indicator-based algorithms have to find the solution contributing the least to the Hypervolume.
Computing quality indicators from the command line¶
If you need to compute the value of a given quality indicator of a front of solutions from the command line you can use the CommandLineIndicatorRunner
class.
The usage of this program is:
java org.uma.jmetal.qualityIndicator.CommandLineIndicatorRunner indicatorName referenceFront frontToEvaluate TRUE | FALSE
where indicator name can be:
GD
: Generational distanceIGD
: Inverted generational distanceIGD+
: Inverted generational distance plusEP
: EpsilonHV
: HypervolumeSPREAD
: Spread (two objectives)GSPREAD
: Generalized spread (more than two objectivesER
: Error ratioALL
: Select all the available indicators
The last parameter is used to indicate whether the fronts are to be normalized or not before computing the quality indicators.
We include some examples next. First, we run NSGA-II to solve problem ZDT2
:
$ java org.uma.jmetal.runner.multiobjective.NSGAIIRunner org.uma.jmetal.problem.multiobjective.zdt.ZDT2
ago 01, 2015 6:08:16 PM org.uma.jmetal.runner.multiobjective.NSGAIIRunner main
INFORMACIÓN: Total execution time: 1445ms
ago 01, 2015 6:08:17 PM org.uma.jmetal.runner.AbstractAlgorithmRunner printFinalSolutionSet
INFORMACIÓN: Random seed: 1438445295477
ago 01, 2015 6:08:17 PM org.uma.jmetal.runner.AbstractAlgorithmRunner printFinalSolutionSet
INFORMACIÓN: Objectives values have been written to file FUN.tsv
ago 01, 2015 6:08:17 PM org.uma.jmetal.runner.AbstractAlgorithmRunner printFinalSolutionSet
INFORMACIÓN: Variables values have been written to file VAR.tsv
Now we use CommandLineIndicatorRunner
to compute the Hypervolume value by normalizing first the fronts:
$ java org.uma.jmetal.qualityIndicator.CommandLineIndicatorRunner HV jmetal-problem/src/test/resources/pareto_fronts/ZDT2.pf FUN.tsv TRUE
The fronts are NORMALIZED before computing the indicators
0.32627228626895705
If we are interested in computing all the quality indicators, we execute the following command:
$ java org.uma.jmetal.qualityIndicator.CommandLineIndicatorRunner ALL jmetal-problem/src/test/resources/pareto_fronts/ZDT2.pf FUN.tsv TRUE
The fronts are NORMALIZED before computing the indicators
EP: 0.01141025767271403
HV: 0.32627228626895705
GD: 1.862557951719542E-4
IGD: 1.8204928590462744E-4
IGD+: 0.003435437983027875
SPREAD: 0.33743702454536517
GSPREAD: 0.40369897027563534
R2: 0.19650995040071226
ER: 1.0
SC(refPF, front): 0.89
SC(front, refPF): 0.0
Running algorithms¶
To run an algorithm in jMetal you have two choices: using an IDE or using the command line. We explain both methods in this section. We comment first how to configure a metaheuristic algorithm to solve a problem.
Configuring algorithms¶
In jMetal 5, to configure and run an algorithm we need to write a class for that purpose; we refer to such a class as runner. Configuring an algorithm from an external configuration file is still a missing feature.
We provide at least a runner class for every algorithm included in jMetal. They can be found in the jmetal-exec
module, in the folder https://github.com/jMetal/jMetal/tree/master/jmetal-exec/src/main/java/org/uma/jmetal/runner/multiobjective.
As explanatory examples, we include different runners for the NSGA-II algorithm, showing different ways of configuring and using it:
NSGAIIRunner
: configuration of the standard NSGA-II to solve continuous problems.NSGAIIIntegerRunner
: configuration to solve integer problems.NSGAIIBinaryRunner
: configuration to solve binary problems.NSGAIIMeasuresRunner
: similar toNSGAIIRunner
, but it includes examples of how to use measures.NSGAIIMeasuresWithChartsRunner
: similar toNSGAIIMeasuresRunner
, but plotting a graph showing the evolution of the front during the execution of the algorithm.NSGAIIStoppingByTimeRunner
: example showing how to configure NSGA-II to use a stopping condition based on a predefined time instead of a given number of evaluations.ParallelNSGAIIRunner
: asNSGAIIRunner
but configured to use threads to evaluate the populations in parallel.
We describe next the NSGAIIRunner
class. The Javadoc comment indicates the program parameters: the first one is the class of the problem to solve; the second one, is an optional parameter, indicating the path to a file containing a reference front. This front is an approximation to the optimal Pareto front of the problem to be solved, and in case of being provided, it will be used to compute all the quality indicators available:
public class NSGAIIRunner extends AbstractAlgorithmRunner {
/**
* @param args Command line arguments.
* @throws JMetalException
* @throws FileNotFoundException
* Invoking command: java org.uma.jmetal.runner.multiobjetive.NSGAIIRunner problemName [referenceFront]
*/
public static void main(String[] args) throws JMetalException, FileNotFoundException {
The first part of the main
method declares the type of the problem to solve (a problem dealing with DoubleSolution
individuals in this example) and the operators. The referenceParetoFront
is used to indicate the name of the optional reference front:
Problem<DoubleSolution> problem;
Algorithm<List<DoubleSolution>> algorithm;
CrossoverOperator<DoubleSolution> crossover;
MutationOperator<DoubleSolution> mutation;
SelectionOperator<List<DoubleSolution>, DoubleSolution> selection;
String referenceParetoFront = "" ;
The next group of sentences parse the program arguments. A benchmark problem (ZDT1 in the example) is solved by default when no arguments are indicated:
String problemName ;
if (args.length == 1) {
problemName = args[0];
} else if (args.length == 2) {
problemName = args[0] ;
referenceParetoFront = args[1] ;
} else {
problemName = "org.uma.jmetal.problem.multiobjective.zdt.ZDT1";
referenceParetoFront = "jmetal-problem/src/test/resources/pareto_fronts/ZDT1.pf" ;
}
Next, the problem is loaded using its class name:
problem = ProblemUtils.<DoubleSolution> loadProblem(problemName);
Then, the operators and the algorithm are configured:
double crossoverProbability = 0.9 ;
double crossoverDistributionIndex = 20.0 ;
crossover = new SBXCrossover(crossoverProbability, crossoverDistributionIndex) ;
double mutationProbability = 1.0 / problem.getNumberOfVariables() ;
double mutationDistributionIndex = 20.0 ;
mutation = new PolynomialMutation(mutationProbability, mutationDistributionIndex) ;
selection = new BinaryTournamentSelection<DoubleSolution>(new RankingAndCrowdingDistanceComparator<DoubleSolution>());
algorithm = new NSGAIIBuilder<DoubleSolution>(problem, crossover, mutation)
.setSelectionOperator(selection)
.setMaxEvaluations(25000)
.setPopulationSize(100)
.build() ;
The last step is to run the algorithm and to write the obtained solutions into two files: one for the variable values and one for the objective values; optionally, if a reference front has been provided it also prints the values of all the available quality indicators for the computed results:
AlgorithmRunner algorithmRunner = new AlgorithmRunner.Executor(algorithm)
.execute() ;
List<DoubleSolution> population = algorithm.getResult() ;
long computingTime = algorithmRunner.getComputingTime() ;
JMetalLogger.logger.info("Total execution time: " + computingTime + "ms");
printFinalSolutionSet(population);
if (!referenceParetoFront.equals("")) {
printQualityIndicators(population, referenceParetoFront) ;
}
}
Running an algorithm from an IDE¶
Once you have configured your algorithm, you can use your favorite IDE to execute them. For example, in the case of IntellJ Idea you can select the runner class name and select the option "Run 'NSGAIIRunner.main()'" by clicking with the left mouse button if you intend to run NSGA-II:
As a result of the execution, the following messages are printed into the output console:
jul 27, 2015 4:21:59 PM org.uma.jmetal.runner.multiobjective.NSGAIIRunner main
INFORMACIÓN: Total execution time: 1147ms
jul 27, 2015 4:21:59 PM org.uma.jmetal.runner.AbstractAlgorithmRunner printFinalSolutionSet
INFORMACIÓN: Random seed: 1438006918503
jul 27, 2015 4:21:59 PM org.uma.jmetal.runner.AbstractAlgorithmRunner printFinalSolutionSet
INFORMACIÓN: Objectives values have been written to file FUN.tsv
jul 27, 2015 4:21:59 PM org.uma.jmetal.runner.AbstractAlgorithmRunner printFinalSolutionSet
INFORMACIÓN: Variables values have been written to file VAR.tsv
jul 27, 2015 4:22:00 PM org.uma.jmetal.runner.AbstractAlgorithmRunner printQualityIndicators
INFORMACIÓN:
Hypervolume (N) : 0.6594334269577787
Hypervolume : 0.6594334269577787
Epsilon (N) : 0.012122558511198256
Epsilon : 0.012122558511198256
GD (N) : 2.054388435747992E-4
GD : 2.054388435747992E-4
IGD (N) : 1.8304524180524584E-4
IGD : 1.8304524180524584E-4
IGD+ (N) : 0.003808931172199927
IGD+ : 0.003808931172199927
Spread (N) : 0.34070732976112383
Spread : 0.34070732976112383
R2 (N) : 0.13179198315493879
R2 : 0.13179198315493879
Error ratio : 1.0
The results tagged with (N)
indicate that the fronts are normalized before computing the quality indicator.
Running an algorithm from the command line¶
If you plan to run a jMetal algorithm from the command line, you have to take into account the following requirements:
- Build the project with
mvn package
. This will create, for each subproject (i.e,jmetal-core
,jmetal-problem
,jmetal-algorithm
, andjmetal-exec
), a jar file with all the dependences. - Indicate java the location of these jar files. You have at least two ways of doing it. One is to set the
CLASSPATH
environment variable:
export CLASSPATH=jmetal-core/target/jmetal-core-5.6-jar-with-dependencies.jar:jmetal-problem/target/jmetal-problem-5.6-jar-with-dependencies.jar:jmetal-exec/target/jmetal-exec-5.6-jar-with-dependencies.jar:jmetal-problem/target/jmetal-problem-5.6-jar-with-dependencies.jar
Then you can execute an algorithm this way (we are going to execute NSGA-II):
java org.uma.jmetal.runner.multiobjective.NSGAIIRunner
- The other alternative is to indicate the location of these jar files using the
-cp
or-classpath
options of thejava
command:
java -cp jmetal-exec/target/jmetal-exec-5.0-SNAPSHOT-jar-with-dependencies.jar:jmetal-core/target/jmetal-core-5.0-SNAPSHOT-jar-with-dependencies.jar:jmetal-problem/target/jmetal-problem-5.0-SNAPSHOT-jar-with-dependencies.jar:jmetal-algorithm/target/jmetal-algorithm-5.0-Beta-35-jar-with-dependencies.jar org.uma.jmetal.runner.multiobjective.NSGAIIRunner
This example executes NSGA-II with the default parameters. If you want to solve a given problem its class name must be provided as an argument. For example, to solve the benchmark problem ZDT4
the command would be:
java org.uma.jmetal.runner.multiobjective.NSGAIIRunner org.uma.jmetal.problem.multiobjective.zdt.ZDT4
and the output will be similar to this:
jul 27, 2015 6:48:27 PM org.uma.jmetal.runner.multiobjective.NSGAIIRunner main
INFORMACIÓN: Total execution time: 683ms
jul 27, 2015 6:48:27 PM org.uma.jmetal.runner.AbstractAlgorithmRunner printFinalSolutionSet
INFORMACIÓN: Random seed: 1438015706581
jul 27, 2015 6:48:27 PM org.uma.jmetal.runner.AbstractAlgorithmRunner printFinalSolutionSet
INFORMACIÓN: Objectives values have been written to file FUN.tsv
jul 27, 2015 6:48:27 PM org.uma.jmetal.runner.AbstractAlgorithmRunner printFinalSolutionSet
INFORMACIÓN: Variables values have been written to file VAR.tsv
In the case of problems having a known Pareto front (or a Pareto front approximation), adding the file containing it allows to apply the available quality indicators to the obtained front. This way, the command to solve ZDT4 would be:
java org.uma.jmetal.runner.multiobjective.NSGAIIRunner org.uma.jmetal.problem.multiobjective.zdt.ZDT4 jmetal-problem/src/test/resources/pareto_fronts/ZDT4.pf
and this would be output:
jul 27, 2015 6:49:21 PM org.uma.jmetal.runner.multiobjective.NSGAIIRunner main
INFORMACIÓN: Total execution time: 598ms
jul 27, 2015 6:49:21 PM org.uma.jmetal.runner.AbstractAlgorithmRunner printFinalSolutionSet
INFORMACIÓN: Random seed: 1438015760471
jul 27, 2015 6:49:21 PM org.uma.jmetal.runner.AbstractAlgorithmRunner printFinalSolutionSet
INFORMACIÓN: Objectives values have been written to file FUN.tsv
jul 27, 2015 6:49:21 PM org.uma.jmetal.runner.AbstractAlgorithmRunner printFinalSolutionSet
INFORMACIÓN: Variables values have been written to file VAR.tsv
jul 27, 2015 6:49:21 PM org.uma.jmetal.runner.AbstractAlgorithmRunner printQualityIndicators
INFORMACIÓN:
Hypervolume (N) : 0.6584874391103687
Hypervolume : 0.658491021119803
Epsilon (N) : 0.014508161683056214
Epsilon : 0.014508161681605389
GD (N) : 1.7281971372005978E-4
GD : 1.7281858245371445E-4
IGD (N) : 1.9833943989483466E-4
IGD : 1.9833851420211548E-4
IGD+ (N) : 0.00425088535021156
IGD+ : 0.004250860866635309
Spread (N) : 0.4449171015114183
Spread : 0.44491700055639544
R2 (N) : 0.13208551920620412
R2 : 0.13208472309027727
Error ratio : 1.0
The Solution
interface¶
One of the first decisions that have to be taken when using metaheuristics is to define how to encode or represent the tentative solutions of the problem to solve. Representation strongly depends on the problem and determines the operations (e.g., recombination with other solutions, local search procedures, etc.) that can be applied. Thus, selecting a specific representation has a great impact on the behavior of metaheuristics and, hence, in the quality of the obtained results.
The following figure depicts the basic components that are used for representing solutions in jMetal 5:
where three representations are included: binary, real, and integer. By using this approach, many implementations can be provided for the same encoding, adding an extra degree of flexibility. The use of generics also allows that an attempt to incorrectly assign the value of a variable results in a compilation error, e.g., trying to assign to an int variable the variable value of a
DoubleSolution
.
The code of the Solution
interface is shown next:
package org.uma.jmetal.solution;
public interface Solution<T> extends Serializable {
public void setObjective(int index, double value) ;
public double getObjective(int index) ;
public T getVariableValue(int index) ;
public void setVariableValue(int index, T value) ;
public String getVariableValueString(int index) ;
public int getNumberOfVariables() ;
public int getNumberOfObjectives() ;
public Solution<T> copy() ;
public void setAttribute(Object id, Object value) ;
public Object getAttribute(Object id) ;
}
The interface has methods for accessing both the variables and the objectives of a solution, a copy method, and to methods for accessing solution atributes.
Defining encodings¶
Defining a particular encoding implies implementing or extending the Solution
interface. This way, the interfaces for solutions having a list of double and integer variables are defined as follows:
package org.uma.jmetal.solution;
public interface DoubleSolution extends Solution<Double> {
public Double getLowerBound(int index) ;
public Double getUpperBound(int index) ;
}
package org.uma.jmetal.solution;
public interface IntegerSolution extends Solution<Integer> {
public Integer getLowerBound(int index) ;
public Integer getUpperBound(int index) ;
}
These interfaces provide for getting the lower and upper bounds of the double and integer variables. The way of setting those values are left to the implementation classes.
In the case of a binary solution, the interface is:
import org.uma.jmetal.util.binarySet.BinarySet;
public interface BinarySolution extends Solution<BinarySet> {
public int getNumberOfBits(int index) ;
public int getTotalNumberOfBits() ;
}
assuming that we intend to represent a list of binary variables.
The adopted approach allows to define encodings having mixed variables. For example, this interface defines solutions composed of lists of double and integer values:
package org.uma.jmetal.solution;
public interface IntegerDoubleSolution extends Solution<Number> {
public Number getLowerBound(int index) ;
public Number getUpperBound(int index) ;
public int getNumberOfIntegerVariables() ;
public int getNumberOfDoubleVariables() ;
}
Implementing solutions¶
Once we have defined a set of interfaces for the different solutions, we provide default implementions to all of them. Our approach is to take as starting point an abstract class named AbstractGenericSolution
:
package org.uma.jmetal.solution.impl;
public abstract class AbstractGenericSolution<T, P extends Problem<?>> implements Solution<T> {
private double[] objectives;
private List<T> variables;
protected P problem ;
protected double overallConstraintViolationDegree ;
protected int numberOfViolatedConstraints ;
protected Map<Object, Object> attributes ;
protected final JMetalRandom randomGenerator ;
which contains an implementation to all the methods in Solution
. This class is extended by all the solution implementations in jMetal 5: DefaultBinarySolution
, DefaultIntegerSolution
, DefaultDoubleSolution
, DefaultIntegerDoubleSolution
, DefaultIntegerPermutationSolution
, and DefaultDoubleBinarySolution
.
Where are the populations?¶
In jMetal 5 there is not any class to represent the concept of population. Instead, a Java List
of Solution
objects is used.
Some examples:
/* A population of double solutions */
List<DoubleSolution> doublePopulation ;
/* The same population using the generic interface */
List<Solution<Double>> doublePopulation ;
/* A population of binary solutions */
List<BinarySolucion> binaryPopulation ;
An utility class called SolutionListUtils
offers a set of operations over solution lists, such as finding the best/worst solution, selecting solutions randomly, etc.
Solution attributes¶
The idea of incorporating attributes is to allow to add specific fields to solutions that are needed by some algorithms. For example, NSGA-II requires to rank the solutions and assign them the value of the crowding distance, while SPEA2 assigns a raw fitness to the solutions.
The attributes manipulated directly, but we include also this utility interface:
package org.uma.jmetal.util.solutionattribute;
/**
* Attributes allows to extend the {@link Solution} classes to incorporate data required by
* operators or algorithms manipulating them.
*
* @author Antonio J. Nebro <antonio@lcc.uma.es>
*/
public interface SolutionAttribute <S extends Solution<?>, V> {
public void setAttribute(S solution, V value) ;
public V getAttribute(S solution) ;
public Object getAttributeID() ;
}
and a default implementation:
package org.uma.jmetal.util.solutionattribute.impl;
public class GenericSolutionAttribute <S extends Solution<?>, V> implements SolutionAttribute<S, V>{
@SuppressWarnings("unchecked")
@Override
public V getAttribute(S solution) {
return (V)solution.getAttribute(getAttributeID());
}
@Override
public void setAttribute(S solution, V value) {
solution.setAttribute(getAttributeID(), value);
}
@Override
public Object getAttributeID() {
return this.getClass() ;
}
}
Note that in the current implementation the getAttributedID()
returns a class identifier. This means that we cannot have two different attributes of the same class.
Example of attribute: constraints¶
Optimization problems can have side constraints, and this implies that evaluating a solution requires to compute the objective functions and also the constraints to apply some kind of constraint handling mechanism. In jMetal 5 solution attributes are used to incorporate constraint information into the solutions.
The default constraint handling mechanism in jMetal is the overall constraing violation scheme defined in NSGA-II, so the following class is provided:
package org.uma.jmetal.util.solutionattribute.impl;
public class OverallConstraintViolation<S extends Solution<?>> extends GenericSolutionAttribute<S, Double> {
}
It is an empty class extending GenericSolutionAttribute
specifying a double value for the attribute. Typically, the constraints are evaluted in the class defining the problem as is shown in this example:
package org.uma.jmetal.problem.multiobjective;
/** Class representing problem Binh2 */
public class Binh2 extends AbstractDoubleProblem implements ConstrainedProblem<DoubleSolution> {
public OverallConstraintViolation<DoubleSolution> overallConstraintViolationDegree ;
public NumberOfViolatedConstraints<DoubleSolution> numberOfViolatedConstraints ;
/**
* Constructor
* Creates a default instance of the Binh2 problem
*/
public Binh2() {
...
overallConstraintViolationDegree = new OverallConstraintViolation<DoubleSolution>() ;
numberOfViolatedConstraints = new NumberOfViolatedConstraints<DoubleSolution>() ;
}
/** Evaluate() method */
@Override
public void evaluate(DoubleSolution solution) {
...
}
/** EvaluateConstraints() method */
@Override
public void evaluateConstraints(DoubleSolution solution) {
double[] constraint = new double[this.getNumberOfConstraints()];
double x0 = solution.getVariableValue(0) ;
double x1 = solution.getVariableValue(1) ;
constraint[0] = -1.0 * (x0 - 5) * (x0 - 5) - x1 * x1 + 25.0;
constraint[1] = (x0 - 8) * (x0 - 8) + (x1 + 3) * (x1 + 3) - 7.7;
double overallConstraintViolation = 0.0;
int violatedConstraints = 0;
for (int i = 0; i < this.getNumberOfConstraints(); i++) {
if (constraint[i] < 0.0) {
overallConstraintViolation += constraint[i];
violatedConstraints++;
}
}
overallConstraintViolationDegree.setAttribute(solution, overallConstraintViolation);
numberOfViolatedConstraints.setAttribute(solution, violatedConstraints);
}
This code includes also another attribute, called NumberOfViolatedConstraints
that is used to set the number of violated constraints of a given solution.
Example of attribute: ranking¶
The use of solution attributes can be encapsulated. As an example, we have defined the following interface to assign a rank to a solution (i.e, NSGA-II’s ranking):
package org.uma.jmetal.util.solutionattribute;
import java.util.List;
/**
* Ranks a list of solutions according to the dominance relationship
*
* @author Antonio J. Nebro <antonio@lcc.uma.es>
*/
public interface Ranking<S extends Solution<?>> extends SolutionAttribute<S, Integer>{
public Ranking<S> computeRanking(List<S> solutionList) ;
public List<S> getSubfront(int rank) ;
public int getNumberOfSubfronts() ;
}
so that a client class (e.g., the NSGAII
class) can merely use:
Ranking ranking = computeRanking(jointPopulation);
This way, the solution attribute is managed internally by the class implementing the ranking and is hidden to the metaheuristic.
API documentation¶
org.uma.jmetal.algorithm¶
Algorithm¶
-
public interface
Algorithm
<Result> extends Runnable, Serializable, DescribedEntity¶ Interface representing an algorithm
Author: Antonio J. Nebro
Parameters: - <Result> – Result
org.uma.jmetal.algorithm.impl¶
AbstractCoralReefsOptimization¶
-
public abstract class
AbstractCoralReefsOptimization
<S, R> implements Algorithm<R>¶ Abstract class representing a Coral Reefs Optimization Algorithm Reference: S. Salcedo-Sanz, J. Del Ser, S. Gil-López, I. Landa-Torres and J. A. Portilla-Figueras, “The coral reefs optimization algorithm: an efficient meta-heuristic for solving hard optimization problems,” 15th Applied Stochastic Models and Data Analysis International Conference, Mataró, Spain, June, 2013.
Author: Inacio Medeiros
Fields¶
comparator¶
-
protected Comparator<S>
comparator
¶
coordinates¶
-
protected List<Coordinate>
coordinates
¶
crossoverOperator¶
-
protected CrossoverOperator<S>
crossoverOperator
¶
mutationOperator¶
-
protected MutationOperator<S>
mutationOperator
¶
selectionOperator¶
-
protected SelectionOperator<List<S>, S>
selectionOperator
¶
Constructors¶
AbstractCoralReefsOptimization¶
-
public
AbstractCoralReefsOptimization
(Comparator<S> comparator, SelectionOperator<List<S>, S> selectionOperator, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, int n, int m, double rho, double fbs, double fa, double pd, int attemptsToSettle)¶ Constructor
Parameters: - comparator – Object for comparing two solutions
- selectionOperator – Selection Operator
- crossoverOperator – Crossover Operator
- mutationOperator – Mutation Operator
- n – width of Coral Reef Grid
- m – height of Coral Reef Grid
- rho – Percentage of occupied reef
- fbs – Percentage of broadcast spawners
- fa – Percentage of budders
- pd – Probability of depredation
- attemptsToSettle – number of attempts a larvae has to try to settle reef
Methods¶
depredation¶
-
protected abstract List<S>
depredation
(List<S> population, List<Coordinate> coordinates)¶
generateCoordinates¶
-
protected abstract List<Coordinate>
generateCoordinates
()¶
getCoordinates¶
-
public List<Coordinate>
getCoordinates
()¶
larvaeSettlementPhase¶
setCoordinates¶
-
public void
setCoordinates
(List<Coordinate> coordinates)¶
AbstractCoralReefsOptimization.Coordinate¶
-
public static class
Coordinate
implements Comparable<Coordinate>¶ Represents a Coordinate in Coral Reef Grid
Author: inacio-medeiros
Constructors¶
AbstractDifferentialEvolution¶
-
public abstract class
AbstractDifferentialEvolution
<Result> extends AbstractEvolutionaryAlgorithm<DoubleSolution, Result>¶ Abstract class representing differential evolution (DE) algorithms
Author: Antonio J. Nebro
Fields¶
crossoverOperator¶
-
protected DifferentialEvolutionCrossover
crossoverOperator
¶
selectionOperator¶
-
protected DifferentialEvolutionSelection
selectionOperator
¶
AbstractEvolutionStrategy¶
-
public abstract class
AbstractEvolutionStrategy
<S, Result> extends AbstractEvolutionaryAlgorithm<S, Result>¶ Abstract class representing an evolution strategy algorithm
Author: Antonio J. Nebro
Fields¶
mutationOperator¶
-
protected MutationOperator<S>
mutationOperator
¶
Constructors¶
Methods¶
getMutationOperator¶
-
public MutationOperator<S>
getMutationOperator
()¶
AbstractEvolutionaryAlgorithm¶
AbstractGeneticAlgorithm¶
-
public abstract class
AbstractGeneticAlgorithm
<S, Result> extends AbstractEvolutionaryAlgorithm<S, Result>¶ Abstract class representing a genetic algorithm
Author: Antonio J. Nebro
Fields¶
crossoverOperator¶
-
protected CrossoverOperator<S>
crossoverOperator
¶
mutationOperator¶
-
protected MutationOperator<S>
mutationOperator
¶
selectionOperator¶
-
protected SelectionOperator<List<S>, S>
selectionOperator
¶
Constructors¶
Methods¶
checkNumberOfParents¶
createInitialPopulation¶
getCrossoverOperator¶
-
public CrossoverOperator<S>
getCrossoverOperator
()¶
getMutationOperator¶
-
public MutationOperator<S>
getMutationOperator
()¶
getSelectionOperator¶
-
public SelectionOperator<List<S>, S>
getSelectionOperator
()¶
reproduction¶
-
protected List<S>
reproduction
(List<S> population)¶ This methods iteratively applies a
CrossoverOperator
aMutationOperator
to the population to create the offspring population. The population size must be divisible by the number of parents required by theCrossoverOperator
; this way, the needed parents are taken sequentially from the population. No limits are imposed to the number of solutions returned by theCrossoverOperator
.Parameters: - population –
Returns: The new created offspring population
selection¶
-
protected List<S>
selection
(List<S> population)¶ This method iteratively applies a
SelectionOperator
to the population to fill the mating pool population.Parameters: - population –
Returns: The mating pool population
AbstractParticleSwarmOptimization¶
-
public abstract class
AbstractParticleSwarmOptimization
<S, Result> implements Algorithm<Result>¶ Abstract class representing a PSO algorithm
Author: Antonio J. Nebro
Methods¶
AbstractScatterSearch¶
org.uma.jmetal.algorithm.multiobjective.abyss¶
ABYSS¶
-
public class
ABYSS
extends AbstractScatterSearch<DoubleSolution, List<DoubleSolution>>¶ This class implements the AbYSS algorithm, a multiobjective scatter search metaheuristics, which is described in: A.J. Nebro, F. Luna, E. Alba, B. Dorronsoro, J.J. Durillo, A. Beham “AbYSS: Adapting Scatter Search to Multiobjective Optimization.” IEEE Transactions on Evolutionary Computation. Vol. 12, No. 4 (August 2008), pp. 439-457
Author: Antonio J. Nebro , Cristobal Barba
Fields¶
archive¶
-
protected Archive<DoubleSolution>
archive
¶
crossover¶
-
protected CrossoverOperator<DoubleSolution>
crossover
¶
crowdingDistanceComparator¶
-
protected Comparator<DoubleSolution>
crowdingDistanceComparator
¶
distanceToSolutionListAttribute¶
-
protected DistanceToSolutionListAttribute
distanceToSolutionListAttribute
¶
dominanceComparator¶
-
protected Comparator<DoubleSolution>
dominanceComparator
¶
equalComparator¶
-
protected Comparator<DoubleSolution>
equalComparator
¶
fitnessComparator¶
-
protected Comparator<DoubleSolution>
fitnessComparator
¶
localSearch¶
-
protected LocalSearchOperator<DoubleSolution>
localSearch
¶
marked¶
-
protected MarkAttribute
marked
¶
numberOfSubRanges¶
-
protected int
numberOfSubRanges
¶ These variables are used in the diversification method.
problem¶
-
protected final Problem<DoubleSolution>
problem
¶
randomGenerator¶
-
protected JMetalRandom
randomGenerator
¶
referenceSet1¶
-
protected List<DoubleSolution>
referenceSet1
¶
referenceSet2¶
-
protected List<DoubleSolution>
referenceSet2
¶
strengthRawFitness¶
-
protected StrengthRawFitness<DoubleSolution>
strengthRawFitness
¶
Constructors¶
ABYSS¶
-
public
ABYSS
(DoubleProblem problem, int maxEvaluations, int populationSize, int referenceSet1Size, int referenceSet2Size, int archiveSize, Archive<DoubleSolution> archive, LocalSearchOperator<DoubleSolution> localSearch, CrossoverOperator<DoubleSolution> crossoverOperator, int numberOfSubRanges)¶
Methods¶
buildNewReferenceSet1¶
-
public void
buildNewReferenceSet1
()¶ Build the referenceSet1 by moving the best referenceSet1Size individuals, according to a fitness comparator, from the population to the referenceSet1
buildNewReferenceSet2¶
-
public void
buildNewReferenceSet2
()¶ Build the referenceSet2 by moving to it the most diverse referenceSet2Size individuals from the population in respect to the referenceSet1. The size of the referenceSet2 can be lower than referenceSet2Size depending on the current size of the population
diversificationGeneration¶
-
public DoubleSolution
diversificationGeneration
()¶
generatePairsFromSolutionList¶
-
public List<List<DoubleSolution>>
generatePairsFromSolutionList
(List<DoubleSolution> solutionList)¶ Generate all pair combinations of the referenceSet1
getResult¶
-
public List<DoubleSolution>
getResult
()¶
improvement¶
-
public DoubleSolution
improvement
(DoubleSolution solution)¶
refSet1Test¶
-
public boolean
refSet1Test
(DoubleSolution solution)¶ Tries to update the reference set one with a solution
Parameters: - solution – The
Solution
Returns: true if the
Solution
has been inserted, false otherwise.- solution – The
refSet2Test¶
-
public boolean
refSet2Test
(DoubleSolution solution)¶ Try to update the reference set 2 with a
Solution
Parameters: - solution – The
Solution
Throws: - JMException –
Returns: true if the
Solution
has been inserted, false otherwise.- solution – The
referenceSetUpdate¶
-
public void
referenceSetUpdate
()¶ Build the reference set after the initialization phase
referenceSetUpdate¶
-
public void
referenceSetUpdate
(DoubleSolution solution)¶ Update the reference set with a new solution
Parameters: - solution –
restartConditionIsFulfilled¶
-
public boolean
restartConditionIsFulfilled
(List<DoubleSolution> combinedSolutions)¶
solutionCombination¶
-
public List<DoubleSolution>
solutionCombination
(List<List<DoubleSolution>> solutionList)¶
subsetGeneration¶
-
public List<List<DoubleSolution>>
subsetGeneration
()¶ Subset generation method
ABYSSBuilder¶
-
public class
ABYSSBuilder
implements AlgorithmBuilder<ABYSS>¶ Author: Cristobal Barba
Fields¶
improvementOperator¶
-
protected LocalSearchOperator<DoubleSolution>
improvementOperator
¶
Constructors¶
ABYSSBuilder¶
-
public
ABYSSBuilder
(DoubleProblem problem, Archive<DoubleSolution> archive)¶
Methods¶
getCrossoverOperator¶
-
public CrossoverOperator<DoubleSolution>
getCrossoverOperator
()¶
getImprovementOperator¶
-
public LocalSearchOperator<DoubleSolution>
getImprovementOperator
()¶
getMutationOperator¶
-
public MutationOperator<DoubleSolution>
getMutationOperator
()¶
setArchiveSize¶
-
public ABYSSBuilder
setArchiveSize
(int archiveSize)¶
setCrossoverOperator¶
-
public ABYSSBuilder
setCrossoverOperator
(CrossoverOperator<DoubleSolution> crossoverOperator)¶
setImprovementOperator¶
-
public ABYSSBuilder
setImprovementOperator
(ArchiveMutationLocalSearch<DoubleSolution> improvementOperator)¶
setMaxEvaluations¶
-
public ABYSSBuilder
setMaxEvaluations
(int maxEvaluations)¶
setMutationOperator¶
-
public ABYSSBuilder
setMutationOperator
(MutationOperator<DoubleSolution> mutationOperator)¶
setNumberOfSubranges¶
-
public ABYSSBuilder
setNumberOfSubranges
(int numberOfSubranges)¶
setPopulationSize¶
-
public ABYSSBuilder
setPopulationSize
(int populationSize)¶
setRefSet1Size¶
-
public ABYSSBuilder
setRefSet1Size
(int refSet1Size)¶
setRefSet2Size¶
-
public ABYSSBuilder
setRefSet2Size
(int refSet2Size)¶
ABYSSIT¶
-
public class
ABYSSIT
¶ Created by ajnebro on 11/6/15.
Fields¶
algorithm¶
-
Algorithm<List<DoubleSolution>>
algorithm
¶
archive¶
-
Archive<DoubleSolution>
archive
¶
crossover¶
-
CrossoverOperator<DoubleSolution>
crossover
¶
localSearchOperator¶
-
LocalSearchOperator<DoubleSolution>
localSearchOperator
¶
mutation¶
-
MutationOperator<DoubleSolution>
mutation
¶
problem¶
-
DoubleProblem
problem
¶
ABYSSTest¶
-
public class
ABYSSTest
¶ Created by ajnebro on 11/6/15.
Fields¶
archive¶
-
Archive<DoubleSolution>
archive
¶
localSearch¶
-
LocalSearchOperator<DoubleSolution>
localSearch
¶
mutation¶
-
MutationOperator<DoubleSolution>
mutation
¶
problem¶
-
DoubleProblem
problem
¶
Methods¶
shouldInitializationPhaseLeadToAPopulationFilledWithEvaluatedSolutions¶
-
public void
shouldInitializationPhaseLeadToAPopulationFilledWithEvaluatedSolutions
()¶
shouldIsStoppingConditionReachedReturnFalseIfTheConditionDoesNotFulfill¶
-
public void
shouldIsStoppingConditionReachedReturnFalseIfTheConditionDoesNotFulfill
()¶
shouldIsStoppingConditionReachedReturnTrueIfTheConditionFulfills¶
-
public void
shouldIsStoppingConditionReachedReturnTrueIfTheConditionFulfills
()¶
shouldReferenceSetUpdateCreateAReducedSizeReferenceSet2IfThePopulationIsNotBigEnough¶
-
public void
shouldReferenceSetUpdateCreateAReducedSizeReferenceSet2IfThePopulationIsNotBigEnough
()¶
shouldReferenceSetUpdateCreateTheTwoRefSetsAfterBeingInvokedTheFirstTime¶
-
public void
shouldReferenceSetUpdateCreateTheTwoRefSetsAfterBeingInvokedTheFirstTime
()¶
shouldRestartCreateANewPopulationWithTheRefSet1Solutions¶
-
public void
shouldRestartCreateANewPopulationWithTheRefSet1Solutions
()¶
org.uma.jmetal.algorithm.multiobjective.abyss.util¶
MarkAttribute¶
-
public class
MarkAttribute
extends GenericSolutionAttribute<Solution<?>, Boolean>¶ Created by cbarba on 24/3/15.
org.uma.jmetal.algorithm.multiobjective.artificialdecisionmaker¶
org.uma.jmetal.algorithm.multiobjective.cdg¶
AbstractCDG¶
-
public abstract class
AbstractCDG
<S extends Solution<?>> implements Algorithm<List<S>>¶ Abstract class for implementing versions of the CDG algorithm.
Author: Feng Zhang
Fields¶
childGridNum¶
-
protected int
childGridNum_
¶
crossoverOperator¶
-
protected CrossoverOperator<S>
crossoverOperator
¶
gridDetalSum¶
-
protected double[][]
gridDetalSum_
¶
neighborhoodSelectionProbability¶
-
protected double
neighborhoodSelectionProbability
¶ Delta in Zhang & Li paper
randomGenerator¶
-
protected JMetalRandom
randomGenerator
¶
subproblemNum¶
-
protected int
subproblemNum_
¶
Constructors¶
AbstractCDG¶
-
public
AbstractCDG
(Problem<S> problem, int populationSize, int resultPopulationSize, int maxEvaluations, CrossoverOperator<S> crossoverOperator, double neighborhoodSelectionProbability, double sigma_, int k_, int t_, int subproblemNum_, int childGrid_, int childGridNum_)¶
Methods¶
chooseNeighborType¶
-
protected NeighborType
chooseNeighborType
(int i)¶
matingSelection¶
-
protected List<Integer>
matingSelection
(int subproblemId, int numberOfSolutionsToSelect, NeighborType neighbourType)¶ Parameters: - subproblemId – the id of current subproblem
- neighbourType – neighbour type
parentSelection¶
-
protected List<S>
parentSelection
(int subProblemId, NeighborType neighborType)¶
AbstractCDG.NeighborType¶
-
protected enum
NeighborType
¶
Enum Constants¶
NEIGHBOR¶
-
public static final AbstractCDG.NeighborType
NEIGHBOR
¶
POPULATION¶
-
public static final AbstractCDG.NeighborType
POPULATION
¶
CDG¶
-
public class
CDG
extends AbstractCDG<DoubleSolution>¶ Xinye Cai, Zhiwei Mei, Zhun Fan, Qingfu Zhang, A Constrained Decomposition Approach with Grids for Evolutionary Multiobjective Optimization, IEEE Transaction on Evolutionary Computation, press online, 2018, DOI: 10.1109/TEVC.2017.2744674 The paper and Matlab code can be download at http://xinyecai.github.io/
Author: Feng Zhang
Constructors¶
CDG¶
-
public
CDG
(Problem<DoubleSolution> problem, int populationSize, int resultPopulationSize, int maxEvaluations, CrossoverOperator<DoubleSolution> crossover, double neighborhoodSelectionProbability, double sigma_, int k_, int t_, int subproblemNum_, int childGrid_, int childGridNum_)¶
CDGBuilder¶
-
public class
CDGBuilder
implements AlgorithmBuilder<AbstractCDG<DoubleSolution>>¶ Builder class for algorithm CDG
Author: Feng Zhang
Fields¶
childGridNum¶
-
protected int
childGridNum_
¶
crossover¶
-
protected CrossoverOperator<DoubleSolution>
crossover
¶
neighborhoodSelectionProbability¶
-
protected double
neighborhoodSelectionProbability
¶ Delta in Zhang & Li paper
problem¶
-
protected Problem<DoubleSolution>
problem
¶
subproblemNum¶
-
protected int
subproblemNum_
¶
Constructors¶
CDGBuilder¶
-
public
CDGBuilder
(Problem<DoubleSolution> problem)¶ Constructor
Methods¶
build¶
-
public AbstractCDG<DoubleSolution>
build
()¶
getCrossover¶
-
public CrossoverOperator<DoubleSolution>
getCrossover
()¶
setChildGrid¶
-
public CDGBuilder
setChildGrid
(int childGrid)¶
setChildGridNum¶
-
public CDGBuilder
setChildGridNum
(int childGridNum)¶
setCrossover¶
-
public CDGBuilder
setCrossover
(CrossoverOperator<DoubleSolution> crossover)¶
setK¶
-
public CDGBuilder
setK
(int k)¶
setMaxEvaluations¶
-
public CDGBuilder
setMaxEvaluations
(int maxEvaluations)¶
setNeighborhoodSelectionProbability¶
-
public CDGBuilder
setNeighborhoodSelectionProbability
(double neighborhoodSelectionProbability)¶
setNumberOfThreads¶
-
public CDGBuilder
setNumberOfThreads
(int numberOfThreads)¶
setPopulationSize¶
-
public CDGBuilder
setPopulationSize
(int populationSize)¶
setResultPopulationSize¶
-
public CDGBuilder
setResultPopulationSize
(int resultPopulationSize)¶
setT¶
-
public CDGBuilder
setT
(int t)¶
org.uma.jmetal.algorithm.multiobjective.cellde¶
CellDE45¶
-
public class
CellDE45
implements Algorithm<List<DoubleSolution>>¶ Author: Antonio J. Nebro
Constructors¶
CellDE45¶
-
public
CellDE45
(Problem<DoubleSolution> problem, int maxEvaluations, int populationSize, BoundedArchive<DoubleSolution> archive, Neighborhood<DoubleSolution> neighborhood, SelectionOperator<List<DoubleSolution>, DoubleSolution> selection, DifferentialEvolutionCrossover crossover, double feedback, SolutionListEvaluator<DoubleSolution> evaluator)¶
Methods¶
computeRanking¶
-
protected Ranking<DoubleSolution>
computeRanking
(List<DoubleSolution> solutionList)¶
createInitialPopulation¶
-
protected List<DoubleSolution>
createInitialPopulation
()¶
evaluatePopulation¶
-
protected List<DoubleSolution>
evaluatePopulation
(List<DoubleSolution> population)¶
getResult¶
-
public List<DoubleSolution>
getResult
()¶
org.uma.jmetal.algorithm.multiobjective.dmopso¶
DMOPSO¶
-
public class
DMOPSO
implements Algorithm<List<DoubleSolution>>¶
Constructors¶
DMOPSO¶
-
public
DMOPSO
(DoubleProblem problem, int swarmSize, int maxIterations, double r1Min, double r1Max, double r2Min, double r2Max, double c1Min, double c1Max, double c2Min, double c2Max, double weightMin, double weightMax, double changeVelocity1, double changeVelocity2, FunctionType functionType, String dataDirectory, int maxAge)¶
DMOPSO¶
-
public
DMOPSO
(DoubleProblem problem, int swarmSize, int maxIterations, double r1Min, double r1Max, double r2Min, double r2Max, double c1Min, double c1Max, double c2Min, double c2Max, double weightMin, double weightMax, double changeVelocity1, double changeVelocity2, FunctionType functionType, String dataDirectory, int maxAge, String name)¶
Methods¶
createInitialSwarm¶
-
protected List<DoubleSolution>
createInitialSwarm
()¶
evaluateSwarm¶
-
protected List<DoubleSolution>
evaluateSwarm
(List<DoubleSolution> swarm)¶
getResult¶
-
public List<DoubleSolution>
getResult
()¶
getSwarm¶
-
public List<DoubleSolution>
getSwarm
()¶
initializeLeaders¶
-
protected void
initializeLeaders
(List<DoubleSolution> swarm)¶
initializeParticlesMemory¶
-
protected void
initializeParticlesMemory
(List<DoubleSolution> swarm)¶
initializeVelocity¶
-
protected void
initializeVelocity
(List<DoubleSolution> swarm)¶
DMOPSO.FunctionType¶
-
public enum
FunctionType
¶
Enum Constants¶
AGG¶
-
public static final DMOPSO.FunctionType
AGG
¶
PBI¶
-
public static final DMOPSO.FunctionType
PBI
¶
TCHE¶
-
public static final DMOPSO.FunctionType
TCHE
¶
DMOPSOBuilder¶
-
public class
DMOPSOBuilder
implements AlgorithmBuilder<DMOPSO>¶ Author: Jorge Rodriguez
Constructors¶
DMOPSOBuilder¶
-
public
DMOPSOBuilder
(DoubleProblem problem)¶
Methods¶
getEvaluator¶
-
public SolutionListEvaluator<DoubleSolution>
getEvaluator
()¶
getFunctionType¶
-
public DMOPSO.FunctionType
getFunctionType
()¶
getProblem¶
-
public DoubleProblem
getProblem
()¶
setC1Max¶
-
public DMOPSOBuilder
setC1Max
(double c1Max)¶
setC1Min¶
-
public DMOPSOBuilder
setC1Min
(double c1Min)¶
setC2Max¶
-
public DMOPSOBuilder
setC2Max
(double c2Max)¶
setC2Min¶
-
public DMOPSOBuilder
setC2Min
(double c2Min)¶
setChangeVelocity1¶
-
public DMOPSOBuilder
setChangeVelocity1
(double changeVelocity1)¶
setChangeVelocity2¶
-
public DMOPSOBuilder
setChangeVelocity2
(double changeVelocity2)¶
setDataDirectory¶
-
public DMOPSOBuilder
setDataDirectory
(String dataDirectory)¶
setFunctionType¶
-
public DMOPSOBuilder
setFunctionType
(DMOPSO.FunctionType functionType)¶
setMaxAge¶
-
public DMOPSOBuilder
setMaxAge
(int maxAge)¶
setMaxIterations¶
-
public DMOPSOBuilder
setMaxIterations
(int maxIterations)¶
setName¶
-
public DMOPSOBuilder
setName
(String name)¶
setR1Max¶
-
public DMOPSOBuilder
setR1Max
(double r1Max)¶
setR1Min¶
-
public DMOPSOBuilder
setR1Min
(double r1Min)¶
setR2Max¶
-
public DMOPSOBuilder
setR2Max
(double r2Max)¶
setR2Min¶
-
public DMOPSOBuilder
setR2Min
(double r2Min)¶
setRandomGenerator¶
-
public DMOPSOBuilder
setRandomGenerator
(PseudoRandomGenerator randomGenerator)¶
setSolutionListEvaluator¶
-
public DMOPSOBuilder
setSolutionListEvaluator
(SolutionListEvaluator<DoubleSolution> evaluator)¶
setSwarmSize¶
-
public DMOPSOBuilder
setSwarmSize
(int swarmSize)¶
setVariant¶
-
public DMOPSOBuilder
setVariant
(DMOPSOVariant variant)¶
setWeightMax¶
-
public DMOPSOBuilder
setWeightMax
(double weightMax)¶
setWeightMin¶
-
public DMOPSOBuilder
setWeightMin
(double weightMin)¶
DMOPSOBuilder.DMOPSOVariant¶
-
public enum
DMOPSOVariant
¶
Enum Constants¶
DMOPSO¶
-
public static final DMOPSOBuilder.DMOPSOVariant
DMOPSO
¶
Measures¶
-
public static final DMOPSOBuilder.DMOPSOVariant
Measures
¶
DMOPSOMeasures¶
-
public class
DMOPSOMeasures
extends DMOPSO implements Measurable¶
Fields¶
durationMeasure¶
-
protected DurationMeasure
durationMeasure
¶
epsilonValue¶
-
protected BasicMeasure<Double>
epsilonValue
¶
hypervolumeValue¶
-
protected BasicMeasure<Double>
hypervolumeValue
¶
iterations¶
-
protected CountingMeasure
iterations
¶
measureManager¶
-
protected SimpleMeasureManager
measureManager
¶
solutionListMeasure¶
-
protected BasicMeasure<List<DoubleSolution>>
solutionListMeasure
¶
Constructors¶
DMOPSOMeasures¶
-
public
DMOPSOMeasures
(DoubleProblem problem, int swarmSize, int maxIterations, double r1Min, double r1Max, double r2Min, double r2Max, double c1Min, double c1Max, double c2Min, double c2Max, double weightMin, double weightMax, double changeVelocity1, double changeVelocity2, FunctionType functionType, String dataDirectory, int maxAge)¶
DMOPSOMeasures¶
-
public
DMOPSOMeasures
(DoubleProblem problem, int swarmSize, int maxIterations, double r1Min, double r1Max, double r2Min, double r2Max, double c1Min, double c1Max, double c2Min, double c2Max, double weightMin, double weightMax, double changeVelocity1, double changeVelocity2, FunctionType functionType, String dataDirectory, int maxAge, String name)¶
Methods¶
getMeasureManager¶
-
public MeasureManager
getMeasureManager
()¶
org.uma.jmetal.algorithm.multiobjective.espea¶
ESPEA¶
-
public class
ESPEA
<S extends Solution<?>> extends AbstractGeneticAlgorithm<S, List<S>>¶ Implementation of the Electrostatic Potential Energy Evolutionary Algorithm (ESPEA) from the paper “Obtaining Optimal Pareto Front Approximations using Scalarized Preference Information” by M. Braun et al.
The algorithm generates preference-biased Pareto front approximations that cover the entire front but focus more solutions in those regions that are interesting to the decision maker. Preferences are presented to the algorithm in the form of a scalarization function (value function) that maps the vector of objective to a real value. Smaller values are deemed to indicate higher desirability to comply with minimization.
If no scalarized preference is specified, uniform preferences are assumed and ESPEA generates a uniform approximation of the Pareto front.
Author: Marlon Braun
Fields¶
archive¶
-
protected final EnergyArchive<S>
archive
¶ An archive of nondominated solutions that approximates the energy minimum state based on the chosen scalarization function.
evaluations¶
-
protected int
evaluations
¶ The number of function evaluations that have been executed so far.
evaluator¶
-
protected final SolutionListEvaluator<S>
evaluator
¶ Evaluates the solutions
fullArchiveCrossoverOperator¶
-
protected CrossoverOperator<S>
fullArchiveCrossoverOperator
¶ ESPEA uses two different crossover operators depending on the current archive size. If the archive is not full, it uses the crossover operator provided by
getCrossoverOperator()
. If the archive is full,fullArchiveCrossoverOperator
is used.
Constructors¶
ESPEA¶
-
public
ESPEA
(Problem<S> problem, int maxEvaluations, int populationSize, CrossoverOperator<S> crossoverOperator, CrossoverOperator<S> fullArchiveCrossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, ScalarizationWrapper scalarizationWrapper, SolutionListEvaluator<S> evaluator, boolean normalizeObjectives, ReplacementStrategy replacementStrategy)¶ Constructor for setting all parameters of ESPEA.
Methods¶
ESPEABuilder¶
-
public class
ESPEABuilder
<S extends Solution<?>> implements AlgorithmBuilder<ESPEA<S>>¶
Constructors¶
ESPEABuilder¶
-
public
ESPEABuilder
(Problem<S> problem, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator)¶
Methods¶
getCrossoverOperator¶
-
public CrossoverOperator<S>
getCrossoverOperator
()¶ Returns: the crossoverOperator
getEvaluator¶
-
public SolutionListEvaluator<S>
getEvaluator
()¶ Returns: the evaluator
getFullArchiveCrossoverOperator¶
-
public CrossoverOperator<S>
getFullArchiveCrossoverOperator
()¶ Returns: the fullArchiveCrossoverOperator
getMutationOperator¶
-
public MutationOperator<S>
getMutationOperator
()¶ Returns: the mutationOperator
getOperationType¶
-
public ReplacementStrategy
getOperationType
()¶ Returns: the replacement strategy
getScalarization¶
-
public ScalarizationWrapper
getScalarization
()¶ Returns: the scalarization
getSelectionOperator¶
-
public SelectionOperator<List<S>, S>
getSelectionOperator
()¶ Returns: the selectionOperator
setCrossoverOperator¶
-
public void
setCrossoverOperator
(CrossoverOperator<S> crossoverOperator)¶ Parameters: - crossoverOperator – the crossoverOperator to set
setEvaluator¶
-
public void
setEvaluator
(SolutionListEvaluator<S> evaluator)¶ Parameters: - evaluator – the evaluator to set
setFullArchiveCrossoverOperator¶
-
public void
setFullArchiveCrossoverOperator
(CrossoverOperator<S> fullArchiveCrossoverOperator)¶ Parameters: - fullArchiveCrossoverOperator – the fullArchiveCrossoverOperator to set
setMaxEvaluations¶
-
public void
setMaxEvaluations
(int maxEvaluations)¶ Parameters: - maxEvaluations – the maxEvaluations to set
setMutationOperator¶
-
public void
setMutationOperator
(MutationOperator<S> mutationOperator)¶ Parameters: - mutationOperator – the mutationOperator to set
setNormalizeObjectives¶
-
public void
setNormalizeObjectives
(boolean normalizeObjectives)¶ Parameters: - normalizeObjectives – the normalizeObjectives to set
setPopulationSize¶
-
public void
setPopulationSize
(int populationSize)¶ Parameters: - populationSize – the populationSize to set
setReplacementStrategy¶
-
public void
setReplacementStrategy
(ReplacementStrategy replacementStrategy)¶ Parameters: - replacementStrategy – the replacement strategy to set
setScalarization¶
-
public void
setScalarization
(ScalarizationWrapper scalarization)¶ Parameters: - scalarization – the scalarization to set
setSelectionOperator¶
-
public void
setSelectionOperator
(SelectionOperator<List<S>, S> selectionOperator)¶ Parameters: - selectionOperator – the selectionOperator to set
org.uma.jmetal.algorithm.multiobjective.espea.util¶
AchievementScalarizationComparator¶
-
public class
AchievementScalarizationComparator
<S extends Solution<?>> implements Comparator<S>¶ Compares solutions based on their achievement scalarization value (ASV). The ASV is always defined for a specific objective k. A solution x dominates solution y w.r.t. to their ASV, if the maximum of all objectives without k is smaller for x compared to y. If both maxima are the same, solutions are compared w.r.t. to objective k. Achievement scalarization values can be used for identifying extreme points.
Author: marlon.braun
Parameters: - <S> – The solution type.
Constructors¶
EnergyArchive¶
-
public class
EnergyArchive
<S extends Solution<?>> extends AbstractBoundedArchive<S>¶ The archive that is used within the
ESPEA
algorithm. The archive is of variable size and bounded by the population size. A new solution can only replace an existing archive member if it leads to a reduction of the total energy of the archive.Author: marlon.braun
Constructors¶
EnergyArchive¶
-
public
EnergyArchive
(int maxSize)¶ Standard constructor that uses uniform preferences - all Pareto optimal solutions are equally desirable.
Parameters: - maxSize – Size of the final distribution of points generated by the archive.
EnergyArchive¶
-
public
EnergyArchive
(int maxSize, ScalarizationWrapper scalWrapper)¶ Constructor that requires archive size and scalarization method
Parameters: - maxSize – Size of the final distribution of points generated by the archive.
- scalWrapper – The scalarization method that is used for computing energy contributions.
EnergyArchive¶
-
public
EnergyArchive
(int maxSize, ScalarizationWrapper scalWrapper, boolean normalizeObjectives)¶ Constructor that requires archive size, scalarization method and whether objectives are normliazed.
Parameters: - maxSize – Size of the final distribution of points generated by the archive.
- scalWrapper – The scalarization method that is used for computing energy contributions.
- normalizeObjectives – Whether or not objective values are normlalized between distance computation.
EnergyArchive¶
-
public
EnergyArchive
(int maxSize, ScalarizationWrapper scalWrapper, boolean normalizeObjectives, ReplacementStrategy replacementStrategy)¶ Constructor that requires archive size, scalarization method, whether objectives are normalized and the replacement strategy.
Parameters: - maxSize – Size of the final distribution of points generated by the archive.
- scalWrapper – The scalarization method that is used for computing energy contributions.
- normalizeObjectives – Whether or not objective values are normlalized between distance computation.
- replacementStrategy – Replacement strategy for archive update.
EnergyArchive.ReplacementStrategy¶
-
public static enum
ReplacementStrategy
¶ The replacement strategy defines the rule by which an existing archive member is replaced by a new solution. Computational studies have revealed that
BEST_FEASIBLE_POSITION
is inferior toLARGEST_DIFFERENCE
andWORST_IN_ARCHIVE
. No significant performance difference could be founnd betweenLARGEST_DIFFERENCE
andWORST_IN_ARCHIVE
. See “Obtaining Optimal Pareto Front Appxoimations” by Braun et al. and “Scalarized Preferences in Multi-objective Optimizaiton” by Braun for details.Author: marlon.braun
Enum Constants¶
BEST_FEASIBLE_POSITION¶
-
public static final EnergyArchive.ReplacementStrategy
BEST_FEASIBLE_POSITION
¶ Inserts the new solution such that the energy it introduces into the archive is minimized.
LARGEST_DIFFERENCE¶
-
public static final EnergyArchive.ReplacementStrategy
LARGEST_DIFFERENCE
¶ Maximizes the energy differences before and after replacement.
WORST_IN_ARCHIVE¶
-
public static final EnergyArchive.ReplacementStrategy
WORST_IN_ARCHIVE
¶ Among all eligible archive members that can be replaced the one exhibiting the largest energy contribution is replaced.
ScalarizationUtils¶
-
public class
ScalarizationUtils
¶ A class that contains methods for computing the scalarization values of solutions. A scalarization value is an aggregation of the objective values that maps to the real numbers, e.g. the weighted sum.
Scalarization values are stored as
ScalarizationValue
in the solutions.Author: Marlon Braun
Methods¶
angleUtility¶
-
public static <S extends Solution<?>> void
angleUtility
(List<S> solutionsList)¶ Scalarization values based on angle utility (see Angle-based Preference Models in Multi-objective Optimization by Braun et al.). Extreme points are computed from the list of solutions.
Parameters: - solutionsList – A list of solutions.
angleUtility¶
-
public static <S extends Solution<?>> void
angleUtility
(List<S> solutionsList, double[][] extremePoints)¶ Scalarization values based on angle utility (see Angle-based Preference Models in Multi-objective Optimization by Braun et al.).
Parameters: - solutionsList – A list of solutions.
- extremePoints – used for angle computation.
chebyshev¶
chebyshev¶
nash¶
nash¶
productOfObjectives¶
sumOfObjectives¶
tradeoffUtility¶
uniform¶
weightedChebyshev¶
weightedChebyshev¶
-
public static <S extends Solution<?>> void
weightedChebyshev
(List<S> solutionsList, double[] idealValues, double[] weights)¶ Scalarization values based on the weighted Chebyshev function.
Parameters: - solutionsList – A list of solutions.
- idealValues – The ideal point.
- weights – Constants by which ideal values and objective values are multiplied.
weightedProduct¶
weightedSum¶
ScalarizationValue¶
-
public class
ScalarizationValue
<S extends Solution<?>> extends GenericSolutionAttribute<S, Double>¶ Scalarization attribute. A scalarization value is an aggregation of the objective values.
Author: Marlon Braun
Parameters: - <S> – The solution type
ScalarizationWrapper¶
-
public class
ScalarizationWrapper
¶ A class for simplifying the access to
ScalarizationUtils
.Author: Marlon Braun
Constructors¶
ScalarizationWrapper¶
-
public
ScalarizationWrapper
(ScalarizationType scalarizationType)¶ Initialize from scalarization type
Parameters: - scalarizationType – Chosen scalarization function
Methods¶
execute¶
-
public <S extends Solution<?>> void
execute
(List<S> solutionsList)¶ Computes scalarization values and assigns them as
ScalarizationValue
attribute to the solutions.Parameters: - solutionsList – Solutions for which scalarization values computed.
ScalarizationWrapper.Config¶
-
public static class
Config
¶ Configuration of the scalarization wrapper.
Author: Marlon Braun
ScalarizationWrapper.ScalarizationType¶
-
public static enum
ScalarizationType
¶ The scalarization function that is used for computing values.
Author: Marlon Braun
Enum Constants¶
ANGLE_UTILITY¶
-
public static final ScalarizationWrapper.ScalarizationType
ANGLE_UTILITY
¶ Scalarization values are based on maximum angles to extreme points (see “Angle based Preferences Models in Multi-objective Optimization” by Braun et al.)
CHEBYSHEV¶
-
public static final ScalarizationWrapper.ScalarizationType
CHEBYSHEV
¶ Chebyhsev scalarization function.
NASH¶
-
public static final ScalarizationWrapper.ScalarizationType
NASH
¶ The Nash bargaining solution
PRODUCT_OF_OBJECTIVES¶
-
public static final ScalarizationWrapper.ScalarizationType
PRODUCT_OF_OBJECTIVES
¶ Multiplication of all objectives.
SUM_OF_OBJECTIVES¶
-
public static final ScalarizationWrapper.ScalarizationType
SUM_OF_OBJECTIVES
¶ Summing up all objectives.
TRADEOFF_UTILITY¶
-
public static final ScalarizationWrapper.ScalarizationType
TRADEOFF_UTILITY
¶ Tradeoff utility also known as proper utility (see “Theory and Algorithms for Finding Knees” by Shukla et al.).
UNIFORM¶
-
public static final ScalarizationWrapper.ScalarizationType
UNIFORM
¶ All solutions are assigned a scalarization value of 1.
WEIGHTED_CHEBYSHEV¶
-
public static final ScalarizationWrapper.ScalarizationType
WEIGHTED_CHEBYSHEV
¶ Chebyhsev function with weights.
WEIGHTED_PRODUCT¶
-
public static final ScalarizationWrapper.ScalarizationType
WEIGHTED_PRODUCT
¶ Objectives are exponentiated by weights before being multiplied.
WEIGHTED_SUM¶
-
public static final ScalarizationWrapper.ScalarizationType
WEIGHTED_SUM
¶ Weighted sum.
org.uma.jmetal.algorithm.multiobjective.gde3¶
GDE3¶
-
public class
GDE3
extends AbstractDifferentialEvolution<List<DoubleSolution>>¶ This class implements the GDE3 algorithm
Fields¶
crowdingDistance¶
-
protected DensityEstimator<DoubleSolution>
crowdingDistance
¶
dominanceComparator¶
-
protected Comparator<DoubleSolution>
dominanceComparator
¶
evaluator¶
-
protected SolutionListEvaluator<DoubleSolution>
evaluator
¶
ranking¶
-
protected Ranking<DoubleSolution>
ranking
¶
Constructors¶
GDE3¶
-
public
GDE3
(DoubleProblem problem, int populationSize, int maxEvaluations, DifferentialEvolutionSelection selection, DifferentialEvolutionCrossover crossover, SolutionListEvaluator<DoubleSolution> evaluator)¶ Constructor
Methods¶
addLastRankedSolutionsToPopulation¶
-
protected void
addLastRankedSolutionsToPopulation
(Ranking<DoubleSolution> ranking, int rank, List<DoubleSolution> population)¶
addRankedSolutionsToPopulation¶
-
protected void
addRankedSolutionsToPopulation
(Ranking<DoubleSolution> ranking, int rank, List<DoubleSolution> population)¶
computeRanking¶
-
protected Ranking<DoubleSolution>
computeRanking
(List<DoubleSolution> solutionList)¶
createInitialPopulation¶
-
protected List<DoubleSolution>
createInitialPopulation
()¶
crowdingDistanceSelection¶
-
protected List<DoubleSolution>
crowdingDistanceSelection
(Ranking<DoubleSolution> ranking)¶
evaluatePopulation¶
-
protected List<DoubleSolution>
evaluatePopulation
(List<DoubleSolution> population)¶ Evaluate population method
Parameters: - population – The list of solutions to be evaluated
Returns: A list of evaluated solutions
getNonDominatedSolutions¶
-
protected List<DoubleSolution>
getNonDominatedSolutions
(List<DoubleSolution> solutionList)¶
getResult¶
-
public List<DoubleSolution>
getResult
()¶
populationIsNotFull¶
-
protected boolean
populationIsNotFull
(List<DoubleSolution> population)¶
replacement¶
-
protected List<DoubleSolution>
replacement
(List<DoubleSolution> population, List<DoubleSolution> offspringPopulation)¶
reproduction¶
-
protected List<DoubleSolution>
reproduction
(List<DoubleSolution> matingPopulation)¶
selection¶
-
protected List<DoubleSolution>
selection
(List<DoubleSolution> population)¶
subfrontFillsIntoThePopulation¶
-
protected boolean
subfrontFillsIntoThePopulation
(Ranking<DoubleSolution> ranking, int rank, List<DoubleSolution> population)¶
GDE3Builder¶
-
public class
GDE3Builder
implements AlgorithmBuilder<GDE3>¶ This class implements the GDE3 algorithm
Fields¶
crossoverOperator¶
-
protected DifferentialEvolutionCrossover
crossoverOperator
¶
evaluator¶
-
protected SolutionListEvaluator<DoubleSolution>
evaluator
¶
selectionOperator¶
-
protected DifferentialEvolutionSelection
selectionOperator
¶
Constructors¶
GDE3Builder¶
-
public
GDE3Builder
(DoubleProblem problem)¶ Constructor
Methods¶
getCrossoverOperator¶
-
public CrossoverOperator<DoubleSolution>
getCrossoverOperator
()¶
getSelectionOperator¶
-
public SelectionOperator<List<DoubleSolution>, List<DoubleSolution>>
getSelectionOperator
()¶
setCrossover¶
-
public GDE3Builder
setCrossover
(DifferentialEvolutionCrossover crossover)¶
setMaxEvaluations¶
-
public GDE3Builder
setMaxEvaluations
(int maxEvaluations)¶
setPopulationSize¶
-
public GDE3Builder
setPopulationSize
(int populationSize)¶
setSelection¶
-
public GDE3Builder
setSelection
(DifferentialEvolutionSelection selection)¶
setSolutionSetEvaluator¶
-
public GDE3Builder
setSolutionSetEvaluator
(SolutionListEvaluator<DoubleSolution> evaluator)¶
org.uma.jmetal.algorithm.multiobjective.gwasfga¶
GWASFGA¶
-
public class
GWASFGA
<S extends Solution<?>> extends WASFGA<S>¶ This class executes the GWASFGA algorithm described in: Saborido, R., Ruiz, A. B. and Luque, M. (2015). Global WASF-GA: An Evolutionary Algorithm in Multiobjective Optimization to Approximate the whole Pareto Optimal Front. Evolutionary Computation Accepted for publication.
Author: Juanjo Durillo
Constructors¶
GWASFGA¶
-
public
GWASFGA
(Problem<S> problem, int populationSize, int maxIterations, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, SolutionListEvaluator<S> evaluator, double epsilon, String weightVectorsFileName)¶
GWASFGA¶
-
public
GWASFGA
(Problem<S> problem, int populationSize, int maxIterations, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, SolutionListEvaluator<S> evaluator, double epsilon)¶
org.uma.jmetal.algorithm.multiobjective.gwasfga.util¶
GWASFGARanking¶
-
public class
GWASFGARanking
<S extends Solution<?>> extends GenericSolutionAttribute<S, Integer> implements Ranking<S>¶ Author: Rubén Saborido Implementation of the ranking procedure for the algorithm GWASF-GA on jMetal5.0 It classifies solutions into different fronts. If the problem contains constraints, after feasible solutions it classifies the unfeasible solutions into fronts: - Each unfeasible solution goes into a different front. - Unfeasible solutions with lower number of violated constraints are preferred. - If two solutions have equal number of violated constraints it compares the overall constraint values. - If two solutions have equal overall constraint values it compares de values of the utility function.
Constructors¶
GWASFGARanking¶
-
public
GWASFGARanking
(AbstractUtilityFunctionsSet<S> utilityFunctionsUtopia, AbstractUtilityFunctionsSet<S> utilityFunctionsNadir)¶
Methods¶
org.uma.jmetal.algorithm.multiobjective.ibea¶
IBEA¶
-
public class
IBEA
<S extends Solution<?>> implements Algorithm<List<S>>¶ This class implements the IBEA algorithm
Fields¶
crossoverOperator¶
-
protected CrossoverOperator<S>
crossoverOperator
¶
mutationOperator¶
-
protected MutationOperator<S>
mutationOperator
¶
selectionOperator¶
-
protected SelectionOperator<List<S>, S>
selectionOperator
¶
Constructors¶
IBEA¶
-
public
IBEA
(Problem<S> problem, int populationSize, int archiveSize, int maxEvaluations, SelectionOperator<List<S>, S> selectionOperator, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator)¶ Constructor
IBEABuilder¶
-
public class
IBEABuilder
implements AlgorithmBuilder<IBEA<DoubleSolution>>¶ This class implements the IBEA algorithm
Constructors¶
IBEABuilder¶
-
public
IBEABuilder
(Problem<DoubleSolution> problem)¶ Constructor
Parameters: - problem –
Methods¶
build¶
-
public IBEA<DoubleSolution>
build
()¶
getCrossover¶
-
public CrossoverOperator<DoubleSolution>
getCrossover
()¶
getMutation¶
-
public MutationOperator<DoubleSolution>
getMutation
()¶
getSelection¶
-
public SelectionOperator<List<DoubleSolution>, DoubleSolution>
getSelection
()¶
setArchiveSize¶
-
public IBEABuilder
setArchiveSize
(int archiveSize)¶
setCrossover¶
-
public IBEABuilder
setCrossover
(CrossoverOperator<DoubleSolution> crossover)¶
setMaxEvaluations¶
-
public IBEABuilder
setMaxEvaluations
(int maxEvaluations)¶
setMutation¶
-
public IBEABuilder
setMutation
(MutationOperator<DoubleSolution> mutation)¶
setPopulationSize¶
-
public IBEABuilder
setPopulationSize
(int populationSize)¶
setSelection¶
-
public IBEABuilder
setSelection
(SelectionOperator<List<DoubleSolution>, DoubleSolution> selection)¶
org.uma.jmetal.algorithm.multiobjective.mocell¶
MOCell¶
-
public class
MOCell
<S extends Solution<?>> extends AbstractGeneticAlgorithm<S, List<S>>¶ Author: JuanJo Durillo
Parameters: - <S> –
Fields¶
archive¶
-
protected BoundedArchive<S>
archive
¶
dominanceComparator¶
-
protected Comparator<S>
dominanceComparator
¶
evaluator¶
-
protected final SolutionListEvaluator<S>
evaluator
¶
location¶
-
protected LocationAttribute<S>
location
¶
neighborhood¶
-
protected Neighborhood<S>
neighborhood
¶
Constructors¶
MOCell¶
-
public
MOCell
(Problem<S> problem, int maxEvaluations, int populationSize, BoundedArchive<S> archive, Neighborhood<S> neighborhood, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, SolutionListEvaluator<S> evaluator)¶ Constructor
Parameters: - problem –
- maxEvaluations –
- populationSize –
- neighborhood –
- crossoverOperator –
- mutationOperator –
- selectionOperator –
- evaluator –
Methods¶
MOCellBuilder¶
-
public class
MOCellBuilder
<S extends Solution<?>> implements AlgorithmBuilder<MOCell<S>>¶ Created by juanjo
Fields¶
archive¶
-
protected BoundedArchive<S>
archive
¶
crossoverOperator¶
-
protected CrossoverOperator<S>
crossoverOperator
¶
evaluator¶
-
protected SolutionListEvaluator<S>
evaluator
¶
mutationOperator¶
-
protected MutationOperator<S>
mutationOperator
¶
neighborhood¶
-
protected Neighborhood<S>
neighborhood
¶
selectionOperator¶
-
protected SelectionOperator<List<S>, S>
selectionOperator
¶
Constructors¶
MOCellBuilder¶
-
public
MOCellBuilder
(Problem<S> problem, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator)¶ MOCellBuilder constructor
Methods¶
getArchive¶
-
public BoundedArchive<S>
getArchive
()¶
getCrossoverOperator¶
-
public CrossoverOperator<S>
getCrossoverOperator
()¶
getMutationOperator¶
-
public MutationOperator<S>
getMutationOperator
()¶
getSelectionOperator¶
-
public SelectionOperator<List<S>, S>
getSelectionOperator
()¶
getSolutionListEvaluator¶
-
public SolutionListEvaluator<S>
getSolutionListEvaluator
()¶
setArchive¶
-
public MOCellBuilder<S>
setArchive
(BoundedArchive<S> archive)¶
setMaxEvaluations¶
-
public MOCellBuilder<S>
setMaxEvaluations
(int maxEvaluations)¶
setNeighborhood¶
-
public MOCellBuilder<S>
setNeighborhood
(Neighborhood<S> neighborhood)¶
setPopulationSize¶
-
public MOCellBuilder<S>
setPopulationSize
(int populationSize)¶
setSelectionOperator¶
-
public MOCellBuilder<S>
setSelectionOperator
(SelectionOperator<List<S>, S> selectionOperator)¶
setSolutionListEvaluator¶
-
public MOCellBuilder<S>
setSolutionListEvaluator
(SolutionListEvaluator<S> evaluator)¶
MOCellBuilder.MOCellVariant¶
-
public enum
MOCellVariant
¶
Enum Constants¶
MOCell¶
-
public static final MOCellBuilder.MOCellVariant
MOCell
¶
Measures¶
-
public static final MOCellBuilder.MOCellVariant
Measures
¶
SteadyStateMOCell¶
-
public static final MOCellBuilder.MOCellVariant
SteadyStateMOCell
¶
MOCellIT¶
-
public class
MOCellIT
¶
Fields¶
algorithm¶
-
Algorithm<List<DoubleSolution>>
algorithm
¶
crossover¶
-
CrossoverOperator<DoubleSolution>
crossover
¶
mutation¶
-
MutationOperator<DoubleSolution>
mutation
¶
problem¶
-
DoubleProblem
problem
¶
org.uma.jmetal.algorithm.multiobjective.mochc¶
MOCHC¶
-
public class
MOCHC
extends AbstractEvolutionaryAlgorithm<BinarySolution, List<BinarySolution>>¶ This class executes the MOCHC algorithm described in: A.J. Nebro, E. Alba, G. Molina, F. Chicano, F. Luna, J.J. Durillo “Optimal antenna placement using a new multi-objective chc algorithm”. GECCO ‘07: Proceedings of the 9th annual conference on Genetic and evolutionary computation. London, England. July 2007.
Constructors¶
MOCHC¶
-
public
MOCHC
(BinaryProblem problem, int populationSize, int maxEvaluations, int convergenceValue, double preservedPopulation, double initialConvergenceCount, CrossoverOperator<BinarySolution> crossoverOperator, MutationOperator<BinarySolution> cataclysmicMutation, SelectionOperator<List<BinarySolution>, List<BinarySolution>> newGenerationSelection, SelectionOperator<List<BinarySolution>, BinarySolution> parentSelection, SolutionListEvaluator<BinarySolution> evaluator)¶ Constructor
Methods¶
createInitialPopulation¶
-
protected List<BinarySolution>
createInitialPopulation
()¶
evaluatePopulation¶
-
protected List<BinarySolution>
evaluatePopulation
(List<BinarySolution> population)¶
getResult¶
-
public List<BinarySolution>
getResult
()¶
replacement¶
-
protected List<BinarySolution>
replacement
(List<BinarySolution> population, List<BinarySolution> offspringPopulation)¶
reproduction¶
-
protected List<BinarySolution>
reproduction
(List<BinarySolution> matingPopulation)¶
selection¶
-
protected List<BinarySolution>
selection
(List<BinarySolution> population)¶
MOCHC45¶
-
public class
MOCHC45
implements Algorithm<List<BinarySolution>>¶ This class executes the MOCHC algorithm described in: A.J. Nebro, E. Alba, G. Molina, F. Chicano, F. Luna, J.J. Durillo “Optimal antenna placement using a new multi-objective chc algorithm”. GECCO ‘07: Proceedings of the 9th annual conference on Genetic and evolutionary computation. London, England. July 2007. Implementation of MOCHC following the scheme used in jMetal4.5 and former versions, i.e, without implementing the
AbstractGeneticAlgorithm
interface.
Constructors¶
MOCHC45¶
-
public
MOCHC45
(BinaryProblem problem, int populationSize, int maxEvaluations, int convergenceValue, double preservedPopulation, double initialConvergenceCount, CrossoverOperator<BinarySolution> crossoverOperator, MutationOperator<BinarySolution> cataclysmicMutation, SelectionOperator<List<BinarySolution>, List<BinarySolution>> newGenerationSelection, SelectionOperator<List<BinarySolution>, BinarySolution> parentSelection, SolutionListEvaluator<BinarySolution> evaluator)¶ Constructor
MOCHCBuilder¶
-
public class
MOCHCBuilder
implements AlgorithmBuilder<MOCHC>¶ Builder class
Fields¶
cataclysmicMutation¶
-
MutationOperator<BinarySolution>
cataclysmicMutation
¶
crossoverOperator¶
-
CrossoverOperator<BinarySolution>
crossoverOperator
¶
evaluator¶
-
SolutionListEvaluator<BinarySolution>
evaluator
¶
newGenerationSelection¶
-
SelectionOperator<List<BinarySolution>, List<BinarySolution>>
newGenerationSelection
¶
parentSelection¶
-
SelectionOperator<List<BinarySolution>, BinarySolution>
parentSelection
¶
problem¶
-
BinaryProblem
problem
¶
Constructors¶
MOCHCBuilder¶
-
public
MOCHCBuilder
(BinaryProblem problem)¶
Methods¶
getCataclysmicMutation¶
-
public MutationOperator<BinarySolution>
getCataclysmicMutation
()¶
getCrossover¶
-
public CrossoverOperator<BinarySolution>
getCrossover
()¶
getNewGenerationSelection¶
-
public SelectionOperator<List<BinarySolution>, List<BinarySolution>>
getNewGenerationSelection
()¶
getParentSelection¶
-
public SelectionOperator<List<BinarySolution>, BinarySolution>
getParentSelection
()¶
getProblem¶
-
public BinaryProblem
getProblem
()¶
setCataclysmicMutation¶
-
public MOCHCBuilder
setCataclysmicMutation
(MutationOperator<BinarySolution> cataclysmicMutation)¶
setConvergenceValue¶
-
public MOCHCBuilder
setConvergenceValue
(int convergenceValue)¶
setCrossover¶
-
public MOCHCBuilder
setCrossover
(CrossoverOperator<BinarySolution> crossover)¶
setEvaluator¶
-
public MOCHCBuilder
setEvaluator
(SolutionListEvaluator<BinarySolution> evaluator)¶
setInitialConvergenceCount¶
-
public MOCHCBuilder
setInitialConvergenceCount
(double initialConvergenceCount)¶
setMaxEvaluations¶
-
public MOCHCBuilder
setMaxEvaluations
(int maxEvaluations)¶
setNewGenerationSelection¶
-
public MOCHCBuilder
setNewGenerationSelection
(SelectionOperator<List<BinarySolution>, List<BinarySolution>> newGenerationSelection)¶
setParentSelection¶
-
public MOCHCBuilder
setParentSelection
(SelectionOperator<List<BinarySolution>, BinarySolution> parentSelection)¶
setPopulationSize¶
-
public MOCHCBuilder
setPopulationSize
(int populationSize)¶
setPreservedPopulation¶
-
public MOCHCBuilder
setPreservedPopulation
(double preservedPopulation)¶
org.uma.jmetal.algorithm.multiobjective.moead¶
AbstractMOEAD¶
-
public abstract class
AbstractMOEAD
<S extends Solution<?>> implements Algorithm<List<S>>¶ Abstract class for implementing versions of the MOEA/D algorithm.
Author: Antonio J. Nebro
Fields¶
crossoverOperator¶
-
protected CrossoverOperator<S>
crossoverOperator
¶
functionType¶
-
protected FunctionType
functionType
¶
idealPoint¶
-
protected IdealPoint
idealPoint
¶ Z vector in Zhang & Li paper
maximumNumberOfReplacedSolutions¶
-
protected int
maximumNumberOfReplacedSolutions
¶ nr in Zhang & Li paper
mutationOperator¶
-
protected MutationOperator<S>
mutationOperator
¶
nadirPoint¶
-
protected NadirPoint
nadirPoint
¶
neighborhoodSelectionProbability¶
-
protected double
neighborhoodSelectionProbability
¶ Delta in Zhang & Li paper
randomGenerator¶
-
protected JMetalRandom
randomGenerator
¶
Constructors¶
AbstractMOEAD¶
-
public
AbstractMOEAD
(Problem<S> problem, int populationSize, int resultPopulationSize, int maxEvaluations, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutation, FunctionType functionType, String dataDirectory, double neighborhoodSelectionProbability, int maximumNumberOfReplacedSolutions, int neighborSize)¶
Methods¶
chooseNeighborType¶
-
protected NeighborType
chooseNeighborType
()¶
matingSelection¶
-
protected List<Integer>
matingSelection
(int subproblemId, int numberOfSolutionsToSelect, NeighborType neighbourType)¶ Parameters: - subproblemId – the id of current subproblem
- neighbourType – neighbour type
parentSelection¶
-
protected List<S>
parentSelection
(int subProblemId, NeighborType neighborType)¶
updateNeighborhood¶
-
protected void
updateNeighborhood
(S individual, int subProblemId, NeighborType neighborType)¶ Update neighborhood method
Parameters: - individual –
- subProblemId –
- neighborType –
Throws:
AbstractMOEAD.FunctionType¶
-
public enum
FunctionType
¶
Enum Constants¶
AGG¶
-
public static final AbstractMOEAD.FunctionType
AGG
¶
PBI¶
-
public static final AbstractMOEAD.FunctionType
PBI
¶
TCHE¶
-
public static final AbstractMOEAD.FunctionType
TCHE
¶
AbstractMOEAD.NeighborType¶
-
protected enum
NeighborType
¶
Enum Constants¶
NEIGHBOR¶
-
public static final AbstractMOEAD.NeighborType
NEIGHBOR
¶
POPULATION¶
-
public static final AbstractMOEAD.NeighborType
POPULATION
¶
ConstraintMOEAD¶
-
public class
ConstraintMOEAD
extends AbstractMOEAD<DoubleSolution>¶ This class implements a constrained version of the MOEAD algorithm based on the one presented in the paper: “An adaptive constraint handling approach embedded MOEA/D”. DOI: 10.1109/CEC.2012.6252868
Author: Antonio J. Nebro, Juan J. Durillo
Constructors¶
ConstraintMOEAD¶
-
public
ConstraintMOEAD
(Problem<DoubleSolution> problem, int populationSize, int resultPopulationSize, int maxEvaluations, MutationOperator<DoubleSolution> mutation, CrossoverOperator<DoubleSolution> crossover, FunctionType functionType, String dataDirectory, double neighborhoodSelectionProbability, int maximumNumberOfReplacedSolutions, int neighborSize)¶
MOEAD¶
-
public class
MOEAD
extends AbstractMOEAD<DoubleSolution>¶ Class implementing the MOEA/D-DE algorithm described in : Hui Li; Qingfu Zhang, “Multiobjective Optimization Problems With Complicated Pareto Sets, MOEA/D and NSGA-II,” Evolutionary Computation, IEEE Transactions on , vol.13, no.2, pp.284,302, April 2009. doi: 10.1109/TEVC.2008.925798
Author: Antonio J. Nebro
Fields¶
differentialEvolutionCrossover¶
-
protected DifferentialEvolutionCrossover
differentialEvolutionCrossover
¶
Constructors¶
MOEAD¶
-
public
MOEAD
(Problem<DoubleSolution> problem, int populationSize, int resultPopulationSize, int maxEvaluations, MutationOperator<DoubleSolution> mutation, CrossoverOperator<DoubleSolution> crossover, FunctionType functionType, String dataDirectory, double neighborhoodSelectionProbability, int maximumNumberOfReplacedSolutions, int neighborSize)¶
MOEADBuilder¶
-
public class
MOEADBuilder
implements AlgorithmBuilder<AbstractMOEAD<DoubleSolution>>¶ Builder class for algorithm MOEA/D and variants
Author: Antonio J. Nebro
Fields¶
crossover¶
-
protected CrossoverOperator<DoubleSolution>
crossover
¶
maximumNumberOfReplacedSolutions¶
-
protected int
maximumNumberOfReplacedSolutions
¶ nr in Zhang & Li paper
mutation¶
-
protected MutationOperator<DoubleSolution>
mutation
¶
neighborhoodSelectionProbability¶
-
protected double
neighborhoodSelectionProbability
¶ Delta in Zhang & Li paper
problem¶
-
protected Problem<DoubleSolution>
problem
¶
Constructors¶
MOEADBuilder¶
-
public
MOEADBuilder
(Problem<DoubleSolution> problem, Variant variant)¶ Constructor
Methods¶
build¶
-
public AbstractMOEAD<DoubleSolution>
build
()¶
getCrossover¶
-
public CrossoverOperator<DoubleSolution>
getCrossover
()¶
getMutation¶
-
public MutationOperator<DoubleSolution>
getMutation
()¶
setCrossover¶
-
public MOEADBuilder
setCrossover
(CrossoverOperator<DoubleSolution> crossover)¶
setDataDirectory¶
-
public MOEADBuilder
setDataDirectory
(String dataDirectory)¶
setFunctionType¶
-
public MOEADBuilder
setFunctionType
(MOEAD.FunctionType functionType)¶
setMaxEvaluations¶
-
public MOEADBuilder
setMaxEvaluations
(int maxEvaluations)¶
setMaximumNumberOfReplacedSolutions¶
-
public MOEADBuilder
setMaximumNumberOfReplacedSolutions
(int maximumNumberOfReplacedSolutions)¶
setMutation¶
-
public MOEADBuilder
setMutation
(MutationOperator<DoubleSolution> mutation)¶
setNeighborSize¶
-
public MOEADBuilder
setNeighborSize
(int neighborSize)¶
setNeighborhoodSelectionProbability¶
-
public MOEADBuilder
setNeighborhoodSelectionProbability
(double neighborhoodSelectionProbability)¶
setNumberOfThreads¶
-
public MOEADBuilder
setNumberOfThreads
(int numberOfThreads)¶
setPopulationSize¶
-
public MOEADBuilder
setPopulationSize
(int populationSize)¶
setResultPopulationSize¶
-
public MOEADBuilder
setResultPopulationSize
(int resultPopulationSize)¶
MOEADBuilder.Variant¶
-
public enum
Variant
¶
Enum Constants¶
ConstraintMOEAD¶
-
public static final MOEADBuilder.Variant
ConstraintMOEAD
¶
MOEAD¶
-
public static final MOEADBuilder.Variant
MOEAD
¶
MOEADD¶
-
public static final MOEADBuilder.Variant
MOEADD
¶
MOEADDRA¶
-
public static final MOEADBuilder.Variant
MOEADDRA
¶
MOEADSTM¶
-
public static final MOEADBuilder.Variant
MOEADSTM
¶
MOEADD¶
-
public class
MOEADD
<S extends DoubleSolution> extends AbstractMOEAD<S>¶
Fields¶
Constructors¶
MOEADD¶
-
public
MOEADD
(Problem<S> problem, int populationSize, int resultPopulationSize, int maxEvaluations, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutation, AbstractMOEAD.FunctionType functionType, String dataDirectory, double neighborhoodSelectionProbability, int maximumNumberOfReplacedSolutions, int neighborSize)¶
Methods¶
calculateDistance¶
-
public double
calculateDistance
(S individual, double[] lambda, double[] z_, double[] nz_)¶ Calculate the perpendicular distance between the solution and reference line
calculateDistance2¶
-
public double
calculateDistance2
(S indiv, double[] lambda, double[] z_, double[] nz_)¶
checkDominance¶
-
public int
checkDominance
(S a, S b)¶ check the dominance relationship between a and b: 1 -> a dominates b, -1 -> b dominates a 0 -> non-dominated with each other
countRankOnes¶
-
public int
countRankOnes
(int location)¶ count the number of 1s in a row of rank matrix
deleteCrowdIndiv_diff¶
-
public void
deleteCrowdIndiv_diff
(int crowdIdx, int curLocation, int nicheCount, S indiv)¶ delete one solution from the most crowded subregion, which is different from indiv’s subregion. just use indiv to replace the worst solution in that subregion
deleteCrowdIndiv_same¶
-
public void
deleteCrowdIndiv_same
(int crowdIdx, int nicheCount, double indivFitness, S indiv)¶ delete one solution from the most crowded subregion, which is indiv’s subregion. Compare indiv’s fitness value and the worst one in this subregion
deleteCrowdRegion1¶
-
public void
deleteCrowdRegion1
(S indiv, int location)¶ Delete a solution from the most crowded subregion (this function only happens when: it should delete ‘indiv’ based on traditional method. However, the subregion of ‘indiv’ only has one solution, so it should be kept)
deleteCrowdRegion2¶
-
public void
deleteCrowdRegion2
(S indiv, int location)¶ delete a solution from the most crowded subregion (this function happens when: it should delete the solution in the ‘parentLocation’ subregion, but since this subregion only has one solution, it should be kept)
deleteRankOne¶
-
public void
deleteRankOne
(S indiv, int location)¶ if there is only one non-domination level (i.e., all solutions are non-dominated with each other), we should delete a solution from the most crowded subregion
findPosition¶
-
public int
findPosition
(S indiv)¶ find the index of the solution ‘indiv’ in the population
findRegion¶
-
public int
findRegion
(int idx)¶ find the subregion of the ‘idx’th solution in the population
innerproduct¶
-
public double
innerproduct
(double[] vec1, double[] vec2)¶ Calculate the dot product of two vectors
matingSelection¶
nondominated_sorting_add¶
-
public int
nondominated_sorting_add
(S indiv)¶ update the non-domination level when adding a solution
nondominated_sorting_delete¶
-
public void
nondominated_sorting_delete
(S indiv)¶ update the non-domination level structure after deleting a solution
setLocation¶
-
public void
setLocation
(S indiv, double[] z_, double[] nz_)¶ Set the location of a solution based on the orthogonal distance
MOEADDRA¶
-
public class
MOEADDRA
extends AbstractMOEAD<DoubleSolution>¶ Class implementing the MOEA/D-DRA algorithm described in : Q. Zhang, W. Liu, and H Li, The Performance of a New Version of MOEA/D on CEC09 Unconstrained MOP Test Instances, Working Report CES-491, School of CS & EE, University of Essex, 02/2009
Author: Juan J. Durillo, Antonio J. Nebro
Fields¶
differentialEvolutionCrossover¶
-
protected DifferentialEvolutionCrossover
differentialEvolutionCrossover
¶
randomGenerator¶
-
JMetalRandom
randomGenerator
¶
savedValues¶
-
protected DoubleSolution[]
savedValues
¶
Constructors¶
MOEADDRA¶
-
public
MOEADDRA
(Problem<DoubleSolution> problem, int populationSize, int resultPopulationSize, int maxEvaluations, MutationOperator<DoubleSolution> mutation, CrossoverOperator<DoubleSolution> crossover, FunctionType functionType, String dataDirectory, double neighborhoodSelectionProbability, int maximumNumberOfReplacedSolutions, int neighborSize)¶
MOEADSTM¶
-
public class
MOEADSTM
extends AbstractMOEAD<DoubleSolution>¶ Class implementing the MOEA/D-STM algorithm described in : K. Li, Q. Zhang, S. Kwong, M. Li and R. Wang, “Stable Matching-Based Selection in Evolutionary Multiobjective Optimization”, IEEE Transactions on Evolutionary Computation, 18(6): 909-923, 2014. DOI: 10.1109/TEVC.2013.2293776
Author: Ke Li
Fields¶
differentialEvolutionCrossover¶
-
protected DifferentialEvolutionCrossover
differentialEvolutionCrossover
¶
randomGenerator¶
-
JMetalRandom
randomGenerator
¶
savedValues¶
-
protected DoubleSolution[]
savedValues
¶
Constructors¶
MOEADSTM¶
-
public
MOEADSTM
(Problem<DoubleSolution> problem, int populationSize, int resultPopulationSize, int maxEvaluations, MutationOperator<DoubleSolution> mutation, CrossoverOperator<DoubleSolution> crossover, FunctionType functionType, String dataDirectory, double neighborhoodSelectionProbability, int maximumNumberOfReplacedSolutions, int neighborSize)¶
Methods¶
calculateDistance¶
-
public double
calculateDistance
(DoubleSolution individual, double[] lambda)¶ Calculate the perpendicular distance between the solution and reference line
calculateDistance2¶
-
public double
calculateDistance2
(DoubleSolution individual, double[] lambda)¶ Calculate the perpendicular distance between the solution and reference line
getResult¶
-
public List<DoubleSolution>
getResult
()¶
innerproduct¶
-
public double
innerproduct
(double[] vec1, double[] vec2)¶ Calculate the dot product of two vectors
prefers¶
-
public boolean
prefers
(int x, int y, int[] womanPref, int size)¶ Returns true in case that a given woman prefers x to y.
stableMatching¶
-
public int[]
stableMatching
(int[][] manPref, int[][] womanPref, int menSize, int womenSize)¶ Return the stable matching between ‘subproblems’ and ‘solutions’ (‘subproblems’ propose first). It is worth noting that the number of solutions is larger than that of the subproblems.
org.uma.jmetal.algorithm.multiobjective.moead.util¶
MOEADUtils¶
-
public class
MOEADUtils
¶ Utilities methods to used by MOEA/D
Methods¶
getSubsetOfEvenlyDistributedSolutions¶
-
public static <S extends Solution<?>> List<S>
getSubsetOfEvenlyDistributedSolutions
(List<S> solutionList, int newSolutionListSize)¶ This methods select a subset of evenly spread solutions from a solution list. The implementation is based on the method described in the MOEA/D-DRA paper.
Parameters: - solutionList –
- newSolutionListSize –
- <S> –
org.uma.jmetal.algorithm.multiobjective.mombi¶
AbstractMOMBI¶
-
public abstract class
AbstractMOMBI
<S extends Solution<?>> extends AbstractGeneticAlgorithm<S, List<S>>¶ Abstract class representing variants of the MOMBI algorithm
Author: Juan J. Durillo Modified by Antonio J. Nebro
Parameters: - <S> –
Fields¶
evaluator¶
-
protected final SolutionListEvaluator<S>
evaluator
¶
Constructors¶
AbstractMOMBI¶
-
public
AbstractMOMBI
(Problem<S> problem, int maxIterations, CrossoverOperator<S> crossover, MutationOperator<S> mutation, SelectionOperator<List<S>, S> selection, SolutionListEvaluator<S> evaluator)¶ Constructor
Parameters: - problem – Problem to be solved
- maxIterations – Maximum number of iterations the algorithm will perform
- crossover – Crossover operator
- mutation – Mutation operator
- selection – Selection operator
- evaluator – Evaluator object for evaluating solution lists
Methods¶
MOMBI¶
-
public class
MOMBI
<S extends Solution<?>> extends AbstractMOMBI<S>¶
Fields¶
utilityFunctions¶
-
protected final AbstractUtilityFunctionsSet<S>
utilityFunctions
¶
Constructors¶
MOMBI¶
-
public
MOMBI
(Problem<S> problem, int maxIterations, CrossoverOperator<S> crossover, MutationOperator<S> mutation, SelectionOperator<List<S>, S> selection, SolutionListEvaluator<S> evaluator, String pathWeights)¶
Methods¶
addLastRankedSolutionsToPopulation¶
addRankedSolutionsToPopulation¶
createUtilityFunction¶
-
public AbstractUtilityFunctionsSet<S>
createUtilityFunction
(String pathWeights)¶
getUtilityFunctions¶
-
protected AbstractUtilityFunctionsSet<S>
getUtilityFunctions
()¶
MOMBI2¶
Fields¶
history¶
-
protected final MOMBI2History<S>
history
¶
normalizer¶
-
protected Normalizer
normalizer
¶
Constructors¶
MOMBI2¶
-
public
MOMBI2
(Problem<S> problem, int maxIterations, CrossoverOperator<S> crossover, MutationOperator<S> mutation, SelectionOperator<List<S>, S> selection, SolutionListEvaluator<S> evaluator, String pathWeights)¶ Creates a new instance of the MOMBI algorithm
Parameters: - problem –
- maxIterations –
- crossover –
- mutation –
- selection –
- evaluator –
- pathWeights –
Methods¶
createUtilityFunction¶
-
public AbstractUtilityFunctionsSet<S>
createUtilityFunction
(String pathWeights)¶
org.uma.jmetal.algorithm.multiobjective.mombi.util¶
ASFUtilityFunctionSet¶
-
public class
ASFUtilityFunctionSet
<S extends Solution<?>> extends AbstractUtilityFunctionsSet<S>¶ Author: Juan J. Durillo Modified by Antonio J. Nebro
Parameters: - <S> –
ASFWASFGA¶
-
public class
ASFWASFGA
<S extends Solution<?>> extends AbstractUtilityFunctionsSet<S>¶ Author: Juan J. Durillo Modified by Antonio J. Nebro
Parameters: - <S> –
Constructors¶
AbstractUtilityFunctionsSet¶
-
public abstract class
AbstractUtilityFunctionsSet
<S extends Solution<?>> implements Serializable¶ Author: Juan J. Durillo Modified by Antonio J. Nebro
Parameters: - <S> –
Constructors¶
Methods¶
evaluate¶
evaluate¶
getSize¶
-
public int
getSize
()¶ Returns the number of utility functions stored in this set
Returns: The number of vectors
loadWeightsFromFile¶
-
public void
loadWeightsFromFile
(String filePath)¶ Reads a set of weight vectors from a file. The expected format for the file is as follows. The first line should start with at least the following three tokens # Any other token on this line will be ignored. indicates how many weight vectors are included in this file indicates how many component has each included vector Each of the following lines of the file represents a weight vector of at least components If more components are provided, they will be ignored by the program
Parameters: - filePath – The path in the file system of the file containing the weight vectors
MOMBI2History¶
-
public class
MOMBI2History
<T extends Solution<?>> implements Serializable¶ Created by ajnebro on 10/9/15.
R2Ranking¶
-
public class
R2Ranking
<S extends Solution<?>> extends GenericSolutionAttribute<S, R2SolutionData>¶
Constructors¶
R2Ranking¶
-
public
R2Ranking
(AbstractUtilityFunctionsSet<S> utilityFunctions)¶
Methods¶
getAttribute¶
-
public R2SolutionData
getAttribute
(S solution)¶
getUtilityFunctions¶
-
public AbstractUtilityFunctionsSet<S>
getUtilityFunctions
()¶
setAttribute¶
-
public void
setAttribute
(S solution, R2SolutionData value)¶
R2RankingAttribute¶
-
public class
R2RankingAttribute
<T extends Solution<?>> extends GenericSolutionAttribute<T, R2SolutionData>¶ Created by ajnebro on 10/9/15.
R2RankingNormalized¶
Constructors¶
R2RankingNormalized¶
-
public
R2RankingNormalized
(AbstractUtilityFunctionsSet<S> utilityFunctions, Normalizer normalizer)¶
TchebycheffUtilityFunctionsSet¶
-
public class
TchebycheffUtilityFunctionsSet
<S extends Solution<?>> extends AbstractUtilityFunctionsSet<S>¶ This class implements a set of utility functions based on the Tchebycheff aggregation approach
Author: Juan J. Durillo ToDo List: + check the size of nadir and reference points are the correct ones + check that the function that needs to be evaluated is the correct one
Parameters: - <S> –
org.uma.jmetal.algorithm.multiobjective.nsgaii¶
NSGAII¶
-
public class
NSGAII
<S extends Solution<?>> extends AbstractGeneticAlgorithm<S, List<S>>¶ Author: Antonio J. Nebro
Fields¶
dominanceComparator¶
-
protected Comparator<S>
dominanceComparator
¶
evaluator¶
-
protected final SolutionListEvaluator<S>
evaluator
¶
Constructors¶
NSGAII¶
-
public
NSGAII
(Problem<S> problem, int maxEvaluations, int populationSize, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, SolutionListEvaluator<S> evaluator)¶ Constructor
NSGAII¶
-
public
NSGAII
(Problem<S> problem, int maxEvaluations, int populationSize, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, Comparator<S> dominanceComparator, SolutionListEvaluator<S> evaluator)¶ Constructor
Methods¶
NSGAII45¶
-
public class
NSGAII45
<S extends Solution<?>> implements Algorithm<List<S>>¶ Implementation of NSGA-II following the scheme used in jMetal4.5 and former versions, i.e, without implementing the
AbstractGeneticAlgorithm
interface.Author: Antonio J. Nebro
Fields¶
crossoverOperator¶
-
protected CrossoverOperator<S>
crossoverOperator
¶
evaluator¶
-
protected final SolutionListEvaluator<S>
evaluator
¶
mutationOperator¶
-
protected MutationOperator<S>
mutationOperator
¶
selectionOperator¶
-
protected SelectionOperator<List<S>, S>
selectionOperator
¶
Constructors¶
NSGAII45¶
-
public
NSGAII45
(Problem<S> problem, int maxEvaluations, int populationSize, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, SolutionListEvaluator<S> evaluator)¶ Constructor
NSGAIIBuilder¶
-
public class
NSGAIIBuilder
<S extends Solution<?>> implements AlgorithmBuilder<NSGAII<S>>¶ Author: Antonio J. Nebro
Constructors¶
NSGAIIBuilder¶
-
public
NSGAIIBuilder
(Problem<S> problem, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator)¶ NSGAIIBuilder constructor
Methods¶
getCrossoverOperator¶
-
public CrossoverOperator<S>
getCrossoverOperator
()¶
getMutationOperator¶
-
public MutationOperator<S>
getMutationOperator
()¶
getSelectionOperator¶
-
public SelectionOperator<List<S>, S>
getSelectionOperator
()¶
getSolutionListEvaluator¶
-
public SolutionListEvaluator<S>
getSolutionListEvaluator
()¶
setDominanceComparator¶
-
public NSGAIIBuilder<S>
setDominanceComparator
(Comparator<S> dominanceComparator)¶
setMaxEvaluations¶
-
public NSGAIIBuilder<S>
setMaxEvaluations
(int maxEvaluations)¶
setPopulationSize¶
-
public NSGAIIBuilder<S>
setPopulationSize
(int populationSize)¶
setSelectionOperator¶
-
public NSGAIIBuilder<S>
setSelectionOperator
(SelectionOperator<List<S>, S> selectionOperator)¶
setSolutionListEvaluator¶
-
public NSGAIIBuilder<S>
setSolutionListEvaluator
(SolutionListEvaluator<S> evaluator)¶
setVariant¶
-
public NSGAIIBuilder<S>
setVariant
(NSGAIIVariant variant)¶
NSGAIIBuilder.NSGAIIVariant¶
-
public enum
NSGAIIVariant
¶
Enum Constants¶
Measures¶
-
public static final NSGAIIBuilder.NSGAIIVariant
Measures
¶
NSGAII¶
-
public static final NSGAIIBuilder.NSGAIIVariant
NSGAII
¶
NSGAII45¶
-
public static final NSGAIIBuilder.NSGAIIVariant
NSGAII45
¶
SteadyStateNSGAII¶
-
public static final NSGAIIBuilder.NSGAIIVariant
SteadyStateNSGAII
¶
NSGAIIBuilderTest¶
-
public class
NSGAIIBuilderTest
¶ Created by Antonio J. Nebro on 25/11/14.
Methods¶
NSGAIIIT¶
-
public class
NSGAIIIT
¶
NSGAIIMeasures¶
-
public class
NSGAIIMeasures
<S extends Solution<?>> extends NSGAII<S> implements Measurable¶ Author: Antonio J. Nebro
Fields¶
durationMeasure¶
-
protected DurationMeasure
durationMeasure
¶
evaluations¶
-
protected CountingMeasure
evaluations
¶
hypervolumeValue¶
-
protected BasicMeasure<Double>
hypervolumeValue
¶
measureManager¶
-
protected SimpleMeasureManager
measureManager
¶
numberOfNonDominatedSolutionsInPopulation¶
-
protected BasicMeasure<Integer>
numberOfNonDominatedSolutionsInPopulation
¶
solutionListMeasure¶
-
protected BasicMeasure<List<S>>
solutionListMeasure
¶
Constructors¶
NSGAIIMeasures¶
-
public
NSGAIIMeasures
(Problem<S> problem, int maxIterations, int populationSize, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, Comparator<S> dominanceComparator, SolutionListEvaluator<S> evaluator)¶ Constructor
Methods¶
getEvaluations¶
-
public CountingMeasure
getEvaluations
()¶
getMeasureManager¶
-
public MeasureManager
getMeasureManager
()¶
NSGAIIStoppingByTime¶
-
public class
NSGAIIStoppingByTime
<S extends Solution<?>> extends NSGAII<S>¶ This class shows a version of NSGA-II having a stopping condition depending on run-time
Author: Antonio J. Nebro
Constructors¶
NSGAIIStoppingByTime¶
-
public
NSGAIIStoppingByTime
(Problem<S> problem, int populationSize, long maxComputingTime, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, Comparator<S> dominanceComparator)¶ Constructor
Methods¶
SteadyStateNSGAII¶
Constructors¶
SteadyStateNSGAII¶
-
public
SteadyStateNSGAII
(Problem<S> problem, int maxEvaluations, int populationSize, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, Comparator<S> dominanceComparator, SolutionListEvaluator<S> evaluator)¶ Constructor
org.uma.jmetal.algorithm.multiobjective.nsgaiii¶
NSGAIII¶
-
public class
NSGAIII
<S extends Solution<?>> extends AbstractGeneticAlgorithm<S, List<S>>¶ Created by ajnebro on 30/10/14. Modified by Juanjo on 13/11/14 This implementation is based on the code of Tsung-Che Chiang http://web.ntnu.edu.tw/~tcchiang/publications/nsga3cpp/nsga3cpp.htm
Fields¶
evaluator¶
-
protected SolutionListEvaluator<S>
evaluator
¶
referencePoints¶
-
protected List<ReferencePoint<S>>
referencePoints
¶
Constructors¶
NSGAIII¶
-
public
NSGAIII
(NSGAIIIBuilder<S> builder)¶ Constructor
NSGAIIIBuilder¶
-
public class
NSGAIIIBuilder
<S extends Solution<?>> implements AlgorithmBuilder<NSGAIII<S>>¶ Builder class
Methods¶
getCrossoverOperator¶
-
public CrossoverOperator<S>
getCrossoverOperator
()¶
getEvaluator¶
-
public SolutionListEvaluator<S>
getEvaluator
()¶
getMutationOperator¶
-
public MutationOperator<S>
getMutationOperator
()¶
getSelectionOperator¶
-
public SelectionOperator<List<S>, S>
getSelectionOperator
()¶
setCrossoverOperator¶
-
public NSGAIIIBuilder<S>
setCrossoverOperator
(CrossoverOperator<S> crossoverOperator)¶
setMaxIterations¶
-
public NSGAIIIBuilder<S>
setMaxIterations
(int maxIterations)¶
setMutationOperator¶
-
public NSGAIIIBuilder<S>
setMutationOperator
(MutationOperator<S> mutationOperator)¶
setPopulationSize¶
-
public NSGAIIIBuilder<S>
setPopulationSize
(int populationSize)¶
setSelectionOperator¶
-
public NSGAIIIBuilder<S>
setSelectionOperator
(SelectionOperator<List<S>, S> selectionOperator)¶
setSolutionListEvaluator¶
-
public NSGAIIIBuilder<S>
setSolutionListEvaluator
(SolutionListEvaluator<S> evaluator)¶
org.uma.jmetal.algorithm.multiobjective.nsgaiii.util¶
EnvironmentalSelection¶
-
public class
EnvironmentalSelection
<S extends Solution<?>> implements SelectionOperator<List<S>, List<S>>, SolutionAttribute<S, List<Double>>¶
Constructors¶
EnvironmentalSelection.Builder¶
-
public static class
Builder
<S extends Solution<?>>¶
Methods¶
build¶
-
public EnvironmentalSelection<S>
build
()¶
getReferencePoints¶
-
public List<ReferencePoint<S>>
getReferencePoints
()¶
setReferencePoints¶
-
public Builder<S>
setReferencePoints
(List<ReferencePoint<S>> referencePoints)¶
ReferencePoint¶
-
public class
ReferencePoint
<S extends Solution<?>>¶ Created by ajnebro on 5/11/14. Modified by Juanjo on 13/11/14 This implementation is based on the code of Tsung-Che Chiang http://web.ntnu.edu.tw/~tcchiang/publications/nsga3cpp/nsga3cpp.htm
Constructors¶
ReferencePoint¶
-
public
ReferencePoint
(ReferencePoint<S> point)¶
org.uma.jmetal.algorithm.multiobjective.omopso¶
OMOPSO¶
-
public class
OMOPSO
extends AbstractParticleSwarmOptimization<DoubleSolution, List<DoubleSolution>>¶ Class implementing the OMOPSO algorithm
Fields¶
evaluator¶
-
SolutionListEvaluator<DoubleSolution>
evaluator
¶
Constructors¶
OMOPSO¶
-
public
OMOPSO
(DoubleProblem problem, SolutionListEvaluator<DoubleSolution> evaluator, int swarmSize, int maxIterations, int archiveSize, UniformMutation uniformMutation, NonUniformMutation nonUniformMutation)¶ Constructor
Methods¶
createInitialSwarm¶
-
protected List<DoubleSolution>
createInitialSwarm
()¶
evaluateSwarm¶
-
protected List<DoubleSolution>
evaluateSwarm
(List<DoubleSolution> swarm)¶
getResult¶
-
public List<DoubleSolution>
getResult
()¶
initializeLeader¶
-
protected void
initializeLeader
(List<DoubleSolution> swarm)¶
initializeParticlesMemory¶
-
protected void
initializeParticlesMemory
(List<DoubleSolution> swarm)¶
initializeVelocity¶
-
protected void
initializeVelocity
(List<DoubleSolution> swarm)¶
perturbation¶
-
protected void
perturbation
(List<DoubleSolution> swarm)¶ Apply a mutation operator to all particles in the swarm (perturbation)
updateLeaders¶
-
protected void
updateLeaders
(List<DoubleSolution> swarm)¶ Update leaders method
Parameters: - swarm – List of solutions (swarm)
updateParticlesMemory¶
-
protected void
updateParticlesMemory
(List<DoubleSolution> swarm)¶
updatePosition¶
-
protected void
updatePosition
(List<DoubleSolution> swarm)¶ Update the position of each particle
updateVelocity¶
-
protected void
updateVelocity
(List<DoubleSolution> swarm)¶
OMOPSOBuilder¶
-
public class
OMOPSOBuilder
implements AlgorithmBuilder<OMOPSO>¶ Class implementing the OMOPSO algorithm
Fields¶
evaluator¶
-
protected SolutionListEvaluator<DoubleSolution>
evaluator
¶
problem¶
-
protected DoubleProblem
problem
¶
Constructors¶
OMOPSOBuilder¶
-
public
OMOPSOBuilder
(DoubleProblem problem, SolutionListEvaluator<DoubleSolution> evaluator)¶
Methods¶
getNonUniformMutation¶
-
public NonUniformMutation
getNonUniformMutation
()¶
getUniformMutation¶
-
public UniformMutation
getUniformMutation
()¶
setArchiveSize¶
-
public OMOPSOBuilder
setArchiveSize
(int archiveSize)¶
setMaxIterations¶
-
public OMOPSOBuilder
setMaxIterations
(int maxIterations)¶
setNonUniformMutation¶
-
public OMOPSOBuilder
setNonUniformMutation
(MutationOperator<DoubleSolution> nonUniformMutation)¶
setSwarmSize¶
-
public OMOPSOBuilder
setSwarmSize
(int swarmSize)¶
setUniformMutation¶
-
public OMOPSOBuilder
setUniformMutation
(MutationOperator<DoubleSolution> uniformMutation)¶
org.uma.jmetal.algorithm.multiobjective.paes¶
PAES¶
-
public class
PAES
<S extends Solution<?>> extends AbstractEvolutionStrategy<S, List<S>>¶ Author: Antonio J. Nebro, Juan J. Durillo
Fields¶
archive¶
-
protected AdaptiveGridArchive<S>
archive
¶
comparator¶
-
protected Comparator<S>
comparator
¶
Constructors¶
PAES¶
-
public
PAES
(Problem<S> problem, int archiveSize, int maxEvaluations, int biSections, MutationOperator<S> mutationOperator)¶ Constructor
Methods¶
getMutationOperator¶
-
public MutationOperator<S>
getMutationOperator
()¶
test¶
-
public S
test
(S solution, S mutatedSolution, AdaptiveGridArchive<S> archive)¶ Tests two solutions to determine which one becomes be the guide of PAES algorithm
Parameters: - solution – The actual guide of PAES
- mutatedSolution – A candidate guide
PAESBuilder¶
-
public class
PAESBuilder
<S extends Solution<?>> implements AlgorithmBuilder<PAES<S>>¶ Author: Antonio J. Nebro
Methods¶
getMutationOperator¶
-
public MutationOperator<S>
getMutationOperator
()¶
setArchiveSize¶
-
public PAESBuilder<S>
setArchiveSize
(int archiveSize)¶
setBiSections¶
-
public PAESBuilder<S>
setBiSections
(int biSections)¶
setMaxEvaluations¶
-
public PAESBuilder<S>
setMaxEvaluations
(int maxEvaluations)¶
setMutationOperator¶
-
public PAESBuilder<S>
setMutationOperator
(MutationOperator<S> mutation)¶
org.uma.jmetal.algorithm.multiobjective.pesa2¶
PESA2¶
-
public class
PESA2
<S extends Solution<?>> extends AbstractGeneticAlgorithm<S, List<S>>¶ Author: Antonio J. Nebro
Fields¶
evaluator¶
-
protected final SolutionListEvaluator<S>
evaluator
¶
selectionOperator¶
-
protected SelectionOperator<AdaptiveGridArchive<S>, S>
selectionOperator
¶
Constructors¶
PESA2¶
-
public
PESA2
(Problem<S> problem, int maxEvaluations, int populationSize, int archiveSize, int biSections, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SolutionListEvaluator<S> evaluator)¶
Methods¶
PESA2Builder¶
-
public class
PESA2Builder
<S extends Solution<?>> implements AlgorithmBuilder<PESA2<S>>¶ Created by Antonio J. Nebro
Constructors¶
PESA2Builder¶
-
public
PESA2Builder
(Problem<S> problem, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator)¶ Constructor
Methods¶
getCrossoverOperator¶
-
public CrossoverOperator<S>
getCrossoverOperator
()¶
getMutationOperator¶
-
public MutationOperator<S>
getMutationOperator
()¶
getSolutionListEvaluator¶
-
public SolutionListEvaluator<S>
getSolutionListEvaluator
()¶
setArchiveSize¶
-
public PESA2Builder<S>
setArchiveSize
(int archiveSize)¶
setBisections¶
-
public PESA2Builder<S>
setBisections
(int biSections)¶
setMaxEvaluations¶
-
public PESA2Builder<S>
setMaxEvaluations
(int maxEvaluations)¶
setPopulationSize¶
-
public PESA2Builder<S>
setPopulationSize
(int populationSize)¶
setSolutionListEvaluator¶
-
public PESA2Builder<S>
setSolutionListEvaluator
(SolutionListEvaluator<S> evaluator)¶
org.uma.jmetal.algorithm.multiobjective.pesa2.util¶
PESA2Selection¶
-
public class
PESA2Selection
<S extends Solution<?>> implements SelectionOperator<AdaptiveGridArchive<S>, S>¶ This class implements a selection operator as the used in the PESA-II algorithm
Methods¶
execute¶
-
public S
execute
(AdaptiveGridArchive<S> archive)¶
org.uma.jmetal.algorithm.multiobjective.randomsearch¶
RandomSearch¶
-
public class
RandomSearch
<S extends Solution<?>> implements Algorithm<List<S>>¶ This class implements a simple random search algorithm.
Author: Antonio J. Nebro
Fields¶
nonDominatedArchive¶
-
NonDominatedSolutionListArchive<S>
nonDominatedArchive
¶
Constructors¶
RandomSearchBuilder¶
-
public class
RandomSearchBuilder
<S extends Solution<?>> implements AlgorithmBuilder<RandomSearch<S>>¶ This class implements a simple random search algorithm.
Author: Antonio J. Nebro
Methods¶
build¶
-
public RandomSearch<S>
build
()¶
setMaxEvaluations¶
-
public RandomSearchBuilder<S>
setMaxEvaluations
(int maxEvaluations)¶
org.uma.jmetal.algorithm.multiobjective.rnsgaii¶
RNSGAII¶
-
public class
RNSGAII
<S extends Solution<?>> extends NSGAII<S> implements InteractiveAlgorithm<S, List<S>>¶ Author: Antonio J. Nebro
Constructors¶
RNSGAII¶
-
public
RNSGAII
(Problem<S> problem, int maxEvaluations, int populationSize, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, SolutionListEvaluator<S> evaluator, List<Double> interestPoint, double epsilon)¶ Constructor
Methods¶
RNSGAIIBuilder¶
-
public class
RNSGAIIBuilder
<S extends Solution<?>> implements AlgorithmBuilder<RNSGAII<S>>¶ Author: Antonio J. Nebro
Constructors¶
RNSGAIIBuilder¶
-
public
RNSGAIIBuilder
(Problem<S> problem, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, List<Double> interestPoint, double epsilon)¶ NSGAIIBuilder constructor
Methods¶
getCrossoverOperator¶
-
public CrossoverOperator<S>
getCrossoverOperator
()¶
getMutationOperator¶
-
public MutationOperator<S>
getMutationOperator
()¶
getSelectionOperator¶
-
public SelectionOperator<List<S>, S>
getSelectionOperator
()¶
getSolutionListEvaluator¶
-
public SolutionListEvaluator<S>
getSolutionListEvaluator
()¶
setMaxEvaluations¶
-
public RNSGAIIBuilder<S>
setMaxEvaluations
(int maxEvaluations)¶
setPopulationSize¶
-
public RNSGAIIBuilder<S>
setPopulationSize
(int populationSize)¶
setSelectionOperator¶
-
public RNSGAIIBuilder<S>
setSelectionOperator
(SelectionOperator<List<S>, S> selectionOperator)¶
setSolutionListEvaluator¶
-
public RNSGAIIBuilder<S>
setSolutionListEvaluator
(SolutionListEvaluator<S> evaluator)¶
setVariant¶
-
public RNSGAIIBuilder<S>
setVariant
(NSGAIIVariant variant)¶
RNSGAIIBuilder.NSGAIIVariant¶
-
public enum
NSGAIIVariant
¶
Enum Constants¶
Measures¶
-
public static final RNSGAIIBuilder.NSGAIIVariant
Measures
¶
NSGAII¶
-
public static final RNSGAIIBuilder.NSGAIIVariant
NSGAII
¶
NSGAII45¶
-
public static final RNSGAIIBuilder.NSGAIIVariant
NSGAII45
¶
SteadyStateNSGAII¶
-
public static final RNSGAIIBuilder.NSGAIIVariant
SteadyStateNSGAII
¶
org.uma.jmetal.algorithm.multiobjective.rnsgaii.util¶
RNSGAIIRanking¶
-
public class
RNSGAIIRanking
<S extends Solution<?>> extends GenericSolutionAttribute<S, Integer> implements Ranking<S>¶
Constructors¶
RNSGAIIRanking¶
-
public
RNSGAIIRanking
(PreferenceNSGAII<S> utilityFunctions, double epsilon, List<Double> interestPoint)¶
org.uma.jmetal.algorithm.multiobjective.smpso¶
SMPSO¶
-
public class
SMPSO
extends AbstractParticleSwarmOptimization<DoubleSolution, List<DoubleSolution>>¶ This class implements the SMPSO algorithm described in: SMPSO: A new PSO-based metaheuristic for multi-objective optimization MCDM 2009. DOI: http://dx.doi.org/10.1109/MCDM.2009.4938830
Author: Antonio J. Nebro
Constructors¶
SMPSO¶
-
public
SMPSO
(DoubleProblem problem, int swarmSize, BoundedArchive<DoubleSolution> leaders, MutationOperator<DoubleSolution> mutationOperator, int maxIterations, double r1Min, double r1Max, double r2Min, double r2Max, double c1Min, double c1Max, double c2Min, double c2Max, double weightMin, double weightMax, double changeVelocity1, double changeVelocity2, SolutionListEvaluator<DoubleSolution> evaluator)¶ Constructor
Methods¶
createInitialSwarm¶
-
protected List<DoubleSolution>
createInitialSwarm
()¶
evaluateSwarm¶
-
protected List<DoubleSolution>
evaluateSwarm
(List<DoubleSolution> swarm)¶
getResult¶
-
public List<DoubleSolution>
getResult
()¶
initializeLeader¶
-
protected void
initializeLeader
(List<DoubleSolution> swarm)¶
initializeParticlesMemory¶
-
protected void
initializeParticlesMemory
(List<DoubleSolution> swarm)¶
initializeVelocity¶
-
protected void
initializeVelocity
(List<DoubleSolution> swarm)¶
perturbation¶
-
protected void
perturbation
(List<DoubleSolution> swarm)¶
selectGlobalBest¶
-
protected DoubleSolution
selectGlobalBest
()¶
updateLeaders¶
-
protected void
updateLeaders
(List<DoubleSolution> swarm)¶
updateParticlesMemory¶
-
protected void
updateParticlesMemory
(List<DoubleSolution> swarm)¶
updatePosition¶
-
protected void
updatePosition
(List<DoubleSolution> swarm)¶
updateVelocity¶
-
protected void
updateVelocity
(List<DoubleSolution> swarm)¶
SMPSOBuilder¶
-
public class
SMPSOBuilder
implements AlgorithmBuilder<SMPSO>¶ Author: Antonio J. Nebro
Fields¶
evaluator¶
-
protected SolutionListEvaluator<DoubleSolution>
evaluator
¶
leaders¶
-
protected BoundedArchive<DoubleSolution>
leaders
¶
mutationOperator¶
-
protected MutationOperator<DoubleSolution>
mutationOperator
¶
variant¶
-
protected SMPSOVariant
variant
¶
Constructors¶
SMPSOBuilder¶
-
public
SMPSOBuilder
(DoubleProblem problem, BoundedArchive<DoubleSolution> leaders)¶
Methods¶
getEvaluator¶
-
public SolutionListEvaluator<DoubleSolution>
getEvaluator
()¶
getLeaders¶
-
public BoundedArchive<DoubleSolution>
getLeaders
()¶
getMutation¶
-
public MutationOperator<DoubleSolution>
getMutation
()¶
getMutationOperator¶
-
public MutationOperator<DoubleSolution>
getMutationOperator
()¶
getProblem¶
-
public DoubleProblem
getProblem
()¶
setC1Max¶
-
public SMPSOBuilder
setC1Max
(double c1Max)¶
setC1Min¶
-
public SMPSOBuilder
setC1Min
(double c1Min)¶
setC2Max¶
-
public SMPSOBuilder
setC2Max
(double c2Max)¶
setC2Min¶
-
public SMPSOBuilder
setC2Min
(double c2Min)¶
setChangeVelocity1¶
-
public SMPSOBuilder
setChangeVelocity1
(double changeVelocity1)¶
setChangeVelocity2¶
-
public SMPSOBuilder
setChangeVelocity2
(double changeVelocity2)¶
setMaxIterations¶
-
public SMPSOBuilder
setMaxIterations
(int maxIterations)¶
setMutation¶
-
public SMPSOBuilder
setMutation
(MutationOperator<DoubleSolution> mutation)¶
setR1Max¶
-
public SMPSOBuilder
setR1Max
(double r1Max)¶
setR1Min¶
-
public SMPSOBuilder
setR1Min
(double r1Min)¶
setR2Max¶
-
public SMPSOBuilder
setR2Max
(double r2Max)¶
setR2Min¶
-
public SMPSOBuilder
setR2Min
(double r2Min)¶
setRandomGenerator¶
-
public SMPSOBuilder
setRandomGenerator
(PseudoRandomGenerator randomGenerator)¶
setSolutionListEvaluator¶
-
public SMPSOBuilder
setSolutionListEvaluator
(SolutionListEvaluator<DoubleSolution> evaluator)¶
setSwarmSize¶
-
public SMPSOBuilder
setSwarmSize
(int swarmSize)¶
setVariant¶
-
public SMPSOBuilder
setVariant
(SMPSOVariant variant)¶
setWeightMax¶
-
public SMPSOBuilder
setWeightMax
(double weightMax)¶
setWeightMin¶
-
public SMPSOBuilder
setWeightMin
(double weightMin)¶
SMPSOBuilder.SMPSOVariant¶
-
public enum
SMPSOVariant
¶
Enum Constants¶
Measures¶
-
public static final SMPSOBuilder.SMPSOVariant
Measures
¶
SMPSO¶
-
public static final SMPSOBuilder.SMPSOVariant
SMPSO
¶
SMPSOIT¶
-
public class
SMPSOIT
¶
Methods¶
shouldTheAlgorithmReturnAGoodQualityFrontWhenSolvingAConstrainedProblem¶
-
public void
shouldTheAlgorithmReturnAGoodQualityFrontWhenSolvingAConstrainedProblem
()¶
SMPSOMeasures¶
-
public class
SMPSOMeasures
extends SMPSO implements Measurable¶ This class implements a version of SMPSO using measures
Author: Antonio J. Nebro
Fields¶
durationMeasure¶
-
protected DurationMeasure
durationMeasure
¶
iterations¶
-
protected CountingMeasure
iterations
¶
measureManager¶
-
protected SimpleMeasureManager
measureManager
¶
solutionListMeasure¶
-
protected BasicMeasure<List<DoubleSolution>>
solutionListMeasure
¶
Constructors¶
SMPSOMeasures¶
-
public
SMPSOMeasures
(DoubleProblem problem, int swarmSize, BoundedArchive<DoubleSolution> leaders, MutationOperator<DoubleSolution> mutationOperator, int maxIterations, double r1Min, double r1Max, double r2Min, double r2Max, double c1Min, double c1Max, double c2Min, double c2Max, double weightMin, double weightMax, double changeVelocity1, double changeVelocity2, SolutionListEvaluator<DoubleSolution> evaluator)¶ Constructor
Parameters: - problem –
- swarmSize –
- leaders –
- mutationOperator –
- maxIterations –
- r1Min –
- r1Max –
- r2Min –
- r2Max –
- c1Min –
- c1Max –
- c2Min –
- c2Max –
- weightMin –
- weightMax –
- changeVelocity1 –
- changeVelocity2 –
- evaluator –
Methods¶
getMeasureManager¶
-
public MeasureManager
getMeasureManager
()¶
SMPSORP¶
-
public class
SMPSORP
extends AbstractParticleSwarmOptimization<DoubleSolution, List<DoubleSolution>> implements Measurable¶ This class implements the SMPSORP algorithm described in: “Extending the Speed-constrained Multi-Objective PSO (SMPSO) With Reference Point Based Preference Articulation. Antonio J. Nebro, Juan J. Durillo, José García-Nieto, Cristóbal Barba-González, Javier Del Ser, Carlos A. Coello Coello, Antonio Benítez-Hidalgo, José F. Aldana-Montes. Parallel Problem Solving from Nature – PPSN XV. Lecture Notes In Computer Science, Vol. 11101, pp. 298-310. 2018”.
Author: Antonio J. Nebro
Fields¶
currentIteration¶
-
protected CountingMeasure
currentIteration
¶
durationMeasure¶
-
protected DurationMeasure
durationMeasure
¶
evaluator¶
-
protected SolutionListEvaluator<DoubleSolution>
evaluator
¶
leaders¶
-
public List<ArchiveWithReferencePoint<DoubleSolution>>
leaders
¶
measureManager¶
-
protected SimpleMeasureManager
measureManager
¶
solutionListMeasure¶
-
protected BasicMeasure<List<DoubleSolution>>
solutionListMeasure
¶
Constructors¶
SMPSORP¶
-
public
SMPSORP
(DoubleProblem problem, int swarmSize, List<ArchiveWithReferencePoint<DoubleSolution>> leaders, List<List<Double>> referencePoints, MutationOperator<DoubleSolution> mutationOperator, int maxIterations, double r1Min, double r1Max, double r2Min, double r2Max, double c1Min, double c1Max, double c2Min, double c2Max, double weightMin, double weightMax, double changeVelocity1, double changeVelocity2, SolutionListEvaluator<DoubleSolution> evaluator)¶ Constructor
Methods¶
changeReferencePoints¶
createInitialSwarm¶
-
protected List<DoubleSolution>
createInitialSwarm
()¶
evaluateSwarm¶
-
protected List<DoubleSolution>
evaluateSwarm
(List<DoubleSolution> swarm)¶
getMeasureManager¶
-
public MeasureManager
getMeasureManager
()¶
getResult¶
-
public List<DoubleSolution>
getResult
()¶
initializeLeader¶
-
protected void
initializeLeader
(List<DoubleSolution> swarm)¶
initializeParticlesMemory¶
-
protected void
initializeParticlesMemory
(List<DoubleSolution> swarm)¶
initializeVelocity¶
-
protected void
initializeVelocity
(List<DoubleSolution> swarm)¶
perturbation¶
-
protected void
perturbation
(List<DoubleSolution> swarm)¶
selectGlobalBest¶
-
protected DoubleSolution
selectGlobalBest
()¶
updateLeaders¶
-
protected void
updateLeaders
(List<DoubleSolution> swarm)¶
updateParticlesMemory¶
-
protected void
updateParticlesMemory
(List<DoubleSolution> swarm)¶
updatePosition¶
-
protected void
updatePosition
(List<DoubleSolution> swarm)¶
updateVelocity¶
-
protected void
updateVelocity
(List<DoubleSolution> swarm)¶
org.uma.jmetal.algorithm.multiobjective.smsemoa¶
SMSEMOA¶
-
public class
SMSEMOA
<S extends Solution<?>> extends AbstractGeneticAlgorithm<S, List<S>>¶ Author: Antonio J. Nebro
Fields¶
dominanceComparator¶
-
protected Comparator<S>
dominanceComparator
¶
Constructors¶
SMSEMOA¶
-
public
SMSEMOA
(Problem<S> problem, int maxEvaluations, int populationSize, double offset, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, Comparator<S> dominanceComparator, Hypervolume<S> hypervolumeImplementation)¶ Constructor
Methods¶
SMSEMOABuilder¶
-
public class
SMSEMOABuilder
<S extends Solution<?>> implements AlgorithmBuilder<SMSEMOA<S>>¶ Author: Antonio J. Nebro
Fields¶
crossoverOperator¶
-
protected CrossoverOperator<S>
crossoverOperator
¶
dominanceComparator¶
-
protected Comparator<S>
dominanceComparator
¶
hypervolumeImplementation¶
-
protected Hypervolume<S>
hypervolumeImplementation
¶
mutationOperator¶
-
protected MutationOperator<S>
mutationOperator
¶
selectionOperator¶
-
protected SelectionOperator<List<S>, S>
selectionOperator
¶
Constructors¶
SMSEMOABuilder¶
-
public
SMSEMOABuilder
(Problem<S> problem, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator)¶
Methods¶
getCrossoverOperator¶
-
public CrossoverOperator<S>
getCrossoverOperator
()¶
getMutationOperator¶
-
public MutationOperator<S>
getMutationOperator
()¶
getSelectionOperator¶
-
public SelectionOperator<List<S>, S>
getSelectionOperator
()¶
setCrossoverOperator¶
-
public SMSEMOABuilder<S>
setCrossoverOperator
(CrossoverOperator<S> crossover)¶
setDominanceComparator¶
-
public SMSEMOABuilder<S>
setDominanceComparator
(Comparator<S> dominanceComparator)¶
setHypervolumeImplementation¶
-
public SMSEMOABuilder<S>
setHypervolumeImplementation
(Hypervolume<S> hypervolumeImplementation)¶
setMaxEvaluations¶
-
public SMSEMOABuilder<S>
setMaxEvaluations
(int maxEvaluations)¶
setMutationOperator¶
-
public SMSEMOABuilder<S>
setMutationOperator
(MutationOperator<S> mutation)¶
setOffset¶
-
public SMSEMOABuilder<S>
setOffset
(double offset)¶
setPopulationSize¶
-
public SMSEMOABuilder<S>
setPopulationSize
(int populationSize)¶
setSelectionOperator¶
-
public SMSEMOABuilder<S>
setSelectionOperator
(SelectionOperator<List<S>, S> selection)¶
org.uma.jmetal.algorithm.multiobjective.spea2¶
SPEA2¶
-
public class
SPEA2
<S extends Solution<?>> extends AbstractGeneticAlgorithm<S, List<S>>¶ Author: Juan J. Durillo
Fields¶
environmentalSelection¶
-
protected final EnvironmentalSelection<S>
environmentalSelection
¶
evaluator¶
-
protected final SolutionListEvaluator<S>
evaluator
¶
strenghtRawFitness¶
-
protected final StrengthRawFitness<S>
strenghtRawFitness
¶
Constructors¶
SPEA2¶
-
public
SPEA2
(Problem<S> problem, int maxIterations, int populationSize, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, SolutionListEvaluator<S> evaluator)¶
Methods¶
SPEA2Builder¶
-
public class
SPEA2Builder
<S extends Solution<?>> implements AlgorithmBuilder<SPEA2<S>>¶ Author: Juan J. Durillo
Fields¶
crossoverOperator¶
-
protected CrossoverOperator<S>
crossoverOperator
¶
evaluator¶
-
protected SolutionListEvaluator<S>
evaluator
¶
mutationOperator¶
-
protected MutationOperator<S>
mutationOperator
¶
selectionOperator¶
-
protected SelectionOperator<List<S>, S>
selectionOperator
¶
Constructors¶
SPEA2Builder¶
-
public
SPEA2Builder
(Problem<S> problem, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator)¶ SPEA2Builder constructor
Methods¶
getCrossoverOperator¶
-
public CrossoverOperator<S>
getCrossoverOperator
()¶
getMutationOperator¶
-
public MutationOperator<S>
getMutationOperator
()¶
getSelectionOperator¶
-
public SelectionOperator<List<S>, S>
getSelectionOperator
()¶
getSolutionListEvaluator¶
-
public SolutionListEvaluator<S>
getSolutionListEvaluator
()¶
setMaxIterations¶
-
public SPEA2Builder<S>
setMaxIterations
(int maxIterations)¶
setPopulationSize¶
-
public SPEA2Builder<S>
setPopulationSize
(int populationSize)¶
setSelectionOperator¶
-
public SPEA2Builder<S>
setSelectionOperator
(SelectionOperator<List<S>, S> selectionOperator)¶
setSolutionListEvaluator¶
-
public SPEA2Builder<S>
setSolutionListEvaluator
(SolutionListEvaluator<S> evaluator)¶
org.uma.jmetal.algorithm.multiobjective.spea2.util¶
EnvironmentalSelection¶
-
public class
EnvironmentalSelection
<S extends Solution<?>> implements SelectionOperator<List<S>, List<S>>¶ Author: Juanjo Durillo
Parameters: - <S> –
org.uma.jmetal.algorithm.multiobjective.wasfga¶
WASFGA¶
-
public class
WASFGA
<S extends Solution<?>> extends AbstractMOMBI<S> implements InteractiveAlgorithm<S, List<S>>¶ Implementation of the preference based algorithm named WASF-GA on jMetal5.0
Author: Juanjo Durillo This algorithm is described in the paper: A.B. Ruiz, R. Saborido, M. Luque “A Preference-based Evolutionary Algorithm for Multiobjective Optimization: The Weighting Achievement Scalarizing Function Genetic Algorithm”. Journal of Global Optimization. May 2015, Volume 62, Issue 1, pp 101-129 DOI = {10.1007/s10898-014-0214-y}
Fields¶
Constructors¶
WASFGA¶
-
public
WASFGA
(Problem<S> problem, int populationSize, int maxIterations, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, SolutionListEvaluator<S> evaluator, double epsilon, List<Double> referencePoint, String weightVectorsFileName)¶ Constructor
Parameters: - problem – Problem to solve
WASFGA¶
-
public
WASFGA
(Problem<S> problem, int populationSize, int maxIterations, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, SolutionListEvaluator<S> evaluator, double epsilon, List<Double> referencePoint)¶ Constructor
Parameters: - problem – Problem to solve
WASFGAIT¶
-
public class
WASFGAIT
¶
Methods¶
shouldTheAlgorithmReturnANumberOfSolutionsWhenSolvingASimpleProblem¶
-
public void
shouldTheAlgorithmReturnANumberOfSolutionsWhenSolvingASimpleProblem
()¶
WASFGAMeasures¶
-
public class
WASFGAMeasures
<S extends Solution<?>> extends WASFGA<S> implements Measurable¶ Implementation of the preference based algorithm named WASF-GA on jMetal5.0
Author: Jorge Rodriguez
Fields¶
durationMeasure¶
-
protected DurationMeasure
durationMeasure
¶
iterations¶
-
protected CountingMeasure
iterations
¶
measureManager¶
-
protected SimpleMeasureManager
measureManager
¶
solutionListMeasure¶
-
protected BasicMeasure<List<S>>
solutionListMeasure
¶
Constructors¶
WASFGAMeasures¶
-
public
WASFGAMeasures
(Problem<S> problem, int populationSize, int maxIterations, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, SolutionListEvaluator<S> evaluator, double epsilon, List<Double> referencePoint, String weightVectorsFileName)¶ Constructor
Parameters: - problem – Problem to solve
WASFGAMeasures¶
-
public
WASFGAMeasures
(Problem<S> problem, int populationSize, int maxIterations, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, SolutionListEvaluator<S> evaluator, double epsilon, List<Double> referencePoint)¶ Constructor
Parameters: - problem – Problem to solve
Methods¶
getMeasureManager¶
-
public MeasureManager
getMeasureManager
()¶
org.uma.jmetal.algorithm.multiobjective.wasfga.util¶
WASFGARanking¶
-
public class
WASFGARanking
<S extends Solution<?>> extends GenericSolutionAttribute<S, Integer> implements Ranking<S>¶ Author: Rubén Saborido Implementation of the ranking procedure for the preference based algorithm named WASF-GA on jMetal5.0 It classifies solutions into different fronts. If the problem contains constraints, after feasible solutions it classifies the unfeasible solutions into fronts: - Each unfeasible solutions goes into a different front. - Unfeasible solutions with lower number of violated constraints are preferred. - If two solutions have equal number of violated constraints it compares the overall constraint values. - If two solutions have equal overall constraint values it compares de values of the utility function.
Constructors¶
WASFGARanking¶
-
public
WASFGARanking
(AbstractUtilityFunctionsSet<S> utilityFunctions)¶
Methods¶
getUtilityFunctions¶
-
public AbstractUtilityFunctionsSet<S>
getUtilityFunctions
()¶
WeightVectors¶
-
public class
WeightVectors
¶ Author: Rubén Saborido Infantes This class offers different methods to manipulate weight vectors.
Methods¶
initializeUniformlyInTwoDimensions¶
-
public static double[][]
initializeUniformlyInTwoDimensions
(double epsilon, int numberOfWeights)¶ Generate uniform weight vectors in two dimension
Parameters: - epsilon – Distance between each component of the weight vector
- numberOfWeights – Number of weight vectors to generate
Returns: A set of weight vectors
invert¶
-
public static double[][]
invert
(double[][] weights, boolean normalize)¶ Calculate the inverse of a set of weight vectors
Parameters: - weights – A set of weight vectors
- normalize – True if the weights should be normalize by the sum of the components
Returns: A set of weight vectors
readFromFile¶
readFromResourcesInJMetal¶
validate¶
-
public static boolean
validate
(double[][] weights, int numberOfComponents)¶ Validate if the number of components of all weight vectors has the expected dimensionality.
Parameters: - weights – Weight vectors to validate
- numberOfComponents – Number of components each weight vector must have
Returns: True if the weight vectors are correct, False if the weight vectors are incorrect
org.uma.jmetal.algorithm.singleobjective.coralreefsoptimization¶
CoralReefsOptimization¶
-
public class
CoralReefsOptimization
<S> extends AbstractCoralReefsOptimization<S, List<S>>¶ Author: Inacio Medeiros
Constructors¶
CoralReefsOptimization¶
-
public
CoralReefsOptimization
(Problem<S> problem, int maxEvaluations, Comparator<S> comparator, SelectionOperator<List<S>, S> selectionOperator, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, int n, int m, double rho, double fbs, double fa, double pd, int attemptsToSettle)¶
CoralReefsOptimizationBuilder¶
-
public class
CoralReefsOptimizationBuilder
<S extends Solution<?>> implements AlgorithmBuilder<CoralReefsOptimization<S>>¶ Author: Inacio Medeiros
Constructors¶
CoralReefsOptimizationBuilder¶
-
public
CoralReefsOptimizationBuilder
(Problem<S> problem, SelectionOperator<List<S>, S> selectionOperator, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator)¶ CoralReefsOptimizationBuilder constructor
Methods¶
build¶
-
public CoralReefsOptimization<S>
build
()¶
getComparator¶
-
public Comparator<S>
getComparator
()¶
getCrossoverOperator¶
-
public CrossoverOperator<S>
getCrossoverOperator
()¶
getMutationOperator¶
-
public MutationOperator<S>
getMutationOperator
()¶
getSelectionOperator¶
-
public SelectionOperator<List<S>, S>
getSelectionOperator
()¶
setAttemptsToSettle¶
-
public CoralReefsOptimizationBuilder<S>
setAttemptsToSettle
(int attemptsToSettle)¶
setComparator¶
-
public CoralReefsOptimizationBuilder<S>
setComparator
(Comparator<S> comparator)¶
setFa¶
-
public CoralReefsOptimizationBuilder<S>
setFa
(double fa)¶
setFbr¶
-
public CoralReefsOptimizationBuilder<S>
setFbr
(double fbr)¶
setFbs¶
-
public CoralReefsOptimizationBuilder<S>
setFbs
(double fbs)¶
setFd¶
-
public CoralReefsOptimizationBuilder<S>
setFd
(double fd)¶
setM¶
-
public CoralReefsOptimizationBuilder<S>
setM
(int m)¶
setMaxEvaluations¶
-
public CoralReefsOptimizationBuilder<S>
setMaxEvaluations
(int maxEvaluations)¶
setN¶
-
public CoralReefsOptimizationBuilder<S>
setN
(int n)¶
setPd¶
-
public CoralReefsOptimizationBuilder<S>
setPd
(double pd)¶
setRho¶
-
public CoralReefsOptimizationBuilder<S>
setRho
(double rho)¶
org.uma.jmetal.algorithm.singleobjective.differentialevolution¶
DifferentialEvolution¶
-
public class
DifferentialEvolution
extends AbstractDifferentialEvolution<DoubleSolution>¶ This class implements a differential evolution algorithm.
Author: Antonio J. Nebro
Constructors¶
DifferentialEvolution¶
-
public
DifferentialEvolution
(DoubleProblem problem, int maxEvaluations, int populationSize, DifferentialEvolutionCrossover crossoverOperator, DifferentialEvolutionSelection selectionOperator, SolutionListEvaluator<DoubleSolution> evaluator)¶ Constructor
Parameters: - problem – Problem to solve
- maxEvaluations – Maximum number of evaluations to perform
- populationSize –
- crossoverOperator –
- selectionOperator –
- evaluator –
Methods¶
createInitialPopulation¶
-
protected List<DoubleSolution>
createInitialPopulation
()¶
evaluatePopulation¶
-
protected List<DoubleSolution>
evaluatePopulation
(List<DoubleSolution> population)¶
getResult¶
-
public DoubleSolution
getResult
()¶ Returns the best individual
replacement¶
-
protected List<DoubleSolution>
replacement
(List<DoubleSolution> population, List<DoubleSolution> offspringPopulation)¶
reproduction¶
-
protected List<DoubleSolution>
reproduction
(List<DoubleSolution> matingPopulation)¶
selection¶
-
protected List<DoubleSolution>
selection
(List<DoubleSolution> population)¶
DifferentialEvolutionBuilder¶
-
public class
DifferentialEvolutionBuilder
¶ DifferentialEvolutionBuilder class
Author: Antonio J. Nebro
Constructors¶
DifferentialEvolutionBuilder¶
-
public
DifferentialEvolutionBuilder
(DoubleProblem problem)¶
Methods¶
build¶
-
public DifferentialEvolution
build
()¶
getCrossoverOperator¶
-
public DifferentialEvolutionCrossover
getCrossoverOperator
()¶
getProblem¶
-
public DoubleProblem
getProblem
()¶
getSelectionOperator¶
-
public DifferentialEvolutionSelection
getSelectionOperator
()¶
getSolutionListEvaluator¶
-
public SolutionListEvaluator<DoubleSolution>
getSolutionListEvaluator
()¶
setCrossover¶
-
public DifferentialEvolutionBuilder
setCrossover
(DifferentialEvolutionCrossover crossover)¶
setMaxEvaluations¶
-
public DifferentialEvolutionBuilder
setMaxEvaluations
(int maxEvaluations)¶
setPopulationSize¶
-
public DifferentialEvolutionBuilder
setPopulationSize
(int populationSize)¶
setSelection¶
-
public DifferentialEvolutionBuilder
setSelection
(DifferentialEvolutionSelection selection)¶
setSolutionListEvaluator¶
-
public DifferentialEvolutionBuilder
setSolutionListEvaluator
(SolutionListEvaluator<DoubleSolution> evaluator)¶
DifferentialEvolutionBuilderTest¶
-
public class
DifferentialEvolutionBuilderTest
¶ Created by ajnebro on 25/11/14.
Methods¶
DifferentialEvolutionTestIT¶
-
public class
DifferentialEvolutionTestIT
¶ Created by Antonio J. Nebro on 25/11/14.
Methods¶
shouldCreateInitialPopulationWhenPopulationSizeIsBiggerThanZero¶
-
public void
shouldCreateInitialPopulationWhenPopulationSizeIsBiggerThanZero
()¶
shouldCreateInitialPopulationWhenPopulationSizeIsZero¶
-
public void
shouldCreateInitialPopulationWhenPopulationSizeIsZero
()¶
shouldGetResultReturnsThenReturnTheBestIndividual¶
-
public void
shouldGetResultReturnsThenReturnTheBestIndividual
()¶
shouldIsStoppingConditionReachedWhenEvaluationsBiggerThenMaxEvaluations¶
-
public void
shouldIsStoppingConditionReachedWhenEvaluationsBiggerThenMaxEvaluations
()¶
shouldIsStoppingConditionReachedWhenEvaluationsEqualToMaxEvaluations¶
-
public void
shouldIsStoppingConditionReachedWhenEvaluationsEqualToMaxEvaluations
()¶
org.uma.jmetal.algorithm.singleobjective.evolutionstrategy¶
CovarianceMatrixAdaptationEvolutionStrategy¶
-
public class
CovarianceMatrixAdaptationEvolutionStrategy
extends AbstractEvolutionStrategy<DoubleSolution, DoubleSolution>¶ Class implementing the CMA-ES algorithm
Methods¶
createInitialPopulation¶
-
protected List<DoubleSolution>
createInitialPopulation
()¶
evaluatePopulation¶
-
protected List<DoubleSolution>
evaluatePopulation
(List<DoubleSolution> population)¶
getResult¶
-
public DoubleSolution
getResult
()¶
replacement¶
-
protected List<DoubleSolution>
replacement
(List<DoubleSolution> population, List<DoubleSolution> offspringPopulation)¶
reproduction¶
-
protected List<DoubleSolution>
reproduction
(List<DoubleSolution> population)¶
selection¶
-
protected List<DoubleSolution>
selection
(List<DoubleSolution> population)¶
CovarianceMatrixAdaptationEvolutionStrategy.Builder¶
-
public static class
Builder
¶ Buider class
Constructors¶
Builder¶
-
public
Builder
(DoubleProblem problem)¶
Methods¶
build¶
-
public CovarianceMatrixAdaptationEvolutionStrategy
build
()¶
ElitistEvolutionStrategy¶
-
public class
ElitistEvolutionStrategy
<S extends Solution<?>> extends AbstractEvolutionStrategy<S, S>¶ Class implementing a (mu + lambda) Evolution Strategy (lambda must be divisible by mu)
Author: Antonio J. Nebro
Constructors¶
ElitistEvolutionStrategy¶
-
public
ElitistEvolutionStrategy
(Problem<S> problem, int mu, int lambda, int maxEvaluations, MutationOperator<S> mutation)¶ Constructor
Methods¶
EvolutionStrategyBuilder¶
-
public class
EvolutionStrategyBuilder
<S extends Solution<?>> implements AlgorithmBuilder<Algorithm<S>>¶ Class implementing a (mu , lambda) Evolution Strategy (lambda must be divisible by mu)
Author: Antonio J. Nebro
Constructors¶
EvolutionStrategyBuilder¶
-
public
EvolutionStrategyBuilder
(Problem<S> problem, MutationOperator<S> mutationOperator, EvolutionStrategyVariant variant)¶
Methods¶
getMutation¶
-
public MutationOperator<S>
getMutation
()¶
setLambda¶
-
public EvolutionStrategyBuilder<S>
setLambda
(int lambda)¶
setMaxEvaluations¶
-
public EvolutionStrategyBuilder<S>
setMaxEvaluations
(int maxEvaluations)¶
setMu¶
-
public EvolutionStrategyBuilder<S>
setMu
(int mu)¶
EvolutionStrategyBuilder.EvolutionStrategyVariant¶
-
public enum
EvolutionStrategyVariant
¶
Enum Constants¶
ELITIST¶
-
public static final EvolutionStrategyBuilder.EvolutionStrategyVariant
ELITIST
¶
NON_ELITIST¶
-
public static final EvolutionStrategyBuilder.EvolutionStrategyVariant
NON_ELITIST
¶
NonElitistEvolutionStrategy¶
-
public class
NonElitistEvolutionStrategy
<S extends Solution<?>> extends AbstractEvolutionStrategy<S, S>¶ Class implementing a (mu + lambda) Evolution Strategy (lambda must be divisible by mu)
Author: Antonio J. Nebro
Constructors¶
NonElitistEvolutionStrategy¶
-
public
NonElitistEvolutionStrategy
(Problem<S> problem, int mu, int lambda, int maxEvaluations, MutationOperator<S> mutation)¶ Constructor
Methods¶
org.uma.jmetal.algorithm.singleobjective.evolutionstrategy.util¶
org.uma.jmetal.algorithm.singleobjective.geneticalgorithm¶
GenerationalGeneticAlgorithm¶
-
public class
GenerationalGeneticAlgorithm
<S extends Solution<?>> extends AbstractGeneticAlgorithm<S, S>¶ Author: Antonio J. Nebro
Constructors¶
GenerationalGeneticAlgorithm¶
-
public
GenerationalGeneticAlgorithm
(Problem<S> problem, int maxEvaluations, int populationSize, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator, SolutionListEvaluator<S> evaluator)¶ Constructor
Methods¶
GenerationalGeneticAlgorithmTestIT¶
-
public class
GenerationalGeneticAlgorithmTestIT
¶ Created by ajnebro on 27/10/15.
GeneticAlgorithmBuilder¶
-
public class
GeneticAlgorithmBuilder
<S extends Solution<?>>¶ Created by ajnebro on 10/12/14.
Constructors¶
GeneticAlgorithmBuilder¶
-
public
GeneticAlgorithmBuilder
(Problem<S> problem, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator)¶ Builder constructor
Methods¶
getCrossoverOperator¶
-
public CrossoverOperator<S>
getCrossoverOperator
()¶
getEvaluator¶
-
public SolutionListEvaluator<S>
getEvaluator
()¶
getMutationOperator¶
-
public MutationOperator<S>
getMutationOperator
()¶
getSelectionOperator¶
-
public SelectionOperator<List<S>, S>
getSelectionOperator
()¶
getVariant¶
-
public GeneticAlgorithmVariant
getVariant
()¶
setMaxEvaluations¶
-
public GeneticAlgorithmBuilder<S>
setMaxEvaluations
(int maxEvaluations)¶
setPopulationSize¶
-
public GeneticAlgorithmBuilder<S>
setPopulationSize
(int populationSize)¶
setSelectionOperator¶
-
public GeneticAlgorithmBuilder<S>
setSelectionOperator
(SelectionOperator<List<S>, S> selectionOperator)¶
setSolutionListEvaluator¶
-
public GeneticAlgorithmBuilder<S>
setSolutionListEvaluator
(SolutionListEvaluator<S> evaluator)¶
setVariant¶
-
public GeneticAlgorithmBuilder<S>
setVariant
(GeneticAlgorithmVariant variant)¶
GeneticAlgorithmBuilder.GeneticAlgorithmVariant¶
-
public enum
GeneticAlgorithmVariant
¶
Enum Constants¶
GENERATIONAL¶
-
public static final GeneticAlgorithmBuilder.GeneticAlgorithmVariant
GENERATIONAL
¶
STEADY_STATE¶
-
public static final GeneticAlgorithmBuilder.GeneticAlgorithmVariant
STEADY_STATE
¶
SteadyStateGeneticAlgorithm¶
-
public class
SteadyStateGeneticAlgorithm
<S extends Solution<?>> extends AbstractGeneticAlgorithm<S, S>¶ Author: Antonio J. Nebro
Constructors¶
SteadyStateGeneticAlgorithm¶
-
public
SteadyStateGeneticAlgorithm
(Problem<S> problem, int maxEvaluations, int populationSize, CrossoverOperator<S> crossoverOperator, MutationOperator<S> mutationOperator, SelectionOperator<List<S>, S> selectionOperator)¶ Constructor
Methods¶
org.uma.jmetal.algorithm.singleobjective.particleswarmoptimization¶
StandardPSO2007¶
-
public class
StandardPSO2007
extends AbstractParticleSwarmOptimization<DoubleSolution, DoubleSolution>¶ Class implementing a Standard PSO 2007 algorithm.
Author: Antonio J. Nebro
Constructors¶
StandardPSO2007¶
-
public
StandardPSO2007
(DoubleProblem problem, int objectiveId, int swarmSize, int maxIterations, int numberOfParticlesToInform, SolutionListEvaluator<DoubleSolution> evaluator)¶ Constructor
Parameters: - problem –
- objectiveId – This field indicates which objective, in the case of a multi-objective problem, is selected to be optimized.
- swarmSize –
- maxIterations –
- numberOfParticlesToInform –
- evaluator –
StandardPSO2007¶
-
public
StandardPSO2007
(DoubleProblem problem, int swarmSize, int maxIterations, int numberOfParticlesToInform, SolutionListEvaluator<DoubleSolution> evaluator)¶ Constructor
Parameters: - problem –
- swarmSize –
- maxIterations –
- numberOfParticlesToInform –
- evaluator –
Methods¶
createInitialSwarm¶
-
public List<DoubleSolution>
createInitialSwarm
()¶
evaluateSwarm¶
-
public List<DoubleSolution>
evaluateSwarm
(List<DoubleSolution> swarm)¶
getLocalBest¶
-
public DoubleSolution[]
getLocalBest
()¶
getResult¶
-
public DoubleSolution
getResult
()¶
initializeLeader¶
-
public void
initializeLeader
(List<DoubleSolution> swarm)¶
initializeParticlesMemory¶
-
public void
initializeParticlesMemory
(List<DoubleSolution> swarm)¶
initializeVelocity¶
-
public void
initializeVelocity
(List<DoubleSolution> swarm)¶
perturbation¶
-
public void
perturbation
(List<DoubleSolution> swarm)¶
updateLeaders¶
-
public void
updateLeaders
(List<DoubleSolution> swarm)¶
updateParticlesMemory¶
-
public void
updateParticlesMemory
(List<DoubleSolution> swarm)¶
updatePosition¶
-
public void
updatePosition
(List<DoubleSolution> swarm)¶
updateVelocity¶
-
public void
updateVelocity
(List<DoubleSolution> swarm)¶
StandardPSO2011¶
-
public class
StandardPSO2011
extends AbstractParticleSwarmOptimization<DoubleSolution, DoubleSolution>¶ Class implementing a Standard PSO 2011 algorithm.
Author: Antonio J. Nebro
Constructors¶
StandardPSO2011¶
-
public
StandardPSO2011
(DoubleProblem problem, int objectiveId, int swarmSize, int maxIterations, int numberOfParticlesToInform, SolutionListEvaluator<DoubleSolution> evaluator)¶ Constructor
Parameters: - problem –
- objectiveId – This field indicates which objective, in the case of a multi-objective problem, is selected to be optimized.
- swarmSize –
- maxIterations –
- numberOfParticlesToInform –
- evaluator –
StandardPSO2011¶
-
public
StandardPSO2011
(DoubleProblem problem, int swarmSize, int maxIterations, int numberOfParticlesToInform, SolutionListEvaluator<DoubleSolution> evaluator)¶ Constructor
Parameters: - problem –
- swarmSize –
- maxIterations –
- numberOfParticlesToInform –
- evaluator –
Methods¶
createInitialSwarm¶
-
public List<DoubleSolution>
createInitialSwarm
()¶
evaluateSwarm¶
-
public List<DoubleSolution>
evaluateSwarm
(List<DoubleSolution> swarm)¶
getLocalBest¶
-
public DoubleSolution[]
getLocalBest
()¶
getResult¶
-
public DoubleSolution
getResult
()¶
initializeLeader¶
-
public void
initializeLeader
(List<DoubleSolution> swarm)¶
initializeParticlesMemory¶
-
public void
initializeParticlesMemory
(List<DoubleSolution> swarm)¶
initializeVelocity¶
-
public void
initializeVelocity
(List<DoubleSolution> swarm)¶
perturbation¶
-
public void
perturbation
(List<DoubleSolution> swarm)¶
updateLeaders¶
-
public void
updateLeaders
(List<DoubleSolution> swarm)¶
updateParticlesMemory¶
-
public void
updateParticlesMemory
(List<DoubleSolution> swarm)¶
updatePosition¶
-
public void
updatePosition
(List<DoubleSolution> swarm)¶
updateVelocity¶
-
public void
updateVelocity
(List<DoubleSolution> swarm)¶
org.uma.jmetal.experiment¶
BinaryProblemsStudy¶
-
public class
BinaryProblemsStudy
¶ Example of experimental study based on solving two binary problems with four algorithms: NSGAII, SPEA2, MOCell, and MOCHC This experiment assumes that the reference Pareto front are not known, so the must be produced. Six quality indicators are used for performance assessment. The steps to carry out the experiment are: 1. Configure the experiment 2. Execute the algorithms 3. Generate the reference Pareto fronts 4. Compute que quality indicators 5. Generate Latex tables reporting means and medians 6. Generate Latex tables with the result of applying the Wilcoxon Rank Sum Test 7. Generate Latex tables with the ranking obtained by applying the Friedman test 8. Generate R scripts to obtain boxplots
Author: Antonio J. Nebro
Methods¶
configureAlgorithmList¶
-
static List<ExperimentAlgorithm<BinarySolution, List<BinarySolution>>>
configureAlgorithmList
(List<ExperimentProblem<BinarySolution>> problemList)¶ The algorithm list is composed of pairs
Algorithm
+Problem
which form part of aExperimentAlgorithm
, which is a decorator for classAlgorithm
.
ConstraintProblemsStudy¶
-
public class
ConstraintProblemsStudy
¶ Example of experimental study based on solving the unconstrained problems included in jMetal. This experiment assumes that the reference Pareto front are known and that, given a problem named P, there is a corresponding file called P.pf containing its corresponding Pareto front. If this is not the case, please refer to class
DTLZStudy
to see an example of how to explicitly indicate the name of those files. Six quality indicators are used for performance assessment. The steps to carry out the experiment are: 1. Configure the experiment 2. Execute the algorithms 3. Generate the reference Pareto fronts 4. Compute the quality indicators 5. Generate Latex tables reporting means and medians 6. Generate Latex tables with the result of applying the Wilcoxon Rank Sum Test 7. Generate Latex tables with the ranking obtained by applying the Friedman test 8. Generate R scripts to obtain boxplotsAuthor: Antonio J. Nebro
Methods¶
configureAlgorithmList¶
-
static List<ExperimentAlgorithm<DoubleSolution, List<DoubleSolution>>>
configureAlgorithmList
(List<ExperimentProblem<DoubleSolution>> problemList)¶ The algorithm list is composed of pairs
Algorithm
+Problem
which form part of aExperimentAlgorithm
, which is a decorator for classAlgorithm
. TheExperimentAlgorithm
has an optional tag component, that can be set as it is shown in this example, where four variants of a same algorithm are defined.
DTLZStudy¶
-
public class
DTLZStudy
¶ Example of experimental study based on solving the problems (configured with 3 objectives) with the algorithms NSGAII, SPEA2, and SMPSO This experiment assumes that the reference Pareto front are known and stored in files whose names are different from the default name expected for every problem. While the default would be “problem_name.pf” (e.g. DTLZ1.pf), the references are stored in files following the nomenclature “problem_name.3D.pf” (e.g. DTLZ1.3D.pf). This is indicated when creating the ExperimentProblem instance of each of the evaluated poblems by using the method changeReferenceFrontTo() Six quality indicators are used for performance assessment. The steps to carry out the experiment are: 1. Configure the experiment 2. Execute the algorithms 3. Compute que quality indicators 4. Generate Latex tables reporting means and medians 5. Generate R scripts to produce latex tables with the result of applying the Wilcoxon Rank Sum Test 6. Generate Latex tables with the ranking obtained by applying the Friedman test 7. Generate R scripts to obtain boxplots
Methods¶
configureAlgorithmList¶
-
static List<ExperimentAlgorithm<DoubleSolution, List<DoubleSolution>>>
configureAlgorithmList
(List<ExperimentProblem<DoubleSolution>> problemList)¶ The algorithm list is composed of pairs
Algorithm
+Problem
which form part of aExperimentAlgorithm
, which is a decorator for classAlgorithm
.
NSGAIIStudy¶
-
public class
NSGAIIStudy
¶ Example of experimental study based on solving the ZDT problems with four versions of NSGA-II, each of them applying a different crossover probability (from 0.7 to 1.0). This experiment assumes that the reference Pareto front are known and that, given a problem named P, there is a corresponding file called P.pf containing its corresponding Pareto front. If this is not the case, please refer to class
DTLZStudy
to see an example of how to explicitly indicate the name of those files. Six quality indicators are used for performance assessment. The steps to carry out the experiment are: 1. Configure the experiment 2. Execute the algorithms 3. Compute the quality indicators 4. Generate Latex tables reporting means and medians 5. Generate Latex tables with the result of applying the Wilcoxon Rank Sum Test 6. Generate Latex tables with the ranking obtained by applying the Friedman test 7. Generate R scripts to obtain boxplotsAuthor: Antonio J. Nebro
Methods¶
configureAlgorithmList¶
-
static List<ExperimentAlgorithm<DoubleSolution, List<DoubleSolution>>>
configureAlgorithmList
(List<ExperimentProblem<DoubleSolution>> problemList)¶ The algorithm list is composed of pairs
Algorithm
+Problem
which form part of aExperimentAlgorithm
, which is a decorator for classAlgorithm
. TheExperimentAlgorithm
has an optional tag component, that can be set as it is shown in this example, where four variants of a same algorithm are defined.
NSGAIIStudy2¶
-
public class
NSGAIIStudy2
¶ Example of experimental study based on solving the ZDT problems with four versions of NSGA-II, each of them applying a different crossover probability (from 0.7 to 1.0). This experiment assumes that the reference Pareto front are not known, so the names of files containing them and the directory where they are located must be specified. Six quality indicators are used for performance assessment. The steps to carry out the experiment are: 1. Configure the experiment 2. Execute the algorithms 3. Generate the reference Pareto fronts 4. Compute the quality indicators 5. Generate Latex tables reporting means and medians 6. Generate Latex tables with the result of applying the Wilcoxon Rank Sum Test 7. Generate Latex tables with the ranking obtained by applying the Friedman test 8. Generate R scripts to obtain boxplots
Author: Antonio J. Nebro
Methods¶
configureAlgorithmList¶
-
static List<ExperimentAlgorithm<DoubleSolution, List<DoubleSolution>>>
configureAlgorithmList
(List<ExperimentProblem<DoubleSolution>> problemList)¶ The algorithm list is composed of pairs
Algorithm
+Problem
which form part of aExperimentAlgorithm
, which is a decorator for classAlgorithm
. TheExperimentAlgorithm
has an optional tag component, that can be set as it is shown in this example, where four variants of a same algorithm are defined.
ZDTScalabilityIStudy¶
-
public class
ZDTScalabilityIStudy
¶ Example of experimental study based on solving the ZDT1 problem but using five different number of variables. This can be interesting to study the behaviour of the algorithms when solving an scalable problem (in the number of variables). The used algorithms are NSGA-II, SPEA2 and SMPSO. This experiment assumes that the reference Pareto front is of problem ZDT1 is known and that there is a file called ZDT1.pf containing it. Six quality indicators are used for performance assessment. The steps to carry out the experiment are: 1. Configure the experiment 2. Execute the algorithms 3. Generate the reference Pareto fronts 4. Compute the quality indicators 5. Generate Latex tables reporting means and medians 6. Generate Latex tables with the result of applying the Wilcoxon Rank Sum Test 7. Generate Latex tables with the ranking obtained by applying the Friedman test 8. Generate R scripts to obtain boxplots
Author: Antonio J. Nebro
Methods¶
configureAlgorithmList¶
-
static List<ExperimentAlgorithm<DoubleSolution, List<DoubleSolution>>>
configureAlgorithmList
(List<ExperimentProblem<DoubleSolution>> problemList)¶ The algorithm list is composed of pairs
Algorithm
+Problem
which form part of aExperimentAlgorithm
, which is a decorator for classAlgorithm
. TheExperimentAlgorithm
has an optional tag component, that can be set as it is shown in this example, where four variants of a same algorithm are defined.
ZDTScalabilityIStudy2¶
-
public class
ZDTScalabilityIStudy2
¶ Example of experimental study based on solving the ZDT1 problem but using five different number of variables. This can be interesting to study the behaviour of the algorithms when solving an scalable problem (in the number of variables). The used algorithms are NSGA-II, SPEA2 and SMPSO. This experiment assumes that the reference Pareto front is of problem ZDT1 is not known, so a reference front must be obtained. Six quality indicators are used for performance assessment. The steps to carry out the experiment are: 1. Configure the experiment 2. Execute the algorithms 3. Generate the reference Pareto sets and Pareto fronts 4. Compute the quality indicators 5. Generate Latex tables reporting means and medians 6. Generate Latex tables with the result of applying the Wilcoxon Rank Sum Test 7. Generate Latex tables with the ranking obtained by applying the Friedman test 8. Generate R scripts to obtain boxplots
Author: Antonio J. Nebro
Methods¶
configureAlgorithmList¶
-
static List<ExperimentAlgorithm<DoubleSolution, List<DoubleSolution>>>
configureAlgorithmList
(List<ExperimentProblem<DoubleSolution>> problemList)¶ The algorithm list is composed of pairs
Algorithm
+Problem
which form part of aExperimentAlgorithm
, which is a decorator for classAlgorithm
. TheExperimentAlgorithm
has an optional tag component, that can be set as it is shown in this example, where four variants of a same algorithm are defined.
ZDTStudy¶
-
public class
ZDTStudy
¶ Example of experimental study based on solving the ZDT problems with the algorithms NSGAII, MOEA/D, and SMPSO This experiment assumes that the reference Pareto front are known and that, given a problem named P, there is a corresponding file called P.pf containing its corresponding Pareto front. If this is not the case, please refer to class
DTLZStudy
to see an example of how to explicitly indicate the name of those files. Six quality indicators are used for performance assessment. The steps to carry out the experiment are: 1. Configure the experiment 2. Execute the algorithms 3. Compute que quality indicators 4. Generate Latex tables reporting means and medians 5. Generate R scripts to produce latex tables with the result of applying the Wilcoxon Rank Sum Test 6. Generate Latex tables with the ranking obtained by applying the Friedman test 7. Generate R scripts to obtain boxplotsAuthor: Antonio J. Nebro
Methods¶
configureAlgorithmList¶
-
static List<ExperimentAlgorithm<DoubleSolution, List<DoubleSolution>>>
configureAlgorithmList
(List<ExperimentProblem<DoubleSolution>> problemList)¶ The algorithm list is composed of pairs
Algorithm
+Problem
which form part of aExperimentAlgorithm
, which is a decorator for classAlgorithm
.
ZDTStudy2¶
-
public class
ZDTStudy2
¶ Example of experimental study based on solving the ZDT problems with algorithms NSGAII, MOEA/D, and SMPSO This experiment assumes that the reference Pareto front are not known, so the names of files containing them and the directory where they are located must be specified. Six quality indicators are used for performance assessment. The steps to carry out the experiment are: 1. Configure the experiment 2. Execute the algorithms 3. Generate the reference Pareto fronts 4. Compute que quality indicators 5. Generate Latex tables reporting means and medians 6. Generate Latex tables with the result of applying the Wilcoxon Rank Sum Test 7. Generate R scripts to obtain boxplots
Author: Antonio J. Nebro
Methods¶
configureAlgorithmList¶
-
static List<ExperimentAlgorithm<DoubleSolution, List<DoubleSolution>>>
configureAlgorithmList
(List<ExperimentProblem<DoubleSolution>> problemList)¶ The algorithm list is composed of pairs
Algorithm
+Problem
which form part of aExperimentAlgorithm
, which is a decorator for classAlgorithm
.
org.uma.jmetal.measure¶
Measurable¶
-
public interface
Measurable
¶ A
Measurable
entity is an entity which provides one or severalMeasure
s. To keep it simple, theseMeasure
s are provided through aMeasureManager
.Author: Created by Antonio J. Nebro on 21/10/14 based on the ideas of Matthieu Vergne
Methods¶
getMeasureManager¶
-
public MeasureManager
getMeasureManager
()¶ Returns: the MeasureManager
which stores all theMeasure
s supported by thisMeasurable
entity
Measure¶
-
public interface
Measure
<Value> extends DescribedEntity, Serializable¶ A
Measure
aims at providing theValue
of a specific property, typically of anAlgorithm
. In order to facilitate external uses, it implements the methods ofDescribedEntity
.Author: Created by Antonio J. Nebro on 21/10/14 based on the ideas of Matthieu Vergne
Parameters: - <Value> – the type of value the
Measure
can provide
- <Value> – the type of value the
MeasureListener¶
-
public interface
MeasureListener
<Value>¶ A
MeasureListener
allows to register a given behavior toPushMeasure.register(MeasureListener)
. When thePushMeasure
generate aValue
, it is provided toMeasureListener.measureGenerated(Object)
in order to execute the specified behavior.Author: Created by Antonio J. Nebro on 21/10/14 based on the ideas of Matthieu Vergne
Parameters: - <Value> –
Methods¶
measureGenerated¶
-
public void
measureGenerated
(Value value)¶ Parameters: - value – the
Value
generated by thePushMeasure
- value – the
MeasureManager¶
-
public interface
MeasureManager
¶ A
MeasureManager
aims at managing a set ofMeasure
s. Typically, aMeasurable
entity would create a singleMeasureManager
to store all theMeasure
s it would like to support, each of them being identified by a key. Because aMeasure
can be whether aPullMeasure
or aPushMeasure
, the two methodsgetPullMeasure(Object)
andgetPushMeasure(Object)
are provided. It could be that a singleMeasure
is also available through both (via a single instance implementing both interfaces or two different instances implementing each interface), leading to have both methods returning a non-null
value for the same key.Author: Created by Antonio J. Nebro on 21/10/14 based on the ideas of Matthieu Vergne
Methods¶
getMeasureKeys¶
-
public Collection<Object>
getMeasureKeys
()¶ This method should return all the keys identifying the
Measure
s managed by thisMeasureManager
. More precisely, ifgetPullMeasure(Object)
orgetPushMeasure(Object)
returns a non-null
value for a given key, then this key should be returned bygetMeasureKeys()
. However, it is not because a key is returned bygetMeasureKeys()
that it necessarily has aPullMeasure
or aPushMeasure
returned by thisMeasureManager
.Returns: the set of keys identifying the managed Measure
s
getPullMeasure¶
-
public <T> PullMeasure<T>
getPullMeasure
(Object key)¶ Parameters: - key – the key of the
Measure
Returns: the
PullMeasure
identified by this key- key – the key of the
getPushMeasure¶
-
public <T> PushMeasure<T>
getPushMeasure
(Object key)¶ Parameters: - key – the key of the
Measure
Returns: the
PushMeasure
identified by this key- key – the key of the
PullMeasure¶
-
public interface
PullMeasure
<Value> extends Measure<Value>¶ A
PullMeasure
is aMeasure
from which theValue
can be accessed on demand through theget()
method. As such, aPullMeasure
should ensure that its currentValue
is always available or generated before to be returned byget()
.Author: Created by Antonio J. Nebro on 21/10/14 based on the ideas of Matthieu Vergne
Parameters: - <Value> – the type of value the
PullMeasure
can provide
- <Value> – the type of value the
PushMeasure¶
-
public interface
PushMeasure
<Value> extends Measure<Value>¶ A
PushMeasure
is aMeasure
which provides itsValue
through notifications. As such, any observer on aPushMeasure
should register aMeasureListener
throughregister(MeasureListener)
to specify what to do with theValue
once it is received.Author: Created by Antonio J. Nebro on 21/10/14 based on the ideas of Matthieu Vergne
Parameters: - <Value> – the type of value the
PushMeasure
can provide
- <Value> – the type of value the
Methods¶
register¶
-
public void
register
(MeasureListener<Value> listener)¶ Register a
MeasureListener
to use theValue
s of thePushMeasure
when they are generated.Parameters: - listener – the
MeasureListener
to register
- listener – the
unregister¶
-
public void
unregister
(MeasureListener<Value> listener)¶ Unregister a
MeasureListener
registered withregister(MeasureListener)
to stop receiving the notifications of thePushMeasure
.Parameters: - listener – the
MeasureListener
to unregister
- listener – the
org.uma.jmetal.measure.impl¶
BasicMeasure¶
-
public class
BasicMeasure
<T> extends SimplePushMeasure<T> implements PullMeasure<T>, PushMeasure<T>¶ A
BasicMeasure
provides a simple way to define a measure that merely stores a single valueAuthor: Antonio J. Nebro
Constructors¶
BasicMeasure¶
-
public
BasicMeasure
()¶ Create a
BasicMeasure
CountingMeasure¶
-
public class
CountingMeasure
extends SimplePushMeasure<Long> implements PullMeasure<Long>, PushMeasure<Long>¶ A
CountingMeasure
provides a simple way to evaluate a number of occurrences. For instance, it can be used to count how many solutions have been generated within an algorithm, how many evaluations have been computed, how many rounds have been run, etc. If these occurrences are provided by somePushMeasure
s, you can uselink(PushMeasure)
to register theCountingMeasure
to thesePushMeasure
s. Otherwise, useincrement()
when theCountingMeasure
need to count one more occurrence. In order to get the count, one can access it immediately throughget()
or when it is updated by registering a listener withregister(MeasureListener)
.Author: Matthieu Vergne
Constructors¶
CountingMeasure¶
-
public
CountingMeasure
(String name, String description, long initialCount)¶ Create a
CountingMeasure
which starts at a given value. The next value to be pushed to the registered observers will be this value + 1.Parameters: - name – the name of the measure
- description – the description of the measure
- initialCount – the value to start from
CountingMeasure¶
-
public
CountingMeasure
(String name, String description)¶ Create a
CountingMeasure
starting from zero. The registered observers will receive their first notification when it will increment to 1.Parameters: - name – the name of the measure
- description – the description of the measure
CountingMeasure¶
-
public
CountingMeasure
(long initialCount)¶ Create a
CountingMeasure
which starts at a given value. The next value to be pushed to the registered observers will be this value + 1. A default name and description are used.Parameters: - initialCount – the value to start from
CountingMeasure¶
-
public
CountingMeasure
()¶ Create a
CountingMeasure
starting from zero. The registered observers will receive their first notification when it will increment to 1. A default name and description are used.
Methods¶
increment¶
-
public synchronized void
increment
()¶ Add 1 to the current count and push its value to all the registered observers.
increment¶
-
public synchronized void
increment
(long amount)¶ Increment the current count in a given amount. If the amount is zero, no change occurs, thus no notification is sent.
Parameters: - amount – the amount to add
link¶
-
public <T> void
link
(PushMeasure<T> measure)¶ If this
CountingMeasure
is used to count the number of time aPushMeasure
notifies its observers, you can use this method to link them. TheCountingMeasure
will automatically register aMeasureListener
on thePushMeasure
such that, every time thePushMeasure
send a notification,CountingMeasure.increment()
is called. You can link severalPushMeasure
s at the same time, but each of their notifications will increment the counter, leading to summing their notifications. When aPushMeasure
should not be considered anymore, useunlink(PushMeasure)
to remove the link.Parameters: - measure – the
PushMeasure
to link
- measure – the
reset¶
-
public synchronized void
reset
()¶ Restart the counter to zero. Generate a notification if the value was not zero.
reset¶
-
public synchronized void
reset
(long value)¶ Restart the counter to a given value. Generate a notification if the value was different.
Parameters: - value – the value to restart from
unlink¶
-
public <T> void
unlink
(PushMeasure<T> measure)¶ If you have linked a
PushMeasure
throughlink(PushMeasure)
, you can discard the link by using this method.Parameters: - measure – the
PushMeasure
to unlink
- measure – the
CountingMeasureTest¶
-
public class
CountingMeasureTest
¶
DurationMeasure¶
-
public class
DurationMeasure
extends SimplePullMeasure<Long>¶ This measure allows to have a simple way to compute the time spent in doing something. For instance, an algorithm can compute the time spent to run. In such a case, the algorithm would call
start()
at the beginning of the running andstop()
at the end. Additional calls to these two methods can also be made during the running to exclude specific parts from the counting. At any time during (and after) the running, theget()
method can be used to know how much time have been spent so far. If the algorithm is rerun, it will restart and the additional time will sum up to the time already spent before, but it can be avoided by resetting the measure withreset()
.Author: Matthieu Vergne
LastEvaluationMeasure¶
-
public class
LastEvaluationMeasure
<Solution, Value> extends SimplePushMeasure<Evaluation<Solution, Value>>¶ LastEvaluationMeasure
is aPushMeasure
providing the last evaluation made in an algorithm. It extendsSimplePushMeasure
and add the methodpush(Object,Object)
for simplicity.Author: Matthieu Vergne
Parameters: - <Solution> – the solution evaluated
- <Value> – the type of value used to evaluate the solution (Double, BigDecimal, enum, …)
Methods¶
push¶
-
public void
push
(Solution solution, Value value)¶ This method is equivalent to
push(Object)
excepted that it automatically create theEvaluation
instance.Parameters: - solution – the solution evaluated
- value – the value of this solution
LastEvaluationMeasure.Evaluation¶
-
public static class
Evaluation
<Solution, Value>¶ This structure represent an atomic evaluation of a given solution.
Author: Matthieu Vergne
ListenerTimeMeasure¶
-
public class
ListenerTimeMeasure
extends SimplePullMeasure<Long> implements PullMeasure<Long>¶ This measure is a facility to evaluate the time spent in
MeasureListener
s registered inPushMeasure
s. In order to measure the time spent in aMeasureListener
, you should wrap it by callingwrapListener(MeasureListener)
. The wrapper returned should be used instead of the originalMeasureListener
to allow theListenerTimeMeasure
to account for its execution time. If you want to wrap automatically all theMeasureListener
s registered to a givenPushMeasure
, you can wrap thePushMeasure
throughwrapMeasure(PushMeasure)
: all theMeasureListener
s registered to the wrapper will be wrapped too. You can restart the evaluation by callingreset()
. Notice that the time accounted is not the physical time but the processing time: if several listeners run in parallel, their execution time is summed as if they were running sequentially, thus you can have a measured time which is superior to the physical time spent. If you want to measure the physical time spent in the execution of parallel runs, you should use another way.Author: Matthieu Vergne
Methods¶
get¶
-
public Long
get
()¶ Returns: the time spent in the wrapped MeasureListener
s
reset¶
-
public void
reset
()¶ This method reset the time measured to zero. Notice that
MeasureListener
s which are still running will be affected consequently: their execution time will be measured from the reset time, not from their own starting time.
wrapListener¶
-
public <Value> MeasureListener<Value>
wrapListener
(MeasureListener<Value> wrapped)¶ This method wrap a
MeasureListener
(the wrapped) into another one (the wrapper). Any notification made via the wrapper will allow to measure how much time has been spent by the wrapped to treat this notification. The wrapped listener is not changed, thus it can be reused in otherPushMeasure
s that we don’t want to consider. If a wrapper has already been made for the given wrapped, it will be returned and no new one will be instantiated (weak references are used to not keep in memory the unused wrappers).Parameters: - wrapped – the
MeasureListener
to wrap
Returns: the
MeasureListener
wrapper- wrapped – the
wrapManager¶
-
public <Value> MeasureManager
wrapManager
(MeasureManager wrapped, Object measureKey)¶ This method wrap a
MeasureManager
(the wrapped) into another one (the wrapper) which provides the same measures, excepted that anyPushMeasure
returned by the wrapper will be automatically wrapped viawrapMeasure(PushMeasure)
. This allows to ensure that anyMeasureListener
registered to thePushMeasure
s provided by the wrapper will be considered, independently of who registers it or when it is registered. You can also provide an additional key to add thisListenerTimeMeasure
to the wrapper. The wrapped manager is not changed, thus it can be reused to registerMeasureListener
s that we don’t want to consider.Parameters: - wrapped – the
MeasureManager
to wrap - measureKey – the key that the wrapper should use for this
ListenerTimeMeasure
,null
if it should not use it
Returns: the
MeasureManager
wrapper- wrapped – the
wrapMeasure¶
-
public <Value> PushMeasure<Value>
wrapMeasure
(PushMeasure<Value> wrapped)¶ This method wrap a
PushMeasure
(the wrapped) into another one (the wrapper). AnyMeasureListener
registered to the wrapper will be automatically wrapped viawrapListener(MeasureListener)
. This allows to ensure that anyMeasureListener
registered will be considered, independently of who registers it or when it is registered. The wrapped measure is not changed, thus it can be reused to registerMeasureListener
s that we don’t want to consider. If a wrapper has already been made for the given wrapped, it will be returned and no new one will be instantiated (weak references are used to not keep in memory the unused wrappers).Parameters: - wrapped – the
PushMeasure
to wrap
Returns: the
PushMeasure
wrapper- wrapped – the
ListenerTimeMeasureTest¶
-
public class
ListenerTimeMeasureTest
¶
Methods¶
testAdditionalKeyForWrappedManagerRejectAlreadyUsedKeys¶
-
public void
testAdditionalKeyForWrappedManagerRejectAlreadyUsedKeys
()¶
testAdditionalKeyForWrappedManagerReturnCurrentMeasure¶
-
public void
testAdditionalKeyForWrappedManagerReturnCurrentMeasure
()¶
MeasureFactory¶
-
public class
MeasureFactory
¶ The
MeasureFactory
provides some useful methods to build specificMeasure
s.Author: Matthieu Vergne
Methods¶
createPullFromPush¶
-
public <Value> PullMeasure<Value>
createPullFromPush
(PushMeasure<Value> push, Value initialValue)¶ Create a
PullMeasure
to backup the lastValue
of aPushMeasure
. When thePushMeasure
send a notification with a givenValue
, thisValue
is stored into a variable so that it can be retrieved at any time through the methodPullMeasure.get()
.Parameters: - push – a
PushMeasure
to backup - initialValue – the
Value
to return before the next notification of thePushMeasure
is sent
Returns: a
PullMeasure
allowing to retrieve the last value sent by thePushMeasure
, or the initial value if it did not send any- push – a
createPullsFromFields¶
-
public Map<String, PullMeasure<?>>
createPullsFromFields
(Object object)¶ Create
PullMeasure
s based on the fields available from an instance, whatever it is. TheClass
of the instance is analyzed to retrieve its public fields and aPullMeasure
is built for each of them. The name of the field is further exploited to identify the measure, such that the map returned use the name of the field as a key which maps to thePullMeasure
built from this field. ThePullMeasure
itself is named by using the name of the field.Parameters: - object – the
Object
to cover
Returns: the
Map
which contains the names of the getter methods and the correspondingPullMeasure
built from them- object – the
createPullsFromGetters¶
-
public Map<String, PullMeasure<?>>
createPullsFromGetters
(Object object)¶ Create
PullMeasure
s based on the getters available from an instance, whatever it is. TheClass
of the instance is analyzed to retrieve its public methods and aPullMeasure
is built for each method which use a getter-like signature. The name of the method is further exploited to identify the measure, such that the map returned use the name of the method (without “get”) as a key which maps to thePullMeasure
built from this method. ThePullMeasure
itself is named by using the name of the method.Parameters: - object – the
Object
to cover
Returns: the
Map
which contains the names of the getter methods and the correspondingPullMeasure
built from them- object – the
createPushFromPull¶
-
public <Value> PushMeasure<Value>
createPushFromPull
(PullMeasure<Value> pull, long period)¶ Create a
PushMeasure
which checks at regular intervals the value of aPullMeasure
. If the value have changed since the last check (or since the creation of thePushMeasure
), a notification will be generated by thePushMeasure
with the newValue
. Notice that if the period is two small, the checking process could have a significant impact on performances, because aThread
is run in parallel to check regularly theValue
modifications. If the period is too big, you could miss relevant notifications, especially if thePullMeasure
change to a newValue
and change back to its previousValue
between two consecutive checks. In such a case, no notification will be sent because theValue
during the two checks is equal.Parameters: - pull – the
PullMeasure
to cover - period – the number of milliseconds between each check
Returns: a
PushMeasure
which will notify any change occurred on thePullMeasure
at the given frequency- pull – the
MeasureFactoryTest¶
-
public class
MeasureFactoryTest
¶
Methods¶
testCreatePullsFromFieldsRetrieveAllInheritedPublicFields¶
-
public void
testCreatePullsFromFieldsRetrieveAllInheritedPublicFields
()¶
testCreatePullsFromFieldsRetrieveAllInstantiatedPublicFields¶
-
public void
testCreatePullsFromFieldsRetrieveAllInstantiatedPublicFields
()¶
testCreatePullsFromFieldsRetrieveNoInheritedProtectedNorPrivateField¶
-
public void
testCreatePullsFromFieldsRetrieveNoInheritedProtectedNorPrivateField
()¶
testCreatePullsFromFieldsRetrieveNoInstantiatedProtectedNorPrivateField¶
-
public void
testCreatePullsFromFieldsRetrieveNoInstantiatedProtectedNorPrivateField
()¶
testCreatePullsFromFieldsRetrieveNothingFromEmptyObject¶
-
public void
testCreatePullsFromFieldsRetrieveNothingFromEmptyObject
()¶
testCreatePullsFromGettersRetrieveAllInheritedPublicGetters¶
-
public void
testCreatePullsFromGettersRetrieveAllInheritedPublicGetters
()¶
testCreatePullsFromGettersRetrieveAllInstantiatedPublicGetters¶
-
public void
testCreatePullsFromGettersRetrieveAllInstantiatedPublicGetters
()¶
testCreatePullsFromGettersRetrieveNoInheritedProtectedNorPrivateGetter¶
-
public void
testCreatePullsFromGettersRetrieveNoInheritedProtectedNorPrivateGetter
()¶
testCreatePullsFromGettersRetrieveNoInstantiatedProtectedNorPrivateGetter¶
-
public void
testCreatePullsFromGettersRetrieveNoInstantiatedProtectedNorPrivateGetter
()¶
testCreatePullsFromGettersRetrieveNothingFromEmptyObject¶
-
public void
testCreatePullsFromGettersRetrieveNothingFromEmptyObject
()¶
testCreatePushFromPullNotifiesOnlyWhenValueChanged¶
-
public void
testCreatePushFromPullNotifiesOnlyWhenValueChanged
()¶
testCreatePushFromPullNotifiesWithTheCorrectFrequency¶
-
public void
testCreatePushFromPullNotifiesWithTheCorrectFrequency
()¶
PullPushMeasure¶
-
public class
PullPushMeasure
<Value> implements PullMeasure<Value>, PushMeasure<Value>¶ A
PullPushMeasure
aims at providing both thePushMeasure
andPullMeasure
abilities into a singleMeasure
. One could simply build a brand newMeasure
by callingPullPushMeasure(String,String)
, but in the case where some existing measures are available, he can wrap them into aPullPushMeasure
by callingPullPushMeasure(PushMeasure,Object)
or other constructors taking aMeasure
as argument.Author: Matthieu Vergne
Parameters: - <Value> –
Constructors¶
PullPushMeasure¶
-
public
PullPushMeasure
(PullMeasure<Value> pull, PushMeasure<Value> push, DescribedEntity reference)¶ Create a
PullPushMeasure
which wraps both aPullMeasure
and aPushMeasure
. The assumption is that bothMeasure
s already represent the sameMeasure
(i.e. the sameValue
) but were implemented separately. Instantiating aPullPushMeasure
this way allows to merge them easily without creating a completely new measure. Don’t use this constructor to merge two differentMeasure
s. The last parameter is generally used to specify which of the twoMeasure
s should be used forgetName()
andgetDescription()
, but you can also provide a completely new instance to change them.Parameters: - pull – the
PullMeasure
to wrap - push – the
PushMeasure
to wrap - reference – the reference to use for the name and the description of this
PullPushMeasure
- pull – the
PullPushMeasure¶
-
public
PullPushMeasure
(PullMeasure<Value> pull, PushMeasure<Value> push, String name, String description)¶ Equivalent to
PullPushMeasure(PullMeasure,PushMeasure,DescribedEntity)
but the reference parameter is replaced by the specific name and description that you want to provide. This is a shortcut to the creation of theDescribedEntity
instance followed by the call of the reference-based method.Parameters: - pull – the
PullMeasure
to wrap - push – the
PushMeasure
to wrap - name – the name of the
PullPushMeasure
- description – the description of the
PullPushMeasure
- pull – the
PullPushMeasure¶
-
public
PullPushMeasure
(PushMeasure<Value> push, Value initialValue)¶ Create a
PullPushMeasure
which wraps aPushMeasure
. ThePullMeasure
ability corresponds the storage of theValue
pushed by thePushMeasure
in order to retrieve it on demand throughPullMeasure.get()
. The name and the description of thePullPushMeasure
are the ones provided by the wrappedPushMeasure
.Parameters: - push – the
PushMeasure
to wraps - initialValue – the
Value
to return before the next notification of thePushMeasure
- push – the
PullPushMeasure¶
-
public
PullPushMeasure
(String name, String description)¶ Create a
PullPushMeasure
from scratch.Parameters: - name – the name of the
PullPushMeasure
- description – the description of the
PullPushMeasure
- name – the name of the
SimpleMeasure¶
-
public class
SimpleMeasure
<Value> extends SimpleDescribedEntity implements Measure<Value>¶ SimpleMeasure
is a basic implementation ofMeasure
. It provides a basic support for the most generic properties required by this interface.Author: Matthieu Vergne
Parameters: - <Value> –
Constructors¶
SimpleMeasure¶
SimpleMeasure¶
-
public
SimpleMeasure
(String name)¶ Create a
SimpleMeasure
with a given name and anull
description.Parameters: - name – the name of the
Measure
- name – the name of the
SimpleMeasure¶
-
public
SimpleMeasure
()¶ Create a
SimpleMeasure
with the class name as its name and anull
description.
SimpleMeasureManager¶
-
public class
SimpleMeasureManager
implements MeasureManager¶ This
SimpleMeasureManager
provides a basic implementation to manage a collection ofMeasure
s. One can use the setXxxMeasure() methods to configure theMeasureManager
with the finest granularity, or exploit the centralizedsetMeasure(Object,Measure)
to register aMeasure
depending on the interfaces it implements, or even use the massivesetAllMeasures(Map)
to register a set ofMeasure
s at once. The corresponding removeXxx methods are also available for each case. However, the only way to access aMeasure
is through the finest granularity withgetPullMeasure(Object)
andgetPushMeasure(Object)
.Author: Matthieu Vergne
Methods¶
getMeasureKeys¶
-
public Collection<Object>
getMeasureKeys
()¶ Provides the keys of all the
Measure
s which are supported by thisSimpleMeasureManager
. If a key is provided, then at least one version is available throughgetPullMeasure(Object)
orgetPushMeasure(Object)
.
getPullMeasure¶
-
public <T> PullMeasure<T>
getPullMeasure
(Object key)¶
getPushMeasure¶
-
public <T> PushMeasure<T>
getPushMeasure
(Object key)¶
removeAllMeasures¶
-
public void
removeAllMeasures
(Iterable<? extends Object> keys)¶ Massive equivalent to
removeMeasure(Object)
.Parameters: - keys – the keys of the
Measure
s to remove
- keys – the keys of the
removeMeasure¶
-
public void
removeMeasure
(Object key)¶ This method removes an entire
Measure
, meaning that if both aPullMeasure
and aPushMeasure
are registered for this key, then both are removed.Parameters: - key – the key of the
Measure
to remove
- key – the key of the
removePullMeasure¶
-
public void
removePullMeasure
(Object key)¶ Parameters: - key – the key of the
PullMeasure
to remove
- key – the key of the
removePushMeasure¶
-
public void
removePushMeasure
(Object key)¶ Parameters: - key – the key of the
PushMeasure
to remove
- key – the key of the
setAllMeasures¶
setMeasure¶
-
public void
setMeasure
(Object key, Measure<?> measure)¶ This method call
setPullMeasure(Object,PullMeasure)
orsetPushMeasure(Object,PushMeasure)
depending on the interfaces implemented by theMeasure
given in argument. If both interfaces are implemented, both methods are called, allowing to register all the aspects of theMeasure
in one call.Parameters:
setPullMeasure¶
-
public void
setPullMeasure
(Object key, PullMeasure<?> measure)¶ Parameters: - key – the key of the
Measure
- measure – the
PullMeasure
to register
- key – the key of the
setPushMeasure¶
-
public void
setPushMeasure
(Object key, PushMeasure<?> measure)¶ Parameters: - key – the key of the
Measure
- measure – the
PushMeasure
to register
- key – the key of the
SimplePullMeasure¶
-
public abstract class
SimplePullMeasure
<Value> extends SimpleMeasure<Value> implements PullMeasure<Value>¶ SimplePullMeasure
is a basic implementation ofPullMeasure
. As aPullMeasure
, it is intended to be used by external entities through itsget()
method. This method must be implemented by the algorithm to specify how the value can be retrieved.Author: Matthieu Vergne
Parameters: - <Value> –
Constructors¶
SimplePullMeasure¶
SimplePullMeasure¶
-
public
SimplePullMeasure
(String name)¶ Create a
SimplePullMeasure
with a given name and anull
description.Parameters: - name – the name of the
Measure
- name – the name of the
SimplePullMeasure¶
-
public
SimplePullMeasure
()¶ Create a
SimplePullMeasure
with the class name as its name and anull
description.
SimplePushMeasure¶
-
public class
SimplePushMeasure
<Value> extends SimpleMeasure<Value> implements PushMeasure<Value>¶ SimplePushMeasure
is a basic implementation ofPushMeasure
. As aPushMeasure
, it is intended to be fed by the algorithm while external entities should useregister(MeasureListener)
to be notified in real time. For the algorithm to feed it, it should provide a solution and its value topush(Object,Object)
, leading to the notification of the registered observers.Author: Matthieu Vergne
Parameters: - <Value> –
Constructors¶
SimplePushMeasure¶
SimplePushMeasure¶
-
public
SimplePushMeasure
(String name)¶ Create a
SimplePushMeasure
with a given name and anull
description.Parameters: - name – the name of the
Measure
- name – the name of the
SimplePushMeasure¶
-
public
SimplePushMeasure
()¶ Create a
SimplePushMeasure
with the class name as its name and anull
description.
Methods¶
push¶
-
public void
push
(Value value)¶ Notify the observers which has registered a
MeasureListener
throughregister(MeasureListener)
about a value.Parameters: - value – the value to send to the observers
register¶
-
public void
register
(MeasureListener<Value> listener)¶
unregister¶
-
public void
unregister
(MeasureListener<Value> listener)¶
org.uma.jmetal.operator¶
CrossoverOperator¶
LocalSearchOperator¶
MutationOperator¶
Operator¶
-
public interface
Operator
<Source, Result> extends Serializable¶ Interface representing an operator
Author: Antonio J. Nebro
Parameters: - <Source> – Source Class of the object to be operated with
- <Result> – Result Class of the result obtained after applying the operator
SelectionOperator¶
org.uma.jmetal.operator.impl.crossover¶
BLXAlphaCrossover¶
-
public class
BLXAlphaCrossover
implements CrossoverOperator<DoubleSolution>¶ This class allows to apply a BLX-alpha crossover operator to two parent solutions.
Author: Antonio J. Nebro
Constructors¶
BLXAlphaCrossover¶
-
public
BLXAlphaCrossover
(double crossoverProbability, double alpha, RepairDoubleSolution solutionRepair)¶ Constructor
BLXAlphaCrossover¶
-
public
BLXAlphaCrossover
(double crossoverProbability, double alpha, RepairDoubleSolution solutionRepair, RandomGenerator<Double> randomGenerator)¶ Constructor
Methods¶
doCrossover¶
-
public List<DoubleSolution>
doCrossover
(double probability, DoubleSolution parent1, DoubleSolution parent2)¶ doCrossover method
execute¶
-
public List<DoubleSolution>
execute
(List<DoubleSolution> solutions)¶ Execute() method
BLXAlphaCrossoverTest¶
-
public class
BLXAlphaCrossoverTest
¶ Note: this class does check that the BLX-aplha crossover operator does not return invalid values, but not that it works properly (@see BLXAlphaCrossoverWorkingTest)
Author: Antonio J. Nebro
Methods¶
shouldConstructorAssignTheCorrectDistributionIndex¶
-
public void
shouldConstructorAssignTheCorrectDistributionIndex
()¶
shouldConstructorAssignTheCorrectProbabilityValue¶
-
public void
shouldConstructorAssignTheCorrectProbabilityValue
()¶
shouldConstructorFailWhenPassedANegativeAlphaValue¶
-
public void
shouldConstructorFailWhenPassedANegativeAlphaValue
()¶
shouldConstructorFailWhenPassedANegativeProbabilityValue¶
-
public void
shouldConstructorFailWhenPassedANegativeProbabilityValue
()¶
shouldCrossingTwoDoubleVariableSolutionsReturnValidSolutions¶
-
public void
shouldCrossingTwoDoubleVariableSolutionsReturnValidSolutions
()¶
shouldCrossingTwoSingleVariableSolutionsReturnTheSameSolutionsIfNotCrossoverIsApplied¶
-
public void
shouldCrossingTwoSingleVariableSolutionsReturnTheSameSolutionsIfNotCrossoverIsApplied
()¶
shouldCrossingTwoSingleVariableSolutionsReturnTheSameSolutionsIfProbabilityIsZero¶
-
public void
shouldCrossingTwoSingleVariableSolutionsReturnTheSameSolutionsIfProbabilityIsZero
()¶
shouldCrossingTwoSingleVariableSolutionsReturnValidSolutions¶
-
public void
shouldCrossingTwoSingleVariableSolutionsReturnValidSolutions
()¶
shouldCrossingTwoSingleVariableSolutionsWithSimilarValueReturnTheSameVariables¶
-
public void
shouldCrossingTwoSingleVariableSolutionsWithSimilarValueReturnTheSameVariables
()¶
shouldExecuteWithInvalidSolutionListSizeThrowAnException¶
-
public void
shouldExecuteWithInvalidSolutionListSizeThrowAnException
()¶
DifferentialEvolutionCrossover¶
-
public class
DifferentialEvolutionCrossover
implements CrossoverOperator<DoubleSolution>¶ Differential evolution crossover operator
Author: Antonio J. Nebro Comments: - The operator receives two parameters: the current individual and an array of three parent individuals - The best and rand variants depends on the third parent, according whether it represents the current of the “best” individual or a random one. The implementation of both variants are the same, due to that the parent selection is external to the crossover operator. - Implemented variants: - rand/1/bin (best/1/bin) - rand/1/exp (best/1/exp) - current-to-rand/1 (current-to-best/1) - current-to-rand/1/bin (current-to-best/1/bin) - current-to-rand/1/exp (current-to-best/1/exp)
Constructors¶
DifferentialEvolutionCrossover¶
DifferentialEvolutionCrossover¶
-
public
DifferentialEvolutionCrossover
(double cr, double f, String variant, RandomGenerator<Double> randomGenerator)¶ Constructor
Parameters: - cr –
- f –
- variant –
- jRandomGenerator –
- crRandomGenerator –
DifferentialEvolutionCrossover¶
-
public
DifferentialEvolutionCrossover
(double cr, double f, String variant, BoundedRandomGenerator<Integer> jRandomGenerator, BoundedRandomGenerator<Double> crRandomGenerator)¶ Constructor
Parameters: - cr –
- f –
- variant –
- jRandomGenerator –
- crRandomGenerator –
Methods¶
execute¶
-
public List<DoubleSolution>
execute
(List<DoubleSolution> parentSolutions)¶ Execute() method
setCurrentSolution¶
-
public void
setCurrentSolution
(DoubleSolution current)¶
HUXCrossover¶
-
public class
HUXCrossover
implements CrossoverOperator<BinarySolution>¶ This class allows to apply a HUX crossover operator using two parent solutions. NOTE: the operator is applied to the first encoding.variable of the solutions, and the type of the solutions must be Binary
Author: Antonio J. Nebro, Juan J. Durillo
Constructors¶
HUXCrossover¶
-
public
HUXCrossover
(double crossoverProbability, RandomGenerator<Double> randomGenerator)¶ Constructor
Methods¶
doCrossover¶
-
public List<BinarySolution>
doCrossover
(double probability, BinarySolution parent1, BinarySolution parent2)¶ Perform the crossover operation
Parameters: - probability – Crossover setProbability
- parent1 – The first parent
- parent2 – The second parent
Throws: Returns: An array containing the two offspring
execute¶
-
public List<BinarySolution>
execute
(List<BinarySolution> parents)¶ Execute() method
IntegerSBXCrossover¶
-
public class
IntegerSBXCrossover
implements CrossoverOperator<IntegerSolution>¶ This class allows to apply a SBX crossover operator using two parent solutions (Integer encoding)
Author: Antonio J. Nebro
Constructors¶
IntegerSBXCrossover¶
-
public
IntegerSBXCrossover
(double crossoverProbability, double distributionIndex)¶ Constructor
IntegerSBXCrossover¶
-
public
IntegerSBXCrossover
(double crossoverProbability, double distributionIndex, RandomGenerator<Double> randomGenerator)¶ Constructor
Methods¶
doCrossover¶
-
public List<IntegerSolution>
doCrossover
(double probability, IntegerSolution parent1, IntegerSolution parent2)¶ doCrossover method
execute¶
-
public List<IntegerSolution>
execute
(List<IntegerSolution> solutions)¶ Execute() method
NPointCrossover¶
-
public class
NPointCrossover
<T> implements CrossoverOperator<Solution<T>>¶ Created by FlapKap on 23-03-2017.
Constructors¶
NullCrossover¶
-
public class
NullCrossover
<S extends Solution<?>> implements CrossoverOperator<S>¶ This class defines a null crossover operator: the parent solutions are returned without any change. It can be useful when configuring a genetic algorithm and we want to use only mutation.
Author: Antonio J. Nebro
PMXCrossover¶
-
public class
PMXCrossover
implements CrossoverOperator<PermutationSolution<Integer>>¶ This class allows to apply a PMX crossover operator using two parent solutions.
Author: Antonio J. Nebro , Juan J. Durillo
Constructors¶
PMXCrossover¶
-
public
PMXCrossover
(double crossoverProbability, RandomGenerator<Double> randomGenerator)¶ Constructor
PMXCrossover¶
-
public
PMXCrossover
(double crossoverProbability, RandomGenerator<Double> crossoverRandomGenerator, BoundedRandomGenerator<Integer> cuttingPointRandomGenerator)¶ Constructor
Methods¶
doCrossover¶
-
public List<PermutationSolution<Integer>>
doCrossover
(double probability, List<PermutationSolution<Integer>> parents)¶ Perform the crossover operation
Parameters: - probability – Crossover probability
- parents – Parents
Returns: An array containing the two offspring
execute¶
-
public List<PermutationSolution<Integer>>
execute
(List<PermutationSolution<Integer>> parents)¶ Executes the operation
Parameters: - parents – An object containing an array of two solutions
SBXCrossover¶
-
public class
SBXCrossover
implements CrossoverOperator<DoubleSolution>¶ This class allows to apply a SBX crossover operator using two parent solutions (Double encoding). A
RepairDoubleSolution
object is used to decide the strategy to apply when a value is out of range. The implementation is based on the NSGA-II code available in http://www.iitk.ac.in/kangal/codes.shtmlAuthor: Antonio J. Nebro , Juan J. Durillo
Constructors¶
SBXCrossover¶
-
public
SBXCrossover
(double crossoverProbability, double distributionIndex)¶ Constructor
SBXCrossover¶
-
public
SBXCrossover
(double crossoverProbability, double distributionIndex, RandomGenerator<Double> randomGenerator)¶ Constructor
SBXCrossover¶
-
public
SBXCrossover
(double crossoverProbability, double distributionIndex, RepairDoubleSolution solutionRepair)¶ Constructor
SBXCrossover¶
-
public
SBXCrossover
(double crossoverProbability, double distributionIndex, RepairDoubleSolution solutionRepair, RandomGenerator<Double> randomGenerator)¶ Constructor
Methods¶
doCrossover¶
-
public List<DoubleSolution>
doCrossover
(double probability, DoubleSolution parent1, DoubleSolution parent2)¶ doCrossover method
execute¶
-
public List<DoubleSolution>
execute
(List<DoubleSolution> solutions)¶ Execute() method
SBXCrossoverTest¶
-
public class
SBXCrossoverTest
¶ Note: this class does check that the SBX crossover operator does not return invalid values, but not that it works properly (@see SBXCrossoverWorkingTest)
Author: Antonio J. Nebro
Methods¶
shouldConstructorAssignTheCorrectDistributionIndex¶
-
public void
shouldConstructorAssignTheCorrectDistributionIndex
()¶
shouldConstructorAssignTheCorrectProbabilityValue¶
-
public void
shouldConstructorAssignTheCorrectProbabilityValue
()¶
shouldConstructorFailWhenPassedANegativeDistributionIndex¶
-
public void
shouldConstructorFailWhenPassedANegativeDistributionIndex
()¶
shouldConstructorFailWhenPassedANegativeProbabilityValue¶
-
public void
shouldConstructorFailWhenPassedANegativeProbabilityValue
()¶
shouldCrossingTheSecondVariableReturnTheOtherVariablesUnchangedInTheOffspringSolutions¶
-
public void
shouldCrossingTheSecondVariableReturnTheOtherVariablesUnchangedInTheOffspringSolutions
()¶
shouldCrossingTwoDoubleVariableSolutionsReturnValidSolutions¶
-
public void
shouldCrossingTwoDoubleVariableSolutionsReturnValidSolutions
()¶
shouldCrossingTwoSingleVariableSolutionsReturnTheSameSolutionsIfNotCrossoverIsApplied¶
-
public void
shouldCrossingTwoSingleVariableSolutionsReturnTheSameSolutionsIfNotCrossoverIsApplied
()¶
shouldCrossingTwoSingleVariableSolutionsReturnTheSameSolutionsIfProbabilityIsZero¶
-
public void
shouldCrossingTwoSingleVariableSolutionsReturnTheSameSolutionsIfProbabilityIsZero
()¶
shouldCrossingTwoSingleVariableSolutionsReturnValidSolutions¶
-
public void
shouldCrossingTwoSingleVariableSolutionsReturnValidSolutions
()¶
shouldCrossingTwoSingleVariableSolutionsWithSimilarValueReturnTheSameVariables¶
-
public void
shouldCrossingTwoSingleVariableSolutionsWithSimilarValueReturnTheSameVariables
()¶
shouldExecuteWithInvalidSolutionListSizeThrowAnException¶
-
public void
shouldExecuteWithInvalidSolutionListSizeThrowAnException
()¶
shouldExecuteWithNullParameterThrowAnException¶
-
public void
shouldExecuteWithNullParameterThrowAnException
()¶
SinglePointCrossover¶
-
public class
SinglePointCrossover
implements CrossoverOperator<BinarySolution>¶ This class implements a single point crossover operator.
Author: Antonio J. Nebro
Constructors¶
SinglePointCrossover¶
-
public
SinglePointCrossover
(double crossoverProbability, RandomGenerator<Double> randomGenerator)¶ Constructor
SinglePointCrossover¶
-
public
SinglePointCrossover
(double crossoverProbability, RandomGenerator<Double> crossoverRandomGenerator, BoundedRandomGenerator<Integer> pointRandomGenerator)¶ Constructor
Methods¶
doCrossover¶
-
public List<BinarySolution>
doCrossover
(double probability, BinarySolution parent1, BinarySolution parent2)¶ Perform the crossover operation.
Parameters: - probability – Crossover setProbability
- parent1 – The first parent
- parent2 – The second parent
Returns: An array containing the two offspring
execute¶
-
public List<BinarySolution>
execute
(List<BinarySolution> solutions)¶
SinglePointCrossoverTest¶
-
public class
SinglePointCrossoverTest
¶
Methods¶
shouldConstructorAssignTheCorrectProbabilityValue¶
-
public void
shouldConstructorAssignTheCorrectProbabilityValue
()¶
shouldConstructorFailWhenPassedANegativeProbabilityValue¶
-
public void
shouldConstructorFailWhenPassedANegativeProbabilityValue
()¶
shouldCrossingTheBitInTheMiddleOfSecondVariableReturnTheCorrectCrossedSolutions¶
-
public void
shouldCrossingTheBitInTheMiddleOfSecondVariableReturnTheCorrectCrossedSolutions
()¶
shouldCrossingTheBitInTheMiddleOfTwoSingleVariableSolutionsReturnTheCorrectCrossedSolutions¶
-
public void
shouldCrossingTheBitInTheMiddleOfTwoSingleVariableSolutionsReturnTheCorrectCrossedSolutions
()¶
shouldCrossingTheFistBitOfSecondVariableReturnTheCorrectCrossedSolutions¶
-
public void
shouldCrossingTheFistBitOfSecondVariableReturnTheCorrectCrossedSolutions
()¶
shouldCrossingTheFistBitOfTwoSingleVariableSolutionsReturnTheCorrectCrossedSolutions¶
-
public void
shouldCrossingTheFistBitOfTwoSingleVariableSolutionsReturnTheCorrectCrossedSolutions
()¶
shouldCrossingTheLastBitOfTwoSingleVariableSolutionsReturnTheCorrectCrossedSolutions¶
-
public void
shouldCrossingTheLastBitOfTwoSingleVariableSolutionsReturnTheCorrectCrossedSolutions
()¶
shouldCrossingTwoVariableSolutionsReturnTheSameSolutionsIfNoBitsAreMutated¶
-
public void
shouldCrossingTwoVariableSolutionsReturnTheSameSolutionsIfNoBitsAreMutated
()¶
shouldExecuteFailIfTheListContainsMoreThanTwoSolutions¶
-
public void
shouldExecuteFailIfTheListContainsMoreThanTwoSolutions
()¶
shouldExecuteFailIfTheListContainsOnlyOneSolution¶
-
public void
shouldExecuteFailIfTheListContainsOnlyOneSolution
()¶
shouldExecuteWithNullParameterThrowAnException¶
-
public void
shouldExecuteWithNullParameterThrowAnException
()¶
TwoPointCrossover¶
-
public class
TwoPointCrossover
<T> implements CrossoverOperator<Solution<T>>¶ Created by FlapKap on 27-05-2017.
Fields¶
operator¶
-
NPointCrossover<T>
operator
¶
org.uma.jmetal.operator.impl.localsearch¶
ArchiveMutationLocalSearch¶
-
public class
ArchiveMutationLocalSearch
<S extends Solution<?>> implements LocalSearchOperator<S>¶ This class implements a local search operator based in the use of a mutation operator. An archive is used to store the non-dominated solutions found during the search.
Author: Antonio J. Nebro
Constructors¶
ArchiveMutationLocalSearch¶
-
public
ArchiveMutationLocalSearch
(int improvementRounds, MutationOperator<S> mutationOperator, Archive<S> archive, Problem<S> problem)¶ Constructor. Creates a new local search object.
Parameters: - improvementRounds – number of iterations
- mutationOperator – mutation operator
- archive – archive to store non-dominated solution
- problem – problem to resolve
BasicLocalSearch¶
-
public class
BasicLocalSearch
<S extends Solution<?>> implements LocalSearchOperator<S>¶ This class implements a basic local search operator based in the use of a mutation operator.
Author: Antonio J. Nebro
Constructors¶
BasicLocalSearch¶
-
public
BasicLocalSearch
(int improvementRounds, MutationOperator<S> mutationOperator, Comparator<S> comparator, Problem<S> problem)¶ Constructor. Creates a new local search object.
Parameters: - improvementRounds – number of iterations
- mutationOperator – mutation operator
- comparator – comparator to determine which solution is the best
- problem – problem to resolve
BasicLocalSearch¶
-
public
BasicLocalSearch
(int improvementRounds, MutationOperator<S> mutationOperator, Comparator<S> comparator, Problem<S> problem, RandomGenerator<Double> randomGenerator)¶ Constructor. Creates a new local search object.
Parameters: - improvementRounds – number of iterations
- mutationOperator – mutation operator
- comparator – comparator to determine which solution is the best
- problem – problem to resolve
- randomGenerator – the
RandomGenerator
to use when we must choose between equivalent solutions
org.uma.jmetal.operator.impl.mutation¶
BitFlipMutation¶
-
public class
BitFlipMutation
implements MutationOperator<BinarySolution>¶ Author: Antonio J. Nebro
Constructors¶
BitFlipMutation¶
-
public
BitFlipMutation
(double mutationProbability, RandomGenerator<Double> randomGenerator)¶ Constructor
Methods¶
doMutation¶
-
public void
doMutation
(double probability, BinarySolution solution)¶ Perform the mutation operation
Parameters: - probability – Mutation setProbability
- solution – The solution to mutate
execute¶
-
public BinarySolution
execute
(BinarySolution solution)¶ Execute() method
BitFlipMutationTest¶
-
public class
BitFlipMutationTest
¶
Methods¶
shouldConstructorAssignTheCorrectProbabilityValue¶
-
public void
shouldConstructorAssignTheCorrectProbabilityValue
()¶
shouldConstructorFailWhenPassedANegativeProbabilityValue¶
-
public void
shouldConstructorFailWhenPassedANegativeProbabilityValue
()¶
shouldExecuteWithNullParameterThrowAnException¶
-
public void
shouldExecuteWithNullParameterThrowAnException
()¶
shouldGetMutationProbabilityReturnTheRightValue¶
-
public void
shouldGetMutationProbabilityReturnTheRightValue
()¶
shouldJMetalRandomGeneratorNotBeUsedWhenCustomRandomGeneratorProvided¶
-
public void
shouldJMetalRandomGeneratorNotBeUsedWhenCustomRandomGeneratorProvided
()¶
shouldMutateASingleVariableSolutionReturnTheSameSolutionIfNoBitsAreMutated¶
-
public void
shouldMutateASingleVariableSolutionReturnTheSameSolutionIfNoBitsAreMutated
()¶
shouldMutateASingleVariableSolutionWhenASingleBitIsMutated¶
-
public void
shouldMutateASingleVariableSolutionWhenASingleBitIsMutated
()¶
CDGMutation¶
-
public class
CDGMutation
implements MutationOperator<DoubleSolution>¶ This class implements a polynomial mutation operator The implementation is based on the NSGA-II code available in http://www.iitk.ac.in/kangal/codes.shtml If the lower and upper bounds of a variable are the same, no mutation is carried out and the bound value is returned.
Author: Feng Zhang
Constructors¶
CDGMutation¶
-
public
CDGMutation
(DoubleProblem problem, double delta)¶ Constructor
CDGMutation¶
-
public
CDGMutation
(double mutationProbability, double delta, RepairDoubleSolution solutionRepair)¶ Constructor
Methods¶
execute¶
-
public DoubleSolution
execute
(DoubleSolution solution)¶ Execute() method
IntegerPolynomialMutation¶
-
public class
IntegerPolynomialMutation
implements MutationOperator<IntegerSolution>¶ This class implements a polynomial mutation operator to be applied to Integer solutions If the lower and upper bounds of a variable are the same, no mutation is carried out and the bound value is returned. A
RepairDoubleSolution
object is used to decide the strategy to apply when a value is out of range.Author: Antonio J. Nebro
Constructors¶
IntegerPolynomialMutation¶
-
public
IntegerPolynomialMutation
(IntegerProblem problem, double distributionIndex)¶ Constructor
IntegerPolynomialMutation¶
-
public
IntegerPolynomialMutation
(double mutationProbability, double distributionIndex)¶ Constructor
IntegerPolynomialMutation¶
-
public
IntegerPolynomialMutation
(double mutationProbability, double distributionIndex, RepairDoubleSolution solutionRepair)¶ Constructor
IntegerPolynomialMutation¶
-
public
IntegerPolynomialMutation
(double mutationProbability, double distributionIndex, RepairDoubleSolution solutionRepair, RandomGenerator<Double> randomGenerator)¶ Constructor
Methods¶
execute¶
-
public IntegerSolution
execute
(IntegerSolution solution)¶ Execute() method
IntegerPolynomialMutationTest¶
-
public class
IntegerPolynomialMutationTest
¶
Methods¶
shouldConstructorAssignTheCorrectDistributionIndex¶
-
public void
shouldConstructorAssignTheCorrectDistributionIndex
()¶
shouldConstructorAssignTheCorrectProbabilityValue¶
-
public void
shouldConstructorAssignTheCorrectProbabilityValue
()¶
shouldConstructorFailWhenPassedANegativeDistributionIndex¶
-
public void
shouldConstructorFailWhenPassedANegativeDistributionIndex
()¶
shouldConstructorFailWhenPassedANegativeProbabilityValue¶
-
public void
shouldConstructorFailWhenPassedANegativeProbabilityValue
()¶
shouldConstructorWithProblemAndDistributionIndexParametersAssignTheCorrectValues¶
-
public void
shouldConstructorWithProblemAndDistributionIndexParametersAssignTheCorrectValues
()¶
shouldConstructorWithoutParameterAssignTheDefaultValues¶
-
public void
shouldConstructorWithoutParameterAssignTheDefaultValues
()¶
shouldExecuteWithNullParameterThrowAnException¶
-
public void
shouldExecuteWithNullParameterThrowAnException
()¶
shouldGetDistributionIndexReturnTheRightValue¶
-
public void
shouldGetDistributionIndexReturnTheRightValue
()¶
shouldGetMutationProbabilityReturnTheRightValue¶
-
public void
shouldGetMutationProbabilityReturnTheRightValue
()¶
shouldJMetalRandomGeneratorNotBeUsedWhenCustomRandomGeneratorProvided¶
-
public void
shouldJMetalRandomGeneratorNotBeUsedWhenCustomRandomGeneratorProvided
()¶
shouldMutateASingleVariableSolutionReturnAnotherValidSolution¶
-
public void
shouldMutateASingleVariableSolutionReturnAnotherValidSolution
()¶
shouldMutateASingleVariableSolutionReturnTheSameSolutionIfItIsNotMutated¶
-
public void
shouldMutateASingleVariableSolutionReturnTheSameSolutionIfItIsNotMutated
()¶
NonUniformMutation¶
-
public class
NonUniformMutation
implements MutationOperator<DoubleSolution>¶ This class implements a non-uniform mutation operator.
Author: Antonio J. Nebro , Juan J. Durillo
Constructors¶
NonUniformMutation¶
-
public
NonUniformMutation
(double mutationProbability, double perturbation, int maxIterations)¶ Constructor
NonUniformMutation¶
-
public
NonUniformMutation
(double mutationProbability, double perturbation, int maxIterations, RandomGenerator<Double> randomGenenerator)¶ Constructor
Methods¶
doMutation¶
-
public void
doMutation
(double probability, DoubleSolution solution)¶ Perform the mutation operation
Parameters: - probability – Mutation setProbability
- solution – The solution to mutate
execute¶
-
public DoubleSolution
execute
(DoubleSolution solution)¶ Execute() method
NullMutation¶
-
public class
NullMutation
<S> implements MutationOperator<S>¶ This class is intended to perform no mutation. It can be useful when configuring a genetic algorithm and we want to use only crossover.
Author: Antonio J. Nebro
PermutationSwapMutation¶
-
public class
PermutationSwapMutation
<T> implements MutationOperator<PermutationSolution<T>>¶ This class implements a swap mutation. The solution type of the solution must be Permutation.
Author: Antonio J. Nebro , Juan J. Durillo
Constructors¶
PermutationSwapMutation¶
-
public
PermutationSwapMutation
(double mutationProbability, RandomGenerator<Double> randomGenerator)¶ Constructor
PermutationSwapMutation¶
-
public
PermutationSwapMutation
(double mutationProbability, RandomGenerator<Double> mutationRandomGenerator, BoundedRandomGenerator<Integer> positionRandomGenerator)¶ Constructor
Methods¶
doMutation¶
-
public void
doMutation
(PermutationSolution<T> solution)¶ Performs the operation
execute¶
-
public PermutationSolution<T>
execute
(PermutationSolution<T> solution)¶
PolynomialMutation¶
-
public class
PolynomialMutation
implements MutationOperator<DoubleSolution>¶ This class implements a polynomial mutation operator The implementation is based on the NSGA-II code available in http://www.iitk.ac.in/kangal/codes.shtml If the lower and upper bounds of a variable are the same, no mutation is carried out and the bound value is returned.
Author: Antonio J. Nebro , Juan J. Durillo
Constructors¶
PolynomialMutation¶
-
public
PolynomialMutation
(DoubleProblem problem, double distributionIndex)¶ Constructor
PolynomialMutation¶
-
public
PolynomialMutation
(DoubleProblem problem, double distributionIndex, RandomGenerator<Double> randomGenerator)¶ Constructor
PolynomialMutation¶
-
public
PolynomialMutation
(double mutationProbability, double distributionIndex)¶ Constructor
PolynomialMutation¶
-
public
PolynomialMutation
(double mutationProbability, double distributionIndex, RandomGenerator<Double> randomGenerator)¶ Constructor
PolynomialMutation¶
-
public
PolynomialMutation
(double mutationProbability, double distributionIndex, RepairDoubleSolution solutionRepair)¶ Constructor
PolynomialMutation¶
-
public
PolynomialMutation
(double mutationProbability, double distributionIndex, RepairDoubleSolution solutionRepair, RandomGenerator<Double> randomGenerator)¶ Constructor
Methods¶
execute¶
-
public DoubleSolution
execute
(DoubleSolution solution)¶ Execute() method
PolynomialMutationTest¶
-
public class
PolynomialMutationTest
¶ Note: this class does check that the polynomial mutation operator does not return invalid values, but not that it works properly (@see PolynomialMutationWorkingTest)
Author: Antonio J. Nebro
Methods¶
shouldConstructorAssignTheCorrectDistributionIndex¶
-
public void
shouldConstructorAssignTheCorrectDistributionIndex
()¶
shouldConstructorAssignTheCorrectProbabilityValue¶
-
public void
shouldConstructorAssignTheCorrectProbabilityValue
()¶
shouldConstructorFailWhenPassedANegativeDistributionIndex¶
-
public void
shouldConstructorFailWhenPassedANegativeDistributionIndex
()¶
shouldConstructorFailWhenPassedANegativeProbabilityValue¶
-
public void
shouldConstructorFailWhenPassedANegativeProbabilityValue
()¶
shouldConstructorWithProblemAndDistributionIndexParametersAssignTheCorrectValues¶
-
public void
shouldConstructorWithProblemAndDistributionIndexParametersAssignTheCorrectValues
()¶
shouldConstructorWithoutParameterAssignTheDefaultValues¶
-
public void
shouldConstructorWithoutParameterAssignTheDefaultValues
()¶
shouldExecuteWithNullParameterThrowAnException¶
-
public void
shouldExecuteWithNullParameterThrowAnException
()¶
shouldGetDistributionIndexReturnTheRightValue¶
-
public void
shouldGetDistributionIndexReturnTheRightValue
()¶
shouldGetMutationProbabilityReturnTheRightValue¶
-
public void
shouldGetMutationProbabilityReturnTheRightValue
()¶
shouldJMetalRandomGeneratorNotBeUsedWhenCustomRandomGeneratorProvided¶
-
public void
shouldJMetalRandomGeneratorNotBeUsedWhenCustomRandomGeneratorProvided
()¶
shouldMutateASingleVariableSolutionReturnAnotherValidSolution¶
-
public void
shouldMutateASingleVariableSolutionReturnAnotherValidSolution
()¶
shouldMutateASingleVariableSolutionReturnTheSameSolutionIfItIsNotMutated¶
-
public void
shouldMutateASingleVariableSolutionReturnTheSameSolutionIfItIsNotMutated
()¶
SimpleRandomMutation¶
-
public class
SimpleRandomMutation
implements MutationOperator<DoubleSolution>¶ This class implements a random mutation operator for double solutions
Author: Antonio J. Nebro
Constructors¶
SimpleRandomMutation¶
-
public
SimpleRandomMutation
(double probability, RandomGenerator<Double> randomGenerator)¶ Constructor
Methods¶
execute¶
-
public DoubleSolution
execute
(DoubleSolution solution)¶ Execute() method
UniformMutation¶
-
public class
UniformMutation
implements MutationOperator<DoubleSolution>¶ This class implements a uniform mutation operator.
Author: Antonio J. Nebro , Juan J. Durillo
Constructors¶
UniformMutation¶
-
public
UniformMutation
(double mutationProbability, double perturbation)¶ Constructor
UniformMutation¶
-
public
UniformMutation
(double mutationProbability, double perturbation, RandomGenerator<Double> randomGenenerator)¶ Constructor
Methods¶
doMutation¶
-
public void
doMutation
(double probability, DoubleSolution solution)¶ Perform the operation
Parameters: - probability – Mutation setProbability
- solution – The solution to mutate
execute¶
-
public DoubleSolution
execute
(DoubleSolution solution)¶ Execute() method
org.uma.jmetal.operator.impl.selection¶
BestSolutionSelection¶
-
public class
BestSolutionSelection
<S> implements SelectionOperator<List<S>, S>¶ This class implements a selection operator used for selecting the best solution in a list according to a given comparator.
Author: Antonio J. Nebro
Constructors¶
BestSolutionSelection¶
-
public
BestSolutionSelection
(Comparator<S> comparator)¶
BinaryTournamentSelection¶
-
public class
BinaryTournamentSelection
<S extends Solution<?>> extends TournamentSelection<S>¶ Applies a binary tournament selection to return the best solution between two that have been chosen at random from a solution list. Modified by Juanjo in 13.03.2015. A binary tournament is now a TournamenteSelection with 2 tournaments
Author: Antonio J. Nebro, Juan J. Durillo
BinaryTournamentSelectionTest¶
-
public class
BinaryTournamentSelectionTest
¶ Author: Antonio J. Nebro
Methods¶
shouldExecuteRaiseAnExceptionIfTheListOfSolutionsIsEmpty¶
-
public void
shouldExecuteRaiseAnExceptionIfTheListOfSolutionsIsEmpty
()¶
shouldExecuteRaiseAnExceptionIfTheListOfSolutionsIsNull¶
-
public void
shouldExecuteRaiseAnExceptionIfTheListOfSolutionsIsNull
()¶
shouldExecuteReturnTheSameSolutionIfTheListContainsOneSolution¶
-
public void
shouldExecuteReturnTheSameSolutionIfTheListContainsOneSolution
()¶
shouldExecuteReturnTwoSolutionsIfTheListContainsTwoSolutions¶
-
public void
shouldExecuteReturnTwoSolutionsIfTheListContainsTwoSolutions
()¶
DifferentialEvolutionSelection¶
-
public class
DifferentialEvolutionSelection
implements SelectionOperator<List<DoubleSolution>, List<DoubleSolution>>¶ Class implementing the selection operator used in DE: three different solutions are returned from a population. The three solutions must be also different from the one indicated by an index (its position in the list). As a consequence, the operator requires a solution list with at least for elements.
Author: Antonio J. Nebro , Juan J. Durillo
Constructors¶
DifferentialEvolutionSelection¶
-
public
DifferentialEvolutionSelection
(BoundedRandomGenerator<Integer> randomGenerator)¶ Constructor
Methods¶
execute¶
-
public List<DoubleSolution>
execute
(List<DoubleSolution> solutionSet)¶ Execute() method
DifferentialEvolutionSelectionTest¶
-
public class
DifferentialEvolutionSelectionTest
¶ Created by ajnebro on 3/5/15.
Methods¶
shouldExecuteRaiseAnExceptionIfTheIndexIsHigherThanTheSolutionListLength¶
-
public void
shouldExecuteRaiseAnExceptionIfTheIndexIsHigherThanTheSolutionListLength
()¶
shouldExecuteRaiseAnExceptionIfTheIndexIsNegative¶
-
public void
shouldExecuteRaiseAnExceptionIfTheIndexIsNegative
()¶
shouldExecuteRaiseAnExceptionIfTheIndexIsNotIndicated¶
-
public void
shouldExecuteRaiseAnExceptionIfTheIndexIsNotIndicated
()¶
shouldExecuteRaiseAnExceptionIfTheListOfSolutionsHasOneSolution¶
-
public void
shouldExecuteRaiseAnExceptionIfTheListOfSolutionsHasOneSolution
()¶
shouldExecuteRaiseAnExceptionIfTheListOfSolutionsIsEmpty¶
-
public void
shouldExecuteRaiseAnExceptionIfTheListOfSolutionsIsEmpty
()¶
shouldExecuteRaiseAnExceptionIfTheListOfSolutionsIsNull¶
-
public void
shouldExecuteRaiseAnExceptionIfTheListOfSolutionsIsNull
()¶
NaryRandomSelection¶
-
public class
NaryRandomSelection
<S> implements SelectionOperator<List<S>, List<S>>¶ This class implements a random selection operator used for selecting a N number of solutions from a list
Author: Antonio J. Nebro
Constructors¶
NaryRandomSelectionTest¶
-
public class
NaryRandomSelectionTest
¶ Author: Antonio J. Nebro
Methods¶
shouldDefaultConstructorReturnASingleSolution¶
-
public void
shouldDefaultConstructorReturnASingleSolution
()¶
shouldExecuteRaiseAnExceptionIfTheListSizeIsOneAndTwoSolutionsAreRequested¶
-
public void
shouldExecuteRaiseAnExceptionIfTheListSizeIsOneAndTwoSolutionsAreRequested
()¶
shouldExecuteRaiseAnExceptionIfTheListSizeIsTwoAndFourSolutionsAreRequested¶
-
public void
shouldExecuteRaiseAnExceptionIfTheListSizeIsTwoAndFourSolutionsAreRequested
()¶
shouldExecuteRaiseAnExceptionIfTheSolutionListIsEmpty¶
-
public void
shouldExecuteRaiseAnExceptionIfTheSolutionListIsEmpty
()¶
shouldExecuteRaiseAnExceptionIfTheSolutionListIsNull¶
-
public void
shouldExecuteRaiseAnExceptionIfTheSolutionListIsNull
()¶
shouldExecuteReturnTheCorrectNumberOfSolutions¶
-
public void
shouldExecuteReturnTheCorrectNumberOfSolutions
()¶
shouldExecuteReturnTheSolutionInTheListIfTheListContainsASolution¶
-
public void
shouldExecuteReturnTheSolutionInTheListIfTheListContainsASolution
()¶
shouldExecuteReturnTheSolutionSInTheListIfTheListContainsTwoSolutions¶
-
public void
shouldExecuteReturnTheSolutionSInTheListIfTheListContainsTwoSolutions
()¶
NaryTournamentSelection¶
-
public class
NaryTournamentSelection
<S extends Solution<?>> implements SelectionOperator<List<S>, S>¶ Applies a N-ary tournament selection to return the best solution between N that have been chosen at random from a solution list.
Author: Antonio J. Nebro
Constructors¶
NaryTournamentSelection¶
-
public
NaryTournamentSelection
(int numberOfSolutionsToBeReturned, Comparator<S> comparator)¶ Constructor
NaryTournamentSelectionTest¶
-
public class
NaryTournamentSelectionTest
¶ Author: Antonio J. Nebro
Methods¶
shouldDefaultConstructorSetTheNumberOfSolutionsToBeReturnedEqualsToTwo¶
-
public void
shouldDefaultConstructorSetTheNumberOfSolutionsToBeReturnedEqualsToTwo
()¶
shouldExecuteRaiseAnExceptionIfTheListOfSolutionsIsEmpty¶
-
public void
shouldExecuteRaiseAnExceptionIfTheListOfSolutionsIsEmpty
()¶
shouldExecuteRaiseAnExceptionIfTheListOfSolutionsIsNull¶
-
public void
shouldExecuteRaiseAnExceptionIfTheListOfSolutionsIsNull
()¶
shouldExecuteRaiseAnExceptionIfTheListSizeIsOneAndTwoSolutionsAreRequested¶
-
public void
shouldExecuteRaiseAnExceptionIfTheListSizeIsOneAndTwoSolutionsAreRequested
()¶
RandomSelection¶
-
public class
RandomSelection
<S> implements SelectionOperator<List<S>, S>¶ This class implements a random selection operator used for selecting a N number of solutions from a list
Author: Antonio J. Nebro
RankingAndCrowdingSelection¶
-
public class
RankingAndCrowdingSelection
<S extends Solution<?>> implements SelectionOperator<List<S>, List<S>>¶ This class implements a selection for selecting a number of solutions from a solution list. The solutions are taken by mean of its ranking and crowding distance values.
Author: Antonio J. Nebro, Juan J. Durillo
Constructors¶
RankingAndCrowdingSelection¶
-
public
RankingAndCrowdingSelection
(int solutionsToSelect, Comparator<S> dominanceComparator)¶ Constructor
RankingAndCrowdingSelectionTest¶
-
public class
RankingAndCrowdingSelectionTest
¶ Author: Antonio J. Nebro
Methods¶
shouldDefaultConstructorReturnASingleSolution¶
-
public void
shouldDefaultConstructorReturnASingleSolution
()¶
shouldExecuteRaiseAnExceptionIfTheSolutionListIsEmpty¶
-
public void
shouldExecuteRaiseAnExceptionIfTheSolutionListIsEmpty
()¶
RankingAndPreferenceSelection¶
-
public class
RankingAndPreferenceSelection
<S extends Solution<?>> implements SelectionOperator<List<S>, List<S>>¶
Constructors¶
TournamentSelection¶
-
public class
TournamentSelection
<S extends Solution<?>> implements SelectionOperator<List<S>, S>¶ Author: Juanjo
Constructors¶
TournamentSelection¶
-
public
TournamentSelection
(Comparator<S> comparator, int numberOfTournaments)¶ Constructor
TournamentSelectionTest¶
-
public class
TournamentSelectionTest
¶ Created by ajnebro on 3/5/15.
Methods¶
shouldConstructorAssignTheCorrectValueSToTheNumberOfTournamentsAndTheComparator¶
-
public void
shouldConstructorAssignTheCorrectValueSToTheNumberOfTournamentsAndTheComparator
()¶
shouldConstructorAssignTheCorrectValueToTheNumberOfTournaments¶
-
public void
shouldConstructorAssignTheCorrectValueToTheNumberOfTournaments
()¶
shouldExecuteRaiseAnExceptionIfTheSolutionListIsEmpty¶
-
public void
shouldExecuteRaiseAnExceptionIfTheSolutionListIsEmpty
()¶
org.uma.jmetal.problem¶
BinaryProblem¶
-
public interface
BinaryProblem
extends Problem<BinarySolution>¶ Interface representing binary problems
Author: Antonio J. Nebro
ConstrainedProblem¶
DoubleBinaryProblem¶
DoubleProblem¶
-
public interface
DoubleProblem
extends Problem<DoubleSolution>¶ Interface representing continuous problems
Author: Antonio J. Nebro
IntegerDoubleProblem¶
IntegerProblem¶
-
public interface
IntegerProblem
extends Problem<IntegerSolution>¶ Interface representing integer problems
Author: Antonio J. Nebro
PermutationProblem¶
Problem¶
-
public interface
Problem
<S> extends Serializable¶ Interface representing a multi-objective optimization problem
Author: Antonio J. Nebro
Parameters: - <S> – Encoding
org.uma.jmetal.problem.impl¶
AbstractBinaryProblem¶
-
public abstract class
AbstractBinaryProblem
extends AbstractGenericProblem<BinarySolution> implements BinaryProblem¶
AbstractDoubleProblem¶
-
public abstract class
AbstractDoubleProblem
extends AbstractGenericProblem<DoubleSolution> implements DoubleProblem¶
Methods¶
createSolution¶
-
public DoubleSolution
createSolution
()¶
AbstractIntegerDoubleProblem¶
-
public abstract class
AbstractIntegerDoubleProblem
<S> extends AbstractGenericProblem<S> implements IntegerDoubleProblem<S>¶
AbstractIntegerPermutationProblem¶
-
public abstract class
AbstractIntegerPermutationProblem
extends AbstractGenericProblem<PermutationSolution<Integer>> implements PermutationProblem<PermutationSolution<Integer>>¶
Methods¶
createSolution¶
-
public PermutationSolution<Integer>
createSolution
()¶
AbstractIntegerProblem¶
-
public abstract class
AbstractIntegerProblem
extends AbstractGenericProblem<IntegerSolution> implements IntegerProblem¶
Methods¶
createSolution¶
-
public IntegerSolution
createSolution
()¶
org.uma.jmetal.problem.multiobjective¶
Binh2¶
-
public class
Binh2
extends AbstractDoubleProblem implements ConstrainedProblem<DoubleSolution>¶ Class representing problem Binh2
Fields¶
numberOfViolatedConstraints¶
-
public NumberOfViolatedConstraints<DoubleSolution>
numberOfViolatedConstraints
¶
overallConstraintViolationDegree¶
-
public OverallConstraintViolation<DoubleSolution>
overallConstraintViolationDegree
¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
evaluateConstraints¶
-
public void
evaluateConstraints
(DoubleSolution solution)¶ EvaluateConstraints() method
ConstrEx¶
-
public class
ConstrEx
extends AbstractDoubleProblem implements ConstrainedProblem<DoubleSolution>¶ Class representing problem ConstrEx
Fields¶
numberOfViolatedConstraints¶
-
public NumberOfViolatedConstraints<DoubleSolution>
numberOfViolatedConstraints
¶
overallConstraintViolationDegree¶
-
public OverallConstraintViolation<DoubleSolution>
overallConstraintViolationDegree
¶
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
evaluateConstraints¶
-
public void
evaluateConstraints
(DoubleSolution solution)¶ EvaluateConstraints() method
Fonseca¶
-
public class
Fonseca
extends AbstractDoubleProblem¶ Class representing problem Fonseca
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
FourBarTruss¶
-
public class
FourBarTruss
extends AbstractDoubleProblem¶ Class representing problem FourBarTruss Measures: f = 10kN e = 200000 kN/cm2 l = 200 cm sigma = 10kN/cm2
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
Golinski¶
-
public class
Golinski
extends AbstractDoubleProblem implements ConstrainedProblem<DoubleSolution>¶ Class representing problem Golinski.
Fields¶
numberOfViolatedConstraints¶
-
public NumberOfViolatedConstraints<DoubleSolution>
numberOfViolatedConstraints
¶
overallConstraintViolationDegree¶
-
public OverallConstraintViolation<DoubleSolution>
overallConstraintViolationDegree
¶
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
evaluateConstraints¶
-
public void
evaluateConstraints
(DoubleSolution solution)¶ EvaluateConstraints() method
Kursawe¶
-
public class
Kursawe
extends AbstractDoubleProblem¶ Class representing problem Kursawe
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
MultiobjectiveTSP¶
-
public class
MultiobjectiveTSP
extends AbstractIntegerPermutationProblem¶ Class representing a bi-objective TSP (Traveling Salesman Problem) problem. It accepts data files from TSPLIB: http://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/tsp/
Fields¶
Constructors¶
NMMin¶
-
public class
NMMin
extends AbstractIntegerProblem¶ Created by Antonio J. Nebro on 03/07/14. Bi-objective problem for testing integer encoding. Objective 1: minimizing the distance to value N Objective 2: minimizing the distance to value M
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(IntegerSolution solution)¶ Evaluate() method
NMMin2¶
-
public class
NMMin2
extends AbstractIntegerDoubleProblem<IntegerDoubleSolution>¶ Created by Antonio J. Nebro on 18/09/14. Bi-objective problem for testing integer/double encoding. Objective 1: minimizing the distance to value N Objective 2: minimizing the distance to value M
Constructors¶
Methods¶
createSolution¶
-
public IntegerDoubleSolution
createSolution
()¶
evaluate¶
-
public void
evaluate
(IntegerDoubleSolution solution)¶ Evaluate() method
NMMinTest¶
-
public class
NMMinTest
¶ Created by Antonio J. Nebro on 17/09/14.
Fields¶
problem¶
-
Problem<IntegerSolution>
problem
¶
OneZeroMax¶
-
public class
OneZeroMax
extends AbstractBinaryProblem¶ Class representing problem OneZeroMax. The problem consist of maximizing the number of ‘1’s and ‘0’s in a binary string.
Constructors¶
Methods¶
createSolution¶
-
public BinarySolution
createSolution
()¶
evaluate¶
-
public void
evaluate
(BinarySolution solution)¶ Evaluate() method
Osyczka2¶
-
public class
Osyczka2
extends AbstractDoubleProblem implements ConstrainedProblem<DoubleSolution>¶ Class representing problem Oyczka2
Fields¶
numberOfViolatedConstraints¶
-
public NumberOfViolatedConstraints<DoubleSolution>
numberOfViolatedConstraints
¶
overallConstraintViolationDegree¶
-
public OverallConstraintViolation<DoubleSolution>
overallConstraintViolationDegree
¶
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
evaluateConstraints¶
-
public void
evaluateConstraints
(DoubleSolution solution)¶ EvaluateConstraints() method
Schaffer¶
-
public class
Schaffer
extends AbstractDoubleProblem¶ Class representing problem Schaffer
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
Srinivas¶
-
public class
Srinivas
extends AbstractDoubleProblem implements ConstrainedProblem<DoubleSolution>¶ Class representing problem Srinivas
Fields¶
numberOfViolatedConstraints¶
-
public NumberOfViolatedConstraints<DoubleSolution>
numberOfViolatedConstraints
¶
overallConstraintViolationDegree¶
-
public OverallConstraintViolation<DoubleSolution>
overallConstraintViolationDegree
¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
evaluateConstraints¶
-
public void
evaluateConstraints
(DoubleSolution solution)¶ EvaluateConstraints() method
Tanaka¶
-
public class
Tanaka
extends AbstractDoubleProblem implements ConstrainedProblem<DoubleSolution>¶ Class representing problem Tanaka
Fields¶
numberOfViolatedConstraints¶
-
public NumberOfViolatedConstraints<DoubleSolution>
numberOfViolatedConstraints
¶
overallConstraintViolationDegree¶
-
public OverallConstraintViolation<DoubleSolution>
overallConstraintViolationDegree
¶
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶
evaluateConstraints¶
-
public void
evaluateConstraints
(DoubleSolution solution)¶ EvaluateConstraints() method
Viennet2¶
-
public class
Viennet2
extends AbstractDoubleProblem¶ Class representing problem Viennet2
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
Viennet3¶
-
public class
Viennet3
extends AbstractDoubleProblem¶ Class representing problem Viennet3
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
Viennet4¶
-
public class
Viennet4
extends AbstractDoubleProblem implements ConstrainedProblem<DoubleSolution>¶ Class representing problem Viennet4
Fields¶
numberOfViolatedConstraints¶
-
public NumberOfViolatedConstraints<DoubleSolution>
numberOfViolatedConstraints
¶
overallConstraintViolationDegree¶
-
public OverallConstraintViolation<DoubleSolution>
overallConstraintViolationDegree
¶
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
evaluateConstraints¶
-
public void
evaluateConstraints
(DoubleSolution solution)¶ EvaluateConstraints() method
Water¶
-
public class
Water
extends AbstractDoubleProblem implements ConstrainedProblem<DoubleSolution>¶ Class representing problem Water
Fields¶
numberOfViolatedConstraints¶
-
public NumberOfViolatedConstraints<DoubleSolution>
numberOfViolatedConstraints
¶
overallConstraintViolationDegree¶
-
public OverallConstraintViolation<DoubleSolution>
overallConstraintViolationDegree
¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
evaluateConstraints¶
-
public void
evaluateConstraints
(DoubleSolution solution)¶ EvaluateConstraints() method
org.uma.jmetal.problem.multiobjective.UF¶
UF1¶
-
public class
UF1
extends AbstractDoubleProblem¶ Class representing problem CEC2009_UF1
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
UF10¶
-
public class
UF10
extends AbstractDoubleProblem¶ Class representing problem CEC2009_UF10
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
UF2¶
-
public class
UF2
extends AbstractDoubleProblem¶ Class representing problem CEC2009_UF2
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
UF3¶
-
public class
UF3
extends AbstractDoubleProblem¶ Class representing problem CEC2009_UF3
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
UF4¶
-
public class
UF4
extends AbstractDoubleProblem¶ Class representing problem CEC2009_UF4
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
UF5¶
-
public class
UF5
extends AbstractDoubleProblem¶ Class representing problem CEC2009_UF5
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
UF6¶
-
public class
UF6
extends AbstractDoubleProblem¶ Class representing problem CEC2009_UF5
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
UF7¶
-
public class
UF7
extends AbstractDoubleProblem¶ Class representing problem CEC2009_UF7
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
UF8¶
-
public class
UF8
extends AbstractDoubleProblem¶ Class representing problem CEC2009_UF8
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
UF9¶
-
public class
UF9
extends AbstractDoubleProblem¶ Class representing problem CEC2009_UF9
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
org.uma.jmetal.problem.multiobjective.cdtlz¶
C1_DTLZ1¶
-
public class
C1_DTLZ1
extends DTLZ1 implements ConstrainedProblem<DoubleSolution>¶ Problem C1-DTLZ1, defined in: Jain, H. and K. Deb. “An Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach, Part II: Handling Constraints and Extending to an Adaptive Approach.” EEE Transactions on Evolutionary Computation, 18(4):602-622, 2014.
Author: Antonio J. Nebro
Fields¶
numberOfViolatedConstraints¶
-
public NumberOfViolatedConstraints<DoubleSolution>
numberOfViolatedConstraints
¶
overallConstraintViolationDegree¶
-
public OverallConstraintViolation<DoubleSolution>
overallConstraintViolationDegree
¶
Constructors¶
Methods¶
evaluateConstraints¶
-
public void
evaluateConstraints
(DoubleSolution solution)¶
C1_DTLZ3¶
-
public class
C1_DTLZ3
extends DTLZ3 implements ConstrainedProblem<DoubleSolution>¶ Problem C1-DTLZ3, defined in: Jain, H. and K. Deb. “An Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach, Part II: Handling Constraints and Extending to an Adaptive Approach.” EEE Transactions on Evolutionary Computation, 18(4):602-622, 2014.
Author: Antonio J. Nebro
Fields¶
numberOfViolatedConstraints¶
-
public NumberOfViolatedConstraints<DoubleSolution>
numberOfViolatedConstraints
¶
overallConstraintViolationDegree¶
-
public OverallConstraintViolation<DoubleSolution>
overallConstraintViolationDegree
¶
Constructors¶
Methods¶
evaluateConstraints¶
-
public void
evaluateConstraints
(DoubleSolution solution)¶
C2_DTLZ2¶
-
public class
C2_DTLZ2
extends DTLZ2 implements ConstrainedProblem<DoubleSolution>¶ Problem C2-DTLZ2, defined in: Jain, H. and K. Deb. “An Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach, Part II: Handling Constraints and Extending to an Adaptive Approach.” EEE Transactions on Evolutionary Computation, 18(4):602-622, 2014.
Author: Antonio J. Nebro
Fields¶
numberOfViolatedConstraints¶
-
public NumberOfViolatedConstraints<DoubleSolution>
numberOfViolatedConstraints
¶
overallConstraintViolationDegree¶
-
public OverallConstraintViolation<DoubleSolution>
overallConstraintViolationDegree
¶
Constructors¶
Methods¶
evaluateConstraints¶
-
public void
evaluateConstraints
(DoubleSolution solution)¶
C3_DTLZ1¶
-
public class
C3_DTLZ1
extends DTLZ1 implements ConstrainedProblem<DoubleSolution>¶ Problem C3-DTLZ1, defined in: Jain, H. and K. Deb. “An Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach, Part II: Handling Constraints and Extending to an Adaptive Approach.” EEE Transactions on Evolutionary Computation, 18(4):602-622, 2014.
Author: Antonio J. Nebro
Fields¶
numberOfViolatedConstraints¶
-
public NumberOfViolatedConstraints<DoubleSolution>
numberOfViolatedConstraints
¶
overallConstraintViolationDegree¶
-
public OverallConstraintViolation<DoubleSolution>
overallConstraintViolationDegree
¶
Constructors¶
Methods¶
evaluateConstraints¶
-
public void
evaluateConstraints
(DoubleSolution solution)¶
C3_DTLZ4¶
-
public class
C3_DTLZ4
extends DTLZ4 implements ConstrainedProblem<DoubleSolution>¶ Problem C3-DTLZ4, defined in: Jain, H. and K. Deb. “An Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach, Part II: Handling Constraints and Extending to an Adaptive Approach.” EEE Transactions on Evolutionary Computation, 18(4):602-622, 2014.
Author: Antonio J. Nebro
Fields¶
numberOfViolatedConstraints¶
-
public NumberOfViolatedConstraints<DoubleSolution>
numberOfViolatedConstraints
¶
overallConstraintViolationDegree¶
-
public OverallConstraintViolation<DoubleSolution>
overallConstraintViolationDegree
¶
Constructors¶
Methods¶
evaluateConstraints¶
-
public void
evaluateConstraints
(DoubleSolution solution)¶
ConvexC2_DTLZ2¶
-
public class
ConvexC2_DTLZ2
extends DTLZ2 implements ConstrainedProblem<DoubleSolution>¶ Problem ConvexC2-DTLZ2, defined in: Jain, H. and K. Deb. “An Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach, Part II: Handling Constraints and Extending to an Adaptive Approach.” EEE Transactions on Evolutionary Computation, 18(4):602-622, 2014.
Author: Antonio J. Nebro
Fields¶
numberOfViolatedConstraints¶
-
public NumberOfViolatedConstraints<DoubleSolution>
numberOfViolatedConstraints
¶
overallConstraintViolationDegree¶
-
public OverallConstraintViolation<DoubleSolution>
overallConstraintViolationDegree
¶
Constructors¶
Methods¶
evaluateConstraints¶
-
public void
evaluateConstraints
(DoubleSolution solution)¶
org.uma.jmetal.problem.multiobjective.cec2015OptBigDataCompetition¶
BigOpt2015¶
-
public class
BigOpt2015
extends AbstractDoubleProblem¶ Created by ajnebro on 14/1/15.
Fields¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
multiplyWithOutAMP¶
org.uma.jmetal.problem.multiobjective.dtlz¶
DTLZ1¶
-
public class
DTLZ1
extends AbstractDoubleProblem¶ Class representing problem DTLZ1
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
DTLZ2¶
-
public class
DTLZ2
extends AbstractDoubleProblem¶ Class representing problem DTLZ1
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
DTLZ3¶
-
public class
DTLZ3
extends AbstractDoubleProblem¶ Class representing problem DTLZ3
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
DTLZ4¶
-
public class
DTLZ4
extends AbstractDoubleProblem¶ Class representing problem DTLZ4
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
DTLZ5¶
-
public class
DTLZ5
extends AbstractDoubleProblem¶ Class representing problem DTLZ5
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
DTLZ6¶
-
public class
DTLZ6
extends AbstractDoubleProblem¶ Class representing problem DTLZ6
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
DTLZ7¶
-
public class
DTLZ7
extends AbstractDoubleProblem¶ Class representing problem DTLZ7
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
org.uma.jmetal.problem.multiobjective.ebes¶
Ebes¶
-
public class
Ebes
extends AbstractDoubleProblem implements ConstrainedProblem<DoubleSolution>¶ Class representing problem Ebes Spatial Bars Structure (Estructuras de Barras Espaciales)
Fields¶
AxialForcei_¶
-
protected double[]
AxialForcei_
¶ Stores the Axial force in node i
AxialForcej_¶
-
protected double[]
AxialForcej_
¶ Stores the Axial force in node j
DisplacementNodes_¶
-
protected double[][]
DisplacementNodes_
¶ Stores the k displacement
MatrixStiffness_¶
-
protected double[]
MatrixStiffness_
¶ Stores the k
NodeRestrict¶
-
protected double[][]
NodeRestrict_
¶ Stores the NodeRestrict
OldStrainMax¶
-
protected double[][]
OldStrainMax_
¶ Stores the max Strain for elements
OldStrainMin¶
-
protected double[][]
OldStrainMin_
¶
OverloadInElement¶
-
protected double[][]
OverloadInElement_
¶ Stores the OverLoad on Elements
StrainCutMax¶
-
protected double[][]
StrainCutMax_
¶ Stores the max Strain for elements
StrainMxyMax¶
-
protected double[][]
StrainMxyMax_
¶ Stores the max Mxz Strain for groups
StrainMxyMin¶
-
protected double[][]
StrainMxyMin_
¶ Stores the max Mxz Strain for groups
StrainMxzMax¶
-
protected double[][]
StrainMxzMax_
¶ Stores the max Mxz Strain for groups
StrainMxzMin¶
-
protected double[][]
StrainMxzMin_
¶ Stores the max Mxz Strain for groups
StrainNxxMax¶
-
protected double[][]
StrainNxxMax_
¶ Stores the max Nxx Strain for groups
StrainNxxMin¶
-
protected double[][]
StrainNxxMin_
¶
StrainResidualCut¶
-
protected double[]
StrainResidualCut_
¶ Stores the Cut Strain Residual for elements
StrainResidualMax¶
-
protected double[]
StrainResidualMax_
¶ Stores the max Strain for elements
StrainResidualMin¶
-
protected double[]
StrainResidualMin_
¶ Stores the min Strain for elements
TypeMaterial¶
-
int
TypeMaterial_
¶
WeightElement¶
-
protected double[][]
WeightElement_
¶ Stores the Load on Elements Itself
WeightNode¶
-
protected double[][]
WeightNode_
¶ Stores the Load on Nodes
elementsBetweenDiffGreat¶
-
protected int
elementsBetweenDiffGreat_
¶ Stores the Elements Between Difference Greatest
geometryCheck_¶
-
protected int[][]
geometryCheck_
¶
matrixWidthBand¶
-
protected int
matrixWidthBand_
¶ Stores the number a wide the diagonal matrix
nodeCheck_¶
-
protected double[][]
nodeCheck_
¶ Stores the number of Nodes of the problem
numberOfConstraintsGeometric¶
-
public int
numberOfConstraintsGeometric_
¶
numberOfConstraintsNodes¶
-
protected int
numberOfConstraintsNodes_
¶
numberOfElements¶
-
protected int
numberOfElements_
¶ Stores the number of Bar of the problem
numberOfEval¶
-
protected int
numberOfEval_
¶ Stores the number of Bar Groups
numberOfGroupElements¶
-
protected int
numberOfGroupElements_
¶ Stores the number of Bar Groups
numberOfGroupsToCheckGeometry¶
-
protected int
numberOfGroupsToCheckGeometry_
¶
numberOfLibertyDegree¶
-
protected int
numberOfLibertyDegree_
¶ Stores the number of Nodes of the problem
numberOfNodesRestricts_¶
-
protected int
numberOfNodesRestricts_
¶
numberOfWeigthHypothesis¶
-
protected int
numberOfWeigthHypothesis_
¶
numberOfWeigthsElements¶
-
protected int
numberOfWeigthsElements_
¶ Stores the number of Load in ElementsNodes of the problem
numberOfWeigthsNodes¶
-
protected int
numberOfWeigthsNodes_
¶ Stores the number of Load in Nodes of the problem
overallConstraintViolationDegree¶
-
public OverallConstraintViolation<DoubleSolution>
overallConstraintViolationDegree
¶
strainAdmissibleCut¶
-
protected int
strainAdmissibleCut_
¶
Constructors¶
Methods¶
AxialForcei_¶
-
public double
AxialForcei_
(int element)¶
AxialForcej_¶
-
public double
AxialForcej_
(int element)¶
EBEsElementsTopology¶
-
public void
EBEsElementsTopology
(DoubleSolution solution)¶
EBEsTransversalSectionHoleCircular¶
-
public void
EBEsTransversalSectionHoleCircular
(int gr, double D, double e)¶
EBEsTransversalSectionHoleRectangle¶
-
public void
EBEsTransversalSectionHoleRectangle
(int gr, double y, double z, double ey, double ez)¶
EBEsTransversalSectionRectangle¶
-
public void
EBEsTransversalSectionRectangle
(int gr, double y, double z)¶
EBEsTransversalSection_H_Double¶
-
public void
EBEsTransversalSection_H_Double
(int gr, double y, double z, double ey, double ez)¶
EBEsTransversalSection_H_Single¶
-
public void
EBEsTransversalSection_H_Single
(int gr, double y, double z, double ey, double ez)¶
EBEsTransversalSection_I_Double¶
-
public void
EBEsTransversalSection_I_Double
(int gr, double y, double z, double ey, double ez)¶
EBEsTransversalSection_I_Single¶
-
public void
EBEsTransversalSection_I_Single
(int gr, double y, double z, double ey, double ez)¶
EBEsTransversalSection_L_Double¶
-
public void
EBEsTransversalSection_L_Double
(int gr, double y, double z, double ey, double ez)¶
EBEsTransversalSection_L_Single¶
-
public void
EBEsTransversalSection_L_Single
(int gr, double y, double z, double ey, double ez)¶
EBEsTransversalSection_T_Double¶
-
public void
EBEsTransversalSection_T_Double
(int ba, double y, double z, double ey, double ez)¶
EBEsTransversalSection_T_Single¶
-
public void
EBEsTransversalSection_T_Single
(int ba, double y, double z, double ey, double ez)¶
EBEsWeightDistributedUniformly¶
-
public void
EBEsWeightDistributedUniformly
(int el, double[] LoadInElement_)¶
FunctionsMahalanobis_Distance_With_Variance¶
-
public double
FunctionsMahalanobis_Distance_With_Variance
(int hi)¶
Interpolation_I_Single_Y_func_Area¶
-
public double
Interpolation_I_Single_Y_func_Area_
(double A)¶
Interpolation_I_Single_Y_func_Wxy¶
-
public double
Interpolation_I_Single_Y_func_Wxy_
(double Wxy)¶
Interpolation_I_Single_Y_func_Wxz¶
-
public double
Interpolation_I_Single_Y_func_Wxz_
(double Wxz)¶
Interpolation_I_Single_Z_func_Y¶
-
public double
Interpolation_I_Single_Z_func_Y_
(double Y)¶
Interpolation_I_Single_ey_func_Y¶
-
public double
Interpolation_I_Single_ey_func_Y_
(double Y)¶
Interpolation_I_Single_ez_func_Y¶
-
public double
Interpolation_I_Single_ez_func_Y_
(double Y)¶
createSolution¶
-
public DoubleSolution
createSolution
()¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to evaluate
evaluateConstraints¶
-
public void
evaluateConstraints
(DoubleSolution solution)¶ Evaluates the constraint overhead of a solution
Parameters: - solution – The solution
Throws:
org.uma.jmetal.problem.multiobjective.glt¶
GLT1¶
-
public class
GLT1
extends AbstractDoubleProblem¶ Problem GLT1. Defined in F. Gu, H.-L. Liu, and K. C. Tan, “A multiobjective evolutionary algorithm using dynamic weight design method,” International Journal of Innovative Computing, Information and Control, vol. 8, no. 5B, pp. 3677–3688, 2012.
Author: Antonio J. Nebro
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶
GLT2¶
-
public class
GLT2
extends AbstractDoubleProblem¶ Problem GLT2. Defined in F. Gu, H.-L. Liu, and K. C. Tan, “A multiobjective evolutionary algorithm using dynamic weight design method,” International Journal of Innovative Computing, Information and Control, vol. 8, no. 5B, pp. 3677–3688, 2012.
Author: Antonio J. Nebro
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶
GLT3¶
-
public class
GLT3
extends AbstractDoubleProblem¶ Problem GLT3. Defined in F. Gu, H.-L. Liu, and K. C. Tan, “A multiobjective evolutionary algorithm using dynamic weight design method,” International Journal of Innovative Computing, Information and Control, vol. 8, no. 5B, pp. 3677–3688, 2012.
Author: Antonio J. Nebro
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶
GLT4¶
-
public class
GLT4
extends AbstractDoubleProblem¶ Problem GLT4. Defined in F. Gu, H.-L. Liu, and K. C. Tan, “A multiobjective evolutionary algorithm using dynamic weight design method,” International Journal of Innovative Computing, Information and Control, vol. 8, no. 5B, pp. 3677–3688, 2012.
Author: Antonio J. Nebro
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶
GLT5¶
-
public class
GLT5
extends AbstractDoubleProblem¶ Problem GLT5. Defined in F. Gu, H.-L. Liu, and K. C. Tan, “A multiobjective evolutionary algorithm using dynamic weight design method,” International Journal of Innovative Computing, Information and Control, vol. 8, no. 5B, pp. 3677–3688, 2012.
Author: Antonio J. Nebro
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶
GLT6¶
-
public class
GLT6
extends AbstractDoubleProblem¶ Problem GLT6. Defined in F. Gu, H.-L. Liu, and K. C. Tan, “A multiobjective evolutionary algorithm using dynamic weight design method,” International Journal of Innovative Computing, Information and Control, vol. 8, no. 5B, pp. 3677–3688, 2012.
Author: Antonio J. Nebro
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶
org.uma.jmetal.problem.multiobjective.lz09¶
LZ09¶
-
public class
LZ09
¶ Base class to implement the problem of the lz09 benchmark, which is defined in: H. Li and Q. Zhang. Multiobjective optimization problem with complicated pareto sets, MOEA/D and NSGA-II. IEEE Transactions on Evolutionary Computation, 12(2):284-302, April 2009.
Methods¶
LZ09F1¶
-
public class
LZ09F1
extends AbstractDoubleProblem¶ Class representing problem LZ09F1
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
LZ09F2¶
-
public class
LZ09F2
extends AbstractDoubleProblem¶ Class representing problem LZ09F2
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
LZ09F3¶
-
public class
LZ09F3
extends AbstractDoubleProblem¶ Class representing problem LZ09F3
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
LZ09F4¶
-
public class
LZ09F4
extends AbstractDoubleProblem¶ Class representing problem LZ09F4
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
LZ09F5¶
-
public class
LZ09F5
extends AbstractDoubleProblem¶ Class representing problem LZ09F5
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
LZ09F6¶
-
public class
LZ09F6
extends AbstractDoubleProblem¶ Class representing problem LZ09F6
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
LZ09F7¶
-
public class
LZ09F7
extends AbstractDoubleProblem¶ Class representing problem LZ09F7
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
LZ09F8¶
-
public class
LZ09F8
extends AbstractDoubleProblem¶ Class representing problem LZ09F8
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
LZ09F9¶
-
public class
LZ09F9
extends AbstractDoubleProblem¶ Class representing problem LZ09F9
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
org.uma.jmetal.problem.multiobjective.maf¶
MaF01¶
-
public class
MaF01
extends AbstractDoubleProblem¶ Class representing problem MaF01
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to evaluate
MaF02¶
-
public class
MaF02
extends AbstractDoubleProblem¶ Class representing problem MaF02, DTLZ2BZ
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to evaluate
MaF03¶
-
public class
MaF03
extends AbstractDoubleProblem¶ Class representing problem MaF03, convex DTLZ3
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to evaluate
MaF04¶
-
public class
MaF04
extends AbstractDoubleProblem¶ Class representing problem MaF04
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to evaluate
MaF05¶
-
public class
MaF05
extends AbstractDoubleProblem¶ Class representing problem MaF05
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to evaluate
MaF06¶
-
public class
MaF06
extends AbstractDoubleProblem¶ Class representing problem MaF06
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to evaluate
MaF07¶
-
public class
MaF07
extends AbstractDoubleProblem¶ Class representing problem MaF07
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to evaluate
MaF08¶
-
public class
MaF08
extends AbstractDoubleProblem¶ Class representing problem MaF08
Constructors¶
MaF09¶
-
public class
MaF09
extends AbstractDoubleProblem¶ Class representing problem MaF05
Fields¶
Constructors¶
Methods¶
checkWithJdkGeneralPath¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to evaluate
MaF10¶
-
public class
MaF10
extends AbstractDoubleProblem¶ Class representing problem MaF10
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to evaluate
MaF11¶
-
public class
MaF11
extends AbstractDoubleProblem¶ Class representing problem MaF11
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to evaluate
MaF12¶
-
public class
MaF12
extends AbstractDoubleProblem¶ Class representing problem MaF12
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to evaluate
MaF13¶
-
public class
MaF13
extends AbstractDoubleProblem¶ Class representing problem MaF13
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to evaluate
MaF14¶
-
public class
MaF14
extends AbstractDoubleProblem¶ Class representing problem MaF14
Constructors¶
MaF15¶
-
public class
MaF15
extends AbstractDoubleProblem¶ Class representing problem MaF15
Constructors¶
org.uma.jmetal.problem.multiobjective.mop¶
MOP1¶
-
public class
MOP1
extends AbstractDoubleProblem¶ Problem MOP1. Defined in H. L. Liu, F. Gu and Q. Zhang, “Decomposition of a Multiobjective Optimization Problem Into a Number of Simple Multiobjective Subproblems,” in IEEE Transactions on Evolutionary Computation, vol. 18, no. 3, pp. 450-455, June 2014.
Author: Mastermay
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
MOP2¶
-
public class
MOP2
extends AbstractDoubleProblem¶ Problem MOP2. Defined in H. L. Liu, F. Gu and Q. Zhang, “Decomposition of a Multiobjective Optimization Problem Into a Number of Simple Multiobjective Subproblems,” in IEEE Transactions on Evolutionary Computation, vol. 18, no. 3, pp. 450-455, June 2014.
Author: Mastermay
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
MOP3¶
-
public class
MOP3
extends AbstractDoubleProblem¶ Problem MOP3. Defined in H. L. Liu, F. Gu and Q. Zhang, “Decomposition of a Multiobjective Optimization Problem Into a Number of Simple Multiobjective Subproblems,” in IEEE Transactions on Evolutionary Computation, vol. 18, no. 3, pp. 450-455, June 2014.
Author: Mastermay
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
MOP4¶
-
public class
MOP4
extends AbstractDoubleProblem¶ Problem MOP4. Defined in H. L. Liu, F. Gu and Q. Zhang, “Decomposition of a Multiobjective Optimization Problem Into a Number of Simple Multiobjective Subproblems,” in IEEE Transactions on Evolutionary Computation, vol. 18, no. 3, pp. 450-455, June 2014.
Author: Mastermay
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
MOP5¶
-
public class
MOP5
extends AbstractDoubleProblem¶ Problem MOP5. Defined in H. L. Liu, F. Gu and Q. Zhang, “Decomposition of a Multiobjective Optimization Problem Into a Number of Simple Multiobjective Subproblems,” in IEEE Transactions on Evolutionary Computation, vol. 18, no. 3, pp. 450-455, June 2014.
Author: Mastermay
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
MOP6¶
-
public class
MOP6
extends AbstractDoubleProblem¶ Problem MOP6. Defined in H. L. Liu, F. Gu and Q. Zhang, “Decomposition of a Multiobjective Optimization Problem Into a Number of Simple Multiobjective Subproblems,” in IEEE Transactions on Evolutionary Computation, vol. 18, no. 3, pp. 450-455, June 2014.
Author: Mastermay
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
MOP7¶
-
public class
MOP7
extends AbstractDoubleProblem¶ Problem MOP7. Defined in H. L. Liu, F. Gu and Q. Zhang, “Decomposition of a Multiobjective Optimization Problem Into a Number of Simple Multiobjective Subproblems,” in IEEE Transactions on Evolutionary Computation, vol. 18, no. 3, pp. 450-455, June 2014.
Author: Mastermay
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
org.uma.jmetal.problem.multiobjective.wfg¶
Shapes¶
-
public class
Shapes
¶ Class implementing shape functions for wfg benchmark Reference: Simon Huband, Luigi Barone, Lyndon While, Phil Hingston A Scalable Multi-objective Test Problem Toolkit. Evolutionary Multi-Criterion Optimization: Third International Conference, EMO 2005. Proceedings, volume 3410 of Lecture Notes in Computer Science
Methods¶
Transformations¶
-
public class
Transformations
¶ Class implementing the basics transformations for wfg
WFG¶
-
public abstract class
WFG
extends AbstractDoubleProblem¶ Implements a reference abstract class for all wfg org.uma.test problem Reference: Simon Huband, Luigi Barone, Lyndon While, Phil Hingston A Scalable Multi-objective Test Problem Toolkit. Evolutionary Multi-Criterion Optimization: Third International Conference, EMO 2005. Proceedings, volume 3410 of Lecture Notes in Computer Science
Fields¶
Constructors¶
Methods¶
createSolution¶
-
public DoubleSolution
createSolution
()¶
evaluate¶
-
public abstract float[]
evaluate
(float[] variables)¶ Evaluates a solution
Parameters: - variables – The solution to evaluate
Returns: a double [] with the evaluation results
WFG1¶
-
public class
WFG1
extends WFG¶ This class implements the WFG1 problem Reference: Simon Huband, Luigi Barone, Lyndon While, Phil Hingston A Scalable Multi-objective Test Problem Toolkit. Evolutionary Multi-Criterion Optimization: Third International Conference, EMO 2005. Proceedings, volume 3410 of Lecture Notes in Computer Science
Constructors¶
WFG2¶
-
public class
WFG2
extends WFG¶ This class implements the WFG2 problem Reference: Simon Huband, Luigi Barone, Lyndon While, Phil Hingston A Scalable Multi-objective Test Problem Toolkit. Evolutionary Multi-Criterion Optimization: Third International Conference, EMO 2005. Proceedings, volume 3410 of Lecture Notes in Computer Science
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to runAlgorithm
WFG3¶
-
public class
WFG3
extends WFG¶ This class implements the WFG3 problem Reference: Simon Huband, Luigi Barone, Lyndon While, Phil Hingston A Scalable Multi-objective Test Problem Toolkit. Evolutionary Multi-Criterion Optimization: Third International Conference, EMO 2005. Proceedings, volume 3410 of Lecture Notes in Computer Science
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to runAlgorithm
Throws:
WFG4¶
-
public class
WFG4
extends WFG¶ This class implements the WFG4 problem Reference: Simon Huband, Luigi Barone, Lyndon While, Phil Hingston A Scalable Multi-objective Test Problem Toolkit. Evolutionary Multi-Criterion Optimization: Third International Conference, EMO 2005. Proceedings, volume 3410 of Lecture Notes in Computer Science
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to runAlgorithm
Throws:
WFG5¶
-
public class
WFG5
extends WFG¶ This class implements the WFG5 problem Reference: Simon Huband, Luigi Barone, Lyndon While, Phil Hingston A Scalable Multi-objective Test Problem Toolkit. Evolutionary Multi-Criterion Optimization: Third International Conference, EMO 2005. Proceedings, volume 3410 of Lecture Notes in Computer Science
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to runAlgorithm
Throws:
WFG6¶
-
public class
WFG6
extends WFG¶ This class implements the WFG6 problem Reference: Simon Huband, Luigi Barone, Lyndon While, Phil Hingston A Scalable Multi-objective Test Problem Toolkit. Evolutionary Multi-Criterion Optimization: Third International Conference, EMO 2005. Proceedings, volume 3410 of Lecture Notes in Computer Science
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to runAlgorithm
Throws:
WFG7¶
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
WFG8¶
-
public class
WFG8
extends WFG¶ Creates a default WFG8 problem with 2 position-related parameters, 4 distance-related parameters, and 2 objectives
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to runAlgorithm
Throws:
WFG9¶
-
public class
WFG9
extends WFG¶ Creates a default WFG9 problem with 2 position-related parameters, 4 distance-related parameters, and 2 objectives
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluates a solution
Parameters: - solution – The solution to runAlgorithm
Throws:
org.uma.jmetal.problem.multiobjective.zdt¶
ZDT1¶
-
public class
ZDT1
extends AbstractDoubleProblem¶ Class representing problem ZDT1
Constructors¶
ZDT2¶
-
public class
ZDT2
extends AbstractDoubleProblem¶ Class representing problem ZDT2
Constructors¶
ZDT3¶
-
public class
ZDT3
extends AbstractDoubleProblem¶ Class representing problem ZDT3
Constructors¶
ZDT4¶
-
public class
ZDT4
extends AbstractDoubleProblem¶ Class representing problem ZDT4
Constructors¶
Methods¶
evalG¶
-
public double
evalG
(DoubleSolution solution)¶ Returns the value of the ZDT4 function G.
Parameters: - solution – Solution
evalH¶
-
public double
evalH
(double f, double g)¶ Returns the value of the ZDT4 function H.
Parameters: - f – First argument of the function H.
- g – Second argument of the function H.
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
ZDT5¶
-
public class
ZDT5
extends AbstractBinaryProblem¶ Class representing problem ZDT5
Constructors¶
Methods¶
evalG¶
-
public double
evalG
(BinarySolution solution)¶ Returns the value of the ZDT5 function G.
Parameters: - solution – The solution.
evalH¶
-
public double
evalH
(double f, double g)¶ Returns the value of the ZDT5 function H.
Parameters: - f – First argument of the function H.
- g – Second argument of the function H.
evalV¶
-
public double
evalV
(double value)¶ Returns the value of the ZDT5 function V.
Parameters: - value – The parameter of V function.
evaluate¶
-
public void
evaluate
(BinarySolution solution)¶ Evaluate() method
ZDT6¶
-
public class
ZDT6
extends AbstractDoubleProblem¶ Class representing problem ZDT6
Constructors¶
Methods¶
evalG¶
-
public double
evalG
(DoubleSolution solution)¶ Returns the value of the ZDT6 function G.
Parameters: - solution – Solution
evalH¶
-
public double
evalH
(double f, double g)¶ Returns the value of the ZDT6 function H.
Parameters: - f – First argument of the function H.
- g – Second argument of the function H.
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
org.uma.jmetal.problem.singleobjective¶
CEC2005Problem¶
-
public class
CEC2005Problem
extends AbstractDoubleProblem¶ Class representing for solving the CEC2005 competition problems.
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
Griewank¶
-
public class
Griewank
extends AbstractDoubleProblem¶ Class representing problem Griewank
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
NIntegerMin¶
-
public class
NIntegerMin
extends AbstractIntegerProblem¶ Created by Antonio J. Nebro on 03/07/14. Single objective problem for testing integer encoding. Objective: minimizing the distance to value N
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(IntegerSolution solution)¶ Evaluate() method
OneMax¶
-
public class
OneMax
extends AbstractBinaryProblem¶ Class representing problem OneMax. The problem consist of maximizing the number of ‘1’s in a binary string.
Constructors¶
Methods¶
createSolution¶
-
public BinarySolution
createSolution
()¶
evaluate¶
-
public void
evaluate
(BinarySolution solution)¶ Evaluate() method
Rastrigin¶
-
public class
Rastrigin
extends AbstractDoubleProblem¶
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
Rosenbrock¶
-
public class
Rosenbrock
extends AbstractDoubleProblem¶
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
Sphere¶
-
public class
Sphere
extends AbstractDoubleProblem¶ Class representing a Sphere problem.
Constructors¶
Methods¶
evaluate¶
-
public void
evaluate
(DoubleSolution solution)¶ Evaluate() method
TSP¶
-
public class
TSP
extends AbstractIntegerPermutationProblem¶ Class representing a single-objective TSP (Traveling Salesman Problem) problem. It accepts data files from TSPLIB: http://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/tsp/
org.uma.jmetal.problem.singleobjective.cec2005competitioncode¶
Benchmark¶
-
public class
Benchmark
¶
Fields¶
loader¶
-
public static final ClassLoader
loader
¶
numberFormatter¶
-
public static final DecimalFormat
numberFormatter
¶
percentageFormatter¶
-
public static final DecimalFormat
percentageFormatter
¶
scientificFormatter¶
-
public static final DecimalFormat
scientificFormatter
¶
Methods¶
loadColumnVector¶
-
public static void
loadColumnVector
(BufferedReader brSrc, int rows, double[] column)¶
loadColumnVectorFromFile¶
loadMatrix¶
-
public static void
loadMatrix
(BufferedReader brSrc, int rows, int columns, double[][] matrix)¶
loadMatrixFromFile¶
loadNMatrixFromFile¶
loadRowVector¶
-
public static void
loadRowVector
(BufferedReader brSrc, int columns, double[] row)¶
loadRowVectorFromFile¶
loadTestDataFromFile¶
F03ShiftedRotatedHighCondElliptic¶
Fields¶
F08ShiftedRotatedAckleyGlobalOptBound¶
Fields¶
F13ShiftedExpandedGriewankRosenbrock¶
Fields¶
F14ShiftedRotatedExpandedScaffer¶
Fields¶
F17RotatedHybridComposition1Noise¶
Fields¶
F19RotatedHybridComposition2NarrowBasinGlobalOpt¶
Fields¶
F20RotatedHybridComposition2GlobalOptBound¶
Fields¶
F22RotatedHybridComposition3HighCondNumMatrix¶
Fields¶
F23NoncontinuousRotatedHybridComposition3¶
Fields¶
F25RotatedHybridComposition4Bound¶
Fields¶
org.uma.jmetal.qualityIndicator¶
CommandLineIndicatorRunner¶
-
public class
CommandLineIndicatorRunner
¶ Class for executing quality indicators from the command line. An optional argument allows to indicate whether the fronts are to be normalized by the quality indicators. Invoking command: mvn -pl jmetal-exec exec:java -Dexec.mainClass=”org.uma.jmetal.qualityIndicator.CommandLineIndicatorRunner” -Dexec.args=”indicator referenceFront front normalize”
Author: Antonio J. Nebro
org.uma.jmetal.qualityindicator¶
QualityIndicator¶
-
public interface
QualityIndicator
<Evaluate, Result> extends DescribedEntity, Serializable¶ Author: Antonio J. Nebro
Parameters: - <Evaluate> – Entity to runAlgorithm
- <Result> – Result of the evaluation
org.uma.jmetal.qualityindicator.impl¶
Epsilon¶
-
public class
Epsilon
<S extends Solution<?>> extends GenericIndicator<S>¶ This class implements the unary epsilon additive indicator as proposed in E. Zitzler, E. Thiele, L. Laummanns, M., Fonseca, C., and Grunert da Fonseca. V (2003): Performance Assessment of Multiobjective Optimizers: An Analysis and Review. The code is the a Java version of the original metric implementation by Eckart Zitzler. It can be used also as a command line program just by typing $java org.uma.jmetal.qualityindicator.impl.Epsilon
Author: Antonio J. Nebro , Juan J. Durillo
EpsilonTest¶
-
public class
EpsilonTest
¶ Author: Antonio J. Nebro
Methods¶
shouldExecuteRaiseAnExceptionIfTheFrontApproximationIsNull¶
-
public void
shouldExecuteRaiseAnExceptionIfTheFrontApproximationIsNull
()¶
shouldExecuteRaiseAnExceptionIfTheFrontApproximationListIsNull¶
-
public void
shouldExecuteRaiseAnExceptionIfTheFrontApproximationListIsNull
()¶
shouldExecuteReturnTheCorrectValueCaseA¶
-
public void
shouldExecuteReturnTheCorrectValueCaseA
()¶ Given a front with points [1.5,4.0], [2.0,3.0],[3.0,2.0] and a Pareto front with points [1.0,3.0], [1.5,2.0], [2.0, 1.5], the value of the epsilon indicator is 1
shouldExecuteReturnTheCorrectValueCaseB¶
-
public void
shouldExecuteReturnTheCorrectValueCaseB
()¶ Given a front with points [1.5,4.0], [1.5,2.0],[2.0,1.5] and a Pareto front with points [1.0,3.0], [1.5,2.0], [2.0, 1.5], the value of the epsilon indicator is 0.5
shouldExecuteReturnTheRightValueIfTheFrontsContainOnePointWhichIsNotTheSame¶
-
public void
shouldExecuteReturnTheRightValueIfTheFrontsContainOnePointWhichIsNotTheSame
()¶ Given a front with point [2,3] and a Pareto front with point [1,2], the value of the epsilon indicator is 1
ErrorRatio¶
-
public class
ErrorRatio
<Evaluate extends List<? extends Solution<?>>> extends SimpleDescribedEntity implements QualityIndicator<Evaluate, Double>¶ The Error Ratio (ER) quality indicator reports the ratio of solutions in a front of points that are not members of the true Pareto front. NOTE: the indicator merely checks if the solutions in the front are not members of the second front. No assumption is made about the second front is a true Pareto front, i.e, the front could contain solutions that dominate some of those of the supposed Pareto front. It is a responsibility of the caller to ensure that this does not happen.
Author: Antonio J. Nebro TODO: using an epsilon value
ErrorRatioTest¶
-
public class
ErrorRatioTest
¶ Author: Antonio J. Nebro
Methods¶
shouldExecuteRaiseAnExceptionIfTheFrontApproximationIsNull¶
-
public void
shouldExecuteRaiseAnExceptionIfTheFrontApproximationIsNull
()¶
shouldExecuteRaiseAnExceptionIfTheParetoFrontApproximationListIsNull¶
-
public void
shouldExecuteRaiseAnExceptionIfTheParetoFrontApproximationListIsNull
()¶
shouldExecuteReturnOneIfTheFrontsContainADifferentPoint¶
-
public void
shouldExecuteReturnOneIfTheFrontsContainADifferentPoint
()¶
shouldExecuteReturnTheCorrectValueCaseA¶
-
public void
shouldExecuteReturnTheCorrectValueCaseA
()¶ Given a front with points [1.5,4.0], [1.5,2.0],[2.0,1.5] and a Pareto front with points [1.0,3.0], [1.5,2.0], [2.0, 1.5], the value of the epsilon indicator is 2/3
shouldExecuteReturnTheCorrectValueCaseB¶
-
public void
shouldExecuteReturnTheCorrectValueCaseB
()¶ Given a list with solutions [1.5,3.0], [4.0,2.0] and another lists with solutions [-1.0,-1.0], [0.0,0.0], the value of the epsilon indicator is 1
GeneralizedSpread¶
-
public class
GeneralizedSpread
<S extends Solution<?>> extends GenericIndicator<S>¶ This class implements the generalized spread metric for two or more dimensions. Reference: A. Zhou, Y. Jin, Q. Zhang, B. Sendhoff, and E. Tsang Combining model-based and genetics-based offspring generation for multi-objective optimization using a convergence criterion, 2006 IEEE Congress on Evolutionary Computation, 2006, pp. 3234-3241.
Author: Antonio J. Nebro , Juan J. Durillo
Methods¶
evaluate¶
generalizedSpread¶
-
public double
generalizedSpread
(Front front, Front referenceFront)¶ Calculates the generalized spread metric. Given the pareto front, the true pareto front as
double []
and the number of objectives, the method return the value for the metric.Parameters: - front – The front.
- referenceFront – The reference pareto front.
Returns: the value of the generalized spread metric
GenerationalDistance¶
-
public class
GenerationalDistance
<S extends Solution<?>> extends GenericIndicator<S>¶ This class implements the generational distance indicator. Reference: Van Veldhuizen, D.A., Lamont, G.B.: Multiobjective Evolutionary Algorithm Research: A History and Analysis. Technical Report TR-98-03, Dept. Elec. Comput. Eng., Air Force Inst. Technol. (1998)
Author: Antonio J. Nebro , Juan J. Durillo
GenerationalDistanceTest¶
-
public class
GenerationalDistanceTest
¶ Author: Antonio J. Nebro
GenericIndicator¶
-
public abstract class
GenericIndicator
<S> extends SimpleDescribedEntity implements QualityIndicator<List<S>, Double>¶ Abstract class representing quality indicators that need a reference front to be computed
Author: Antonio J. Nebro
Constructors¶
Hypervolume¶
-
public abstract class
Hypervolume
<S> extends GenericIndicator<S>¶ This interface represents implementations of the Hypervolume quality indicator
Author: Antonio J. Nebro , Juan J. Durillo
Constructors¶
InvertedGenerationalDistance¶
-
public class
InvertedGenerationalDistance
<S extends Solution<?>> extends GenericIndicator<S>¶ This class implements the inverted generational distance metric. Reference: Van Veldhuizen, D.A., Lamont, G.B.: Multiobjective Evolutionary Algorithm Research: A History and Analysis. Technical Report TR-98-03, Dept. Elec. Comput. Eng., Air Force Inst. Technol. (1998)
Author: Antonio J. Nebro , Juan J. Durillo
InvertedGenerationalDistancePlus¶
-
public class
InvertedGenerationalDistancePlus
<S extends Solution<?>> extends GenericIndicator<S>¶ This class implements the inverted generational distance metric plust (IGD+) Reference: Ishibuchi et al 2015, “A Study on Performance Evaluation Ability of a Modified Inverted Generational Distance Indicator”, GECCO 2015
Author: Antonio J. Nebro
InvertedGenerationalDistancePlusTest¶
-
public class
InvertedGenerationalDistancePlusTest
¶ Author: Antonio J. Nebro
Methods¶
shouldConstructorRaiseAnExceptionIfFileNameIsNull¶
-
public void
shouldConstructorRaiseAnExceptionIfFileNameIsNull
()¶
shouldConstructorRaiseAnExceptionIfTheParetoFrontIsNull¶
-
public void
shouldConstructorRaiseAnExceptionIfTheParetoFrontIsNull
()¶
R2¶
-
public class
R2
<Evaluate extends List<? extends Solution<?>>> extends SimpleDescribedEntity implements QualityIndicator<Evaluate, Double>¶ TODO: Add comments here
R2Test¶
-
public class
R2Test
¶
Methods¶
testR2HasProperNameAndDescriptionWithEmptyConstructor¶
-
public void
testR2HasProperNameAndDescriptionWithEmptyConstructor
()¶
testR2HasProperNameAndDescriptionWithFileConstructor¶
-
public void
testR2HasProperNameAndDescriptionWithFileConstructor
()¶
testR2HasProperNameAndDescriptionWithFileFrontConstructor¶
-
public void
testR2HasProperNameAndDescriptionWithFileFrontConstructor
()¶
testR2HasProperNameAndDescriptionWithFrontConstructor¶
-
public void
testR2HasProperNameAndDescriptionWithFrontConstructor
()¶
SetCoverage¶
-
public class
SetCoverage
extends SimpleDescribedEntity implements QualityIndicator<Pair<List<? extends Solution<?>>, List<? extends Solution<?>>>, Pair<Double, Double>>¶ Set coverage metric
Author: Antonio J. Nebro
SetCoverageTest¶
-
public class
SetCoverageTest
¶ Author: Antonio J. Nebro
Methods¶
shouldExecuteRaiseAnExceptionIfTheFirstFrontIsNull¶
-
public void
shouldExecuteRaiseAnExceptionIfTheFirstFrontIsNull
()¶
shouldExecuteRaiseAnExceptionIfTheParetoFrontIsNull¶
-
public void
shouldExecuteRaiseAnExceptionIfTheParetoFrontIsNull
()¶
shouldExecuteReturnOneIfTheSecondFrontIsEmpty¶
-
public void
shouldExecuteReturnOneIfTheSecondFrontIsEmpty
()¶
shouldExecuteReturnTheCorrectValueCaseA¶
-
public void
shouldExecuteReturnTheCorrectValueCaseA
()¶ Given a frontA with points [0.0,6.0], [2.0,3.0],[4.0,2.0] and a frontB with points [1.0,7.0], [2.0,3.0], [3.5, 1.0], the value of setCoverage(frontA, frontB) == 1/3 and setCoverage(frontB, frontA) == 1/3
shouldExecuteReturnTheCorrectValueCaseB¶
-
public void
shouldExecuteReturnTheCorrectValueCaseB
()¶ Given a frontA with points [0.0,6.0], [2.0,3.0],[4.0,2.0] and a frontB with points [1.0,7.0], [2.5,3.0], [5.0, 2.5], the value of setCoverage(frontA, frontB) == 1 and setCoverage(frontB, frontA) == 0
shouldExecuteReturnTheRightValueIfTheFrontsContainOnePointWhichIsNotTheSame¶
-
public void
shouldExecuteReturnTheRightValueIfTheFrontsContainOnePointWhichIsNotTheSame
()¶ Given a frontA with point [2,3] and a frontB with point [1,2], the value of the setCoverage(frontA, frontB) == 0 and setCoverage(frontB, frontA) == 1
shouldExecuteReturnZeroIfBothFrontsAreEmpty¶
-
public void
shouldExecuteReturnZeroIfBothFrontsAreEmpty
()¶
Spread¶
-
public class
Spread
<S extends Solution<?>> extends GenericIndicator<S>¶ This class implements the spread quality indicator. It must be only to two bi-objective problem. Reference: Deb, K., Pratap, A., Agarwal, S., Meyarivan, T.: A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE Trans. on Evol. Computation 6 (2002) 182-197
Author: Antonio J. Nebro , Juan J. Durillo
org.uma.jmetal.qualityindicator.impl.hypervolume¶
PISAHypervolume¶
-
public class
PISAHypervolume
<S extends Solution<?>> extends Hypervolume<S>¶ This class implements the hypervolume indicator. The code is the a Java version of the original metric implementation by Eckart Zitzler. Reference: E. Zitzler and L. Thiele Multiobjective Evolutionary Algorithms: A Comparative Case Study and the Strength Pareto Approach, IEEE Transactions on Evolutionary Computation, vol. 3, no. 4, pp. 257-271, 1999.
Author: Antonio J. Nebro , Juan J. Durillo
WFGHypervolume¶
-
public class
WFGHypervolume
<S extends Solution<?>> extends Hypervolume<S>¶ Created by ajnebro on 2/2/15.
WFGHypervolumeTest¶
-
public class
WFGHypervolumeTest
¶ Created by ajnebro on 17/12/15.
Methods¶
shouldEvaluateWorkProperlyCase1¶
-
public void
shouldEvaluateWorkProperlyCase1
()¶ CASE 1: solution set -> front composed of the points [0.25, 0.75] and [0.75, 0.25]. Reference point: [1.0, 1.0]
shouldEvaluateWorkProperlyCase2¶
-
public void
shouldEvaluateWorkProperlyCase2
()¶ CASE 2: solution set -> front composed of the points [0.25, 0.75], [0.75, 0.25] and [0.5, 0.5]. Reference point: [1.0, 1.0]
shouldEvaluateWorkProperlyCase3¶
-
public void
shouldEvaluateWorkProperlyCase3
()¶ CASE 3: solution set -> front composed of the points [0.25, 0.75], [0.75, 0.25] and [0.5, 0.5]. Reference point: [1.5, 1.5]
org.uma.jmetal.qualityindicator.impl.hypervolume.util¶
WfgHypervolumeFront¶
-
public class
WfgHypervolumeFront
extends ArrayFront¶ Created by ajnebro on 3/2/15.
Constructors¶
WfgHypervolumeVersion¶
-
public class
WfgHypervolumeVersion
¶ Created by ajnebro on 2/2/15.
Constructors¶
Methods¶
get2DHV¶
-
public double
get2DHV
(WfgHypervolumeFront front)¶
getExclusiveHV¶
-
public double
getExclusiveHV
(WfgHypervolumeFront front, int point)¶
getHV¶
-
public double
getHV
(WfgHypervolumeFront front)¶
makeDominatedBit¶
-
public void
makeDominatedBit
(WfgHypervolumeFront front, int p)¶
org.uma.jmetal.runner.multiobjective¶
ABYSSRunner¶
-
public class
ABYSSRunner
extends AbstractAlgorithmRunner¶ This class is the main program used to configure and run AbYSS, a multiobjective scatter search metaheuristics, which is described in: A.J. Nebro, F. Luna, E. Alba, B. Dorronsoro, J.J. Durillo, A. Beham “AbYSS: Adapting Scatter Search to Multiobjective Optimization.” IEEE Transactions on Evolutionary Computation. Vol. 12, No. 4 (August 2008), pp. 439-457
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- FileNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.AbYSSRunner problemName [referenceFront]
CDGRunner¶
-
public class
CDGRunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the CDG algorithm The paper and Matlab code can be download at http://xinyecai.github.io/
Author: Feng Zhang
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - ClassNotFoundException –
- SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.CDGRunner problemName [referenceFront]
CellDERunner¶
-
public class
CellDERunner
extends AbstractAlgorithmRunner¶ Class to configure and run the MOCell algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- FileNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.MOCellRunner problemName [referenceFront]
DMOPSOMeasuresRunner¶
-
public class
DMOPSOMeasuresRunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the DMOPSO algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.DMOPSORunner problemName [referenceFront]
DMOPSORunner¶
-
public class
DMOPSORunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the DMOPSO algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - org.uma.jmetal.util.JMetalException –
- java.io.IOException –
- SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.DMOPSORunner problemName [referenceFront]
ESPEARunner¶
-
public class
ESPEARunner
extends AbstractAlgorithmRunner¶ Class to configure and run the ESPEA algorithm
Author: Marlon Braun
GDE3BigDataRunner¶
-
public class
GDE3BigDataRunner
¶ Class for configuring and running the GDE3 algorithm for solving a problem of the Big Optimization competition at CEC2015
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: mvn -pl jmetal-exec exec:java -Dexec.mainClass=”org.uma.jmetal.runner.multiobjective.GDE3BigDataRunner” -Dexec.args=”[problemName]”
GDE3Runner¶
-
public class
GDE3Runner
extends AbstractAlgorithmRunner¶ Class for configuring and running the GDE3 algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.GDE3Runner problemName [referenceFront]
GNSGAIIMeasuresWithChartsRunner¶
-
public class
GNSGAIIMeasuresWithChartsRunner
extends AbstractAlgorithmRunner¶ Class to configure and run the NSGA-II algorithm (variant with measures) with the G-Dominance Comparator.
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.NSGAIIMeasuresRunner problemName [referenceFront]
GWASGFARunner¶
-
public class
GWASGFARunner
extends AbstractAlgorithmRunner¶
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- FileNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.GWASGFARunner problemName [referenceFront]
IBEARunner¶
-
public class
IBEARunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the IBEA algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - java.io.IOException –
- SecurityException –
- ClassNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.IBEARunner problemName [referenceFront]
MOCHC45Runner¶
-
public class
MOCHC45Runner
extends AbstractAlgorithmRunner¶ This class executes the algorithm described in: A.J. Nebro, E. Alba, G. Molina, F. Chicano, F. Luna, J.J. Durillo “Optimal antenna placement using a new multi-objective chc algorithm”. GECCO ‘07: Proceedings of the 9th annual conference on Genetic and evolutionary computation. London, England. July 2007.
MOCHCRunner¶
-
public class
MOCHCRunner
extends AbstractAlgorithmRunner¶ This class executes the algorithm described in: A.J. Nebro, E. Alba, G. Molina, F. Chicano, F. Luna, J.J. Durillo “Optimal antenna placement using a new multi-objective chc algorithm”. GECCO ‘07: Proceedings of the 9th annual conference on Genetic and evolutionary computation. London, England. July 2007.
MOCellHVRunner¶
-
public class
MOCellHVRunner
extends AbstractAlgorithmRunner¶ Class to configure and run the MOCell algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- FileNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.MOCellRunner problemName [referenceFront]
MOCellRunner¶
-
public class
MOCellRunner
extends AbstractAlgorithmRunner¶ Class to configure and run the MOCell algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- FileNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.MOCellRunner problemName [referenceFront]
MOEADDRunner¶
-
public class
MOEADDRunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the MOEA/DD algorithm
Author:
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.MOEADRunner problemName [referenceFront]
MOEADRunner¶
-
public class
MOEADRunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the MOEA/D algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.MOEADRunner problemName [referenceFront]
MOEADSTMRunner¶
-
public class
MOEADSTMRunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the MOEA/D algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.MOEADRunner problemName [referenceFront]
MOMBI2Runner¶
-
public class
MOMBI2Runner
extends AbstractAlgorithmRunner¶ Class to configure and run the MOMBI2 algorithm
Author: Juan J. Durillo Reference: Improved Metaheuristic Based on the R2 Indicator for Many-Objective Optimization. R. Hernández Gómez, C.A. Coello Coello. Proceeding GECCO ‘15 Proceedings of the 2015 on Genetic and Evolutionary Computation Conference. Pages 679-686 DOI: 10.1145/2739480.2754776
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- FileNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.MOMBIRunner problemName [referenceFront]
MOMBIRunner¶
-
public class
MOMBIRunner
extends AbstractAlgorithmRunner¶ Class to configure and run the MOMBI algorithm
Author: Juan J. Durillo
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- FileNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.MOMBIRunner problemName [referenceFront]
NSGAII45Runner¶
-
public class
NSGAII45Runner
extends AbstractAlgorithmRunner¶ Class to configure and run the implementation of the NSGA-II algorithm included in
NSGAII45
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- FileNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.NSGAII45Runner problemName [referenceFront]
NSGAIIBigDataRunner¶
-
public class
NSGAIIBigDataRunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the NSGA-II algorithm to solve a problem of the CEC 2015 Big Optimization competition
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - java.io.IOException –
- SecurityException –
- ClassNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.NSGAIIBigDataRunner problemName [referenceFront]
NSGAIIBinaryRunner¶
-
public class
NSGAIIBinaryRunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the NSGA-II algorithm (binary encoding)
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - org.uma.jmetal.util.JMetalException –
- java.io.IOException –
- SecurityException –
- ClassNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.NSGAIIBinaryRunner problemName [referenceFront]
NSGAIIEbesRunner¶
-
public class
NSGAIIEbesRunner
extends AbstractAlgorithmRunner¶ Class to configure and run the NSGA-II algorithm to solve the Ebes problem
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- FileNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.NSGAIIRunner problemName [referenceFront]
NSGAIIIRunner¶
-
public class
NSGAIIIRunner
extends AbstractAlgorithmRunner¶ Class to configure and run the NSGA-III algorithm
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - java.io.IOException –
- SecurityException –
- ClassNotFoundException – Usage: three options - org.uma.jmetal.runner.multiobjective.NSGAIIIRunner - org.uma.jmetal.runner.multiobjective.NSGAIIIRunner problemName - org.uma.jmetal.runner.multiobjective.NSGAIIIRunner problemName paretoFrontFile
NSGAIIIntegerRunner¶
-
public class
NSGAIIIntegerRunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the NSGA-II algorithm (integer encoding)
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - org.uma.jmetal.util.JMetalException –
- java.io.IOException –
- SecurityException –
- ClassNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.NSGAIIIntegerRunner problemName [referenceFront]
NSGAIIMeasuresRunner¶
-
public class
NSGAIIMeasuresRunner
extends AbstractAlgorithmRunner¶ Class to configure and run the NSGA-II algorithm (variant with measures)
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.NSGAIIMeasuresRunner problemName [referenceFront]
NSGAIIMeasuresWithChartsRunner¶
-
public class
NSGAIIMeasuresWithChartsRunner
extends AbstractAlgorithmRunner¶ Class to configure and run the NSGA-II algorithm (variant with measures)
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.NSGAIIMeasuresRunner problemName [referenceFront]
NSGAIIMeasuresWithHypervolumeRunner¶
-
public class
NSGAIIMeasuresWithHypervolumeRunner
extends AbstractAlgorithmRunner¶ Class to configure and run the NSGA-II algorithm (variant with measures)
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.NSGAIIMeasuresRunner problemName [referenceFront]
NSGAIIRunner¶
-
public class
NSGAIIRunner
extends AbstractAlgorithmRunner¶ Class to configure and run the NSGA-II algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- FileNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.NSGAIIRunner problemName [referenceFront]
NSGAIIStoppingByTimeRunner¶
-
public class
NSGAIIStoppingByTimeRunner
extends AbstractAlgorithmRunner¶ Class to configure and run the NSGA-II algorithm (version NSGAIIStoppingByTime)
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- FileNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.NSGAIIRunner problemName [referenceFront]
NSGAIITSPRunner¶
-
public class
NSGAIITSPRunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the NSGA-II algorithm to solve the bi-objective TSP
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - java.io.IOException –
- SecurityException –
- ClassNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.NSGAIITSPRunner problemName [referenceFront]
OMOPSORunner¶
-
public class
OMOPSORunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the OMOPSO algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - org.uma.jmetal.util.JMetalException –
- java.io.IOException –
- SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.OMOPSORunner problemName [referenceFront]
PAESRunner¶
-
public class
PAESRunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the PAES algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.PAESRunner problemName [referenceFront]
PESA2Runner¶
-
public class
PESA2Runner
extends AbstractAlgorithmRunner¶ Class for configuring and running the PESA2 algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.PESA2Runner problemName [referenceFront]
ParallelGDE3Runner¶
-
public class
ParallelGDE3Runner
extends AbstractAlgorithmRunner¶ Class for configuring and running the GDE3 algorithm (parallel version)
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.ParallelGDE3Runner problemName [referenceFront]
ParallelNSGAIIRunner¶
-
public class
ParallelNSGAIIRunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the NSGA-II algorithm (parallel version)
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.ParallelNSGAIIRunner problemName [referenceFront]
ParallelPESA2Runner¶
-
public class
ParallelPESA2Runner
extends AbstractAlgorithmRunner¶ Class for configuring and running the PESA2 algorithm (parallel version)
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.ParallelPESA2Runner problemName [referenceFront]
ParallelSMPSORunner¶
-
public class
ParallelSMPSORunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the SMPSO algorithm (parallel version)
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments. The first (optional) argument specifies the problem to solve.
Throws: - org.uma.jmetal.util.JMetalException –
- java.io.IOException –
- SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.ParallelSMPSORunner problemName [referenceFront]
ParallelSPEA2Runner¶
-
public class
ParallelSPEA2Runner
extends AbstractAlgorithmRunner¶ /** Class for configuring and running the SPEA2 algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.ParallelSPEA2Runner problemName [referenceFront]
RNSGAIIConstraintRunner¶
-
public class
RNSGAIIConstraintRunner
extends AbstractAlgorithmRunner¶ Class to configure and run the R-NSGA-II algorithm
Author: Antonio J. Nebro , Cristobal Barba
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- FileNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.RNSGAIIRunner problemName [referenceFront]
RNSGAIIRunner¶
-
public class
RNSGAIIRunner
extends AbstractAlgorithmRunner¶ Class to configure and run the R-NSGA-II algorithm
Author: Antonio J. Nebro , Cristobal Barba
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- FileNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.RNSGAIIRunner problemName [referenceFront]
RandomSearchRunner¶
-
public class
RandomSearchRunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the random search algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.RandomSearchRunner problemName [referenceFront]
SMPSOBigDataRunner¶
-
public class
SMPSOBigDataRunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the SMPSO algorithm to solve a problem of the CEC2015 Big Optimization competition
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments. The first (optional) argument specifies the problem to solve.
Throws: - org.uma.jmetal.util.JMetalException –
- java.io.IOException –
- SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.SMPSOBigDataRunner problemName [referenceFront]
SMPSOHv2Runner¶
-
public class
SMPSOHv2Runner
extends AbstractAlgorithmRunner¶ Class for configuring and running the SMPSO algorithm using an HypervolumeArchive, i.e, the SMPSOhv algorithm described in: A.J Nebro, J.J. Durillo, C.A. Coello Coello. Analysis of Leader Selection Strategies in a Multi-Objective Particle Swarm Optimizer. 2013 IEEE Congress on Evolutionary Computation. June 2013 DOI: 10.1109/CEC.2013.6557955 This is a variant using the WFG Hypervolume implementation
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments. The first (optional) argument specifies the problem to solve.
Throws: - org.uma.jmetal.util.JMetalException –
- java.io.IOException –
- SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.SMPSOHvRunner problemName [referenceFront]
SMPSOHvRunner¶
-
public class
SMPSOHvRunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the SMPSO algorithm using an HypervolumeArchive, i.e, the SMPSOhv algorithm described in: A.J Nebro, J.J. Durillo, C.A. Coello Coello. Analysis of Leader Selection Strategies in a Multi-Objective Particle Swarm Optimizer. 2013 IEEE Congress on Evolutionary Computation. June 2013 DOI: 10.1109/CEC.2013.6557955
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments. The first (optional) argument specifies the problem to solve.
Throws: - org.uma.jmetal.util.JMetalException –
- java.io.IOException –
- SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.SMPSOHvRunner problemName [referenceFront]
SMPSOMeasuresRunner¶
-
public class
SMPSOMeasuresRunner
extends AbstractAlgorithmRunner¶ Class to configure and run the NSGA-II algorithm (variant with measures)
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.NSGAIIMeasuresRunner problemName [referenceFront]
SMPSOMeasuresWithChartsRunner¶
-
public class
SMPSOMeasuresWithChartsRunner
extends AbstractAlgorithmRunner¶ Class to configure and run the NSGA-II algorithm (variant with measures)
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.NSGAIIMeasuresRunner problemName [referenceFront]
SMPSORPChangingTheReferencePointsAndChartsRunner¶
-
public class
SMPSORPChangingTheReferencePointsAndChartsRunner
¶
Methods¶
main¶
-
public static void
main
(String[] args)¶ Program to run the SMPSORP algorithm allowing to change a reference point interactively. SMPSORP is described in “Extending the Speed-constrained Multi-Objective PSO (SMPSO) With Reference Point Based Preference Articulation. Antonio J. Nebro, Juan J. Durillo, José García-Nieto, Cristóbal Barba-González, Javier Del Ser, Carlos A. Coello Coello, Antonio Benítez-Hidalgo, José F. Aldana-Montes. Parallel Problem Solving from Nature – PPSN XV. Lecture Notes In Computer Science, Vol. 11101, pp. 298-310. 2018.” This runner is the one used in the use case included in the paper. In the current implementation, only one reference point can be modified interactively.
Author: Antonio J. Nebro
SMPSORPWithMultipleReferencePointsAndChartsRunner¶
-
public class
SMPSORPWithMultipleReferencePointsAndChartsRunner
¶
Methods¶
main¶
-
public static void
main
(String[] args)¶ Program to run the SMPSORP algorithm with three reference points and plotting a graph during the algorithm execution. SMPSORP is described in “Extending the Speed-constrained Multi-Objective PSO (SMPSO) With Reference Point Based Preference Articulation. Antonio J. Nebro, Juan J. Durillo, José García-Nieto, Cristóbal Barba-González, Javier Del Ser, Carlos A. Coello Coello, Antonio Benítez-Hidalgo, José F. Aldana-Montes. Parallel Problem Solving from Nature – PPSN XV. Lecture Notes In Computer Science, Vol. 11101, pp. 298-310. 2018”.
Author: Antonio J. Nebro
SMPSORPWithMultipleReferencePointsRunner¶
-
public class
SMPSORPWithMultipleReferencePointsRunner
¶
Methods¶
main¶
-
public static void
main
(String[] args)¶ Program to run the SMPSORP algorithm with two reference points. SMPSORP is described in “Extending the Speed-constrained Multi-Objective PSO (SMPSO) With Reference Point Based Preference Articulation. Antonio J. Nebro, Juan J. Durillo, José García-Nieto, Cristóbal Barba-González, Javier Del Ser, Carlos A. Coello Coello, Antonio Benítez-Hidalgo, José F. Aldana-Montes. Parallel Problem Solving from Nature – PPSN XV. Lecture Notes In Computer Science, Vol. 11101, pp. 298-310. 2018”
Author: Antonio J. Nebro
SMPSORPWithOneReferencePointRunner¶
-
public class
SMPSORPWithOneReferencePointRunner
¶
Methods¶
main¶
-
public static void
main
(String[] args)¶ Program to run the SMPSORP algorithm with one reference point. SMPSORP is described in “Extending the Speed-constrained Multi-Objective PSO (SMPSO) With Reference Point Based Preference * Articulation. Antonio J. Nebro, Juan J. Durillo, José García-Nieto, Cristóbal Barba-González, * Javier Del Ser, Carlos A. Coello Coello, Antonio Benítez-Hidalgo, José F. Aldana-Montes. * Parallel Problem Solving from Nature – PPSN XV. Lecture Notes In Computer Science, Vol. 11101, * pp. 298-310. 2018
Author: Antonio J. Nebro
SMPSORunner¶
-
public class
SMPSORunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the SMPSO algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments. The first (optional) argument specifies the problem to solve.
Throws: - org.uma.jmetal.util.JMetalException –
- java.io.IOException –
- SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.SMPSORunner problemName [referenceFront]
SMSEMOARunner¶
-
public class
SMSEMOARunner
extends AbstractAlgorithmRunner¶ Class to configure and run the SMSEMOA algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.SMSEMOARunner problemName [referenceFront]
SPEA2BinaryRunner¶
-
public class
SPEA2BinaryRunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the SPEA2 algorithm (binary encoding)
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.SPEA2BinaryRunner problemName [referenceFront]
SPEA2Runner¶
-
public class
SPEA2Runner
extends AbstractAlgorithmRunner¶ Class for configuring and running the SPEA2 algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - java.io.IOException –
- SecurityException –
- ClassNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.SPEA2BinaryRunner problemName [referenceFront]
SteadyStateNSGAIIRunner¶
-
public class
SteadyStateNSGAIIRunner
extends AbstractAlgorithmRunner¶ Class to configure and run the NSGA-II (steady state version) algorithm
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- FileNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.SteadyStateNSGAIIRunner problemName [referenceFront]
WASFGABinaryRunner¶
-
public class
WASFGABinaryRunner
extends AbstractAlgorithmRunner¶
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- FileNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.WASFGARunner problemName [referenceFront]
WASFGAMeasuresRunner¶
-
public class
WASFGAMeasuresRunner
extends AbstractAlgorithmRunner¶
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- IOException –
WASFGAMeasuresRunner3D¶
-
public class
WASFGAMeasuresRunner3D
extends AbstractAlgorithmRunner¶
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- IOException –
WASFGARunner¶
-
public class
WASFGARunner
extends AbstractAlgorithmRunner¶
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments.
Throws: - JMetalException –
- FileNotFoundException – Invoking command: java org.uma.jmetal.runner.multiobjective.WASFGABinaryRunner problemName [referenceFront]
org.uma.jmetal.runner.singleobjective¶
CoralReefsOptimizationRunner¶
-
public class
CoralReefsOptimizationRunner
¶ Class to configure and run a coral reefs optimization algorithm. The target problem is OneMax.
Author: Inacio Medeiros
CovarianceMatrixAdaptationEvolutionStrategyRunner¶
-
public class
CovarianceMatrixAdaptationEvolutionStrategyRunner
¶
DifferentialEvolutionRunner¶
-
public class
DifferentialEvolutionRunner
¶ Class to configure and run a differential evolution algorithm. The algorithm can be configured to use threads. The number of cores is specified as an optional parameter. The target problem is Sphere.
Author: Antonio J. Nebro
ElitistEvolutionStrategyRunner¶
-
public class
ElitistEvolutionStrategyRunner
¶ Class to configure and run an elitist (mu + lambda) evolution strategy. The target problem is OneMax.
Author: Antonio J. Nebro
GenerationalGeneticAlgorithmBinaryEncodingRunner¶
-
public class
GenerationalGeneticAlgorithmBinaryEncodingRunner
¶ Class to configure and run a generational genetic algorithm. The target problem is OneMax.
Author: Antonio J. Nebro
GenerationalGeneticAlgorithmDoubleEncodingRunner¶
-
public class
GenerationalGeneticAlgorithmDoubleEncodingRunner
¶ Class to configure and run a generational genetic algorithm. The target problem is OneMax.
Author: Antonio J. Nebro
GenerationalGeneticAlgorithmTSPRunner¶
-
public class
GenerationalGeneticAlgorithmTSPRunner
¶ Class to configure and run a generational genetic algorithm. The target problem is TSP.
Author: Antonio J. Nebro
LocalSearchRunner¶
-
public class
LocalSearchRunner
¶ Class to configure and run a single objective local search. The target problem is OneMax.
Author: Antonio J. Nebro
NonElitistEvolutionStrategyRunner¶
-
public class
NonElitistEvolutionStrategyRunner
¶ Class to configure and run a non elitist (mu,lamba) evolution strategy. The target problem is OneMax.
Author: Antonio J. Nebro
ParallelGenerationalGeneticAlgorithmRunner¶
-
public class
ParallelGenerationalGeneticAlgorithmRunner
¶ Class to configure and run a parallel (multithreaded) generational genetic algorithm. The number of cores is specified as an optional parameter. A default value is used is the parameter is not provided. The target problem is OneMax
Author: Antonio J. Nebro
SMPSORunner¶
-
public class
SMPSORunner
extends AbstractAlgorithmRunner¶ Class for configuring and running the SMPSO algorithm to solve a single-objective problem
Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Parameters: - args – Command line arguments. The first (optional) argument specifies the problem to solve.
Throws: - org.uma.jmetal.util.JMetalException –
- java.io.IOException –
- SecurityException – Invoking command: java org.uma.jmetal.runner.multiobjective.SMPSORunner problemName [referenceFront]
StandardPSO2007Runner¶
-
public class
StandardPSO2007Runner
¶ Class to configure and run a StandardPSO2007. The algorithm can be configured to use threads. The number of cores is specified as an optional parameter. The target problem is Sphere.
Author: Antonio J. Nebro
StandardPSO2011Runner¶
-
public class
StandardPSO2011Runner
¶ Class to configure and run a StandardPSO2007. The algorithm can be configured to use threads. The number of cores is specified as an optional parameter. The target problem is Sphere.
Author: Antonio J. Nebro
SteadyStateGeneticAlgorithmBinaryEncodingRunner¶
-
public class
SteadyStateGeneticAlgorithmBinaryEncodingRunner
¶ Class to configure and run a steady-state genetic algorithm. The target problem is TSP
Author: Antonio J. Nebro
org.uma.jmetal.solution¶
BinarySolution¶
DoubleBinarySolution¶
DoubleSolution¶
IntegerDoubleSolution¶
IntegerSolution¶
PermutationSolution¶
Solution¶
-
public interface
Solution
<T> extends Serializable¶ Interface representing a Solution
Author: Antonio J. Nebro
Parameters: - <T> – Type (Double, Integer, etc.)
Methods¶
SolutionBuilder¶
-
public interface
SolutionBuilder
<Solution>¶ A
SolutionBuilder
allows to generate aSolution
by setting its fundamental information, in other words by providing the values of itsVariable
s.Author: Matthieu Vergne
Parameters: - <Solution> –
Methods¶
build¶
-
public Solution
build
()¶ This method generates a valid
Solution
based on all theValue
s prepared by callingprepare(Variable,Object)
. Usually, all theVariable
s should have been prepared before to be able to build a validSolution
, but it depends on the definition of theSolution
(e.g. there could haveVariable
s depending on each other, such that preparing one is equivalent to prepare others). Specific implementation could provide a method to know whether or notbuild()
can be called, or other facilities to ensure that aSolution
is properly prepared whenbuild()
is called.Returns: a new Solution
instance
getVariables¶
-
public Collection<Variable<Solution, ?>>
getVariables
()¶ Returns: the list of Variable
s managed by thisSolutionBuilder
prepare¶
-
public <Value> void
prepare
(Variable<Solution, Value> variable, Value value)¶ This method tells which
Value
to assign to the nextSolution
, generated bybuild()
, for a givenVariable
. Once all the requiredVariable
s are prepared,build()
can be called to generate theSolution
. If this method is called several time on the sameVariable
before to callbuild()
, the last preparedValue
should be considered.Parameters:
SolutionBuilder.Variable¶
-
public static interface
Variable
<Solution, Value> extends DescribedEntity¶ A
Variable
represents the fundamental information of a set of homogeneousSolution
s (e.g. a population of solutions returned by anAlgorithm
). For instance, anAlgorithm
used to solve a TSP problem would manage a whole population ofSolution
s, each representing a different path, and aVariable
would represent a type of information which defines theseSolution
s, like the path they represent or something more fine grained like the ith city.Author: Matthieu Vergne
Parameters: - <Solution> –
- <Value> –
SolutionEvaluator¶
-
public interface
SolutionEvaluator
<Solution>¶ A
SolutionEvaluator
allows to evaluate aSolution
on one or several dimensions, in other words to compute itsObjective
values.Author: Matthieu Vergne
Parameters: - <Solution> –
Methods¶
getObjectives¶
-
public Collection<Objective<Solution, ?>>
getObjectives
()¶ Returns: the list of Objective
s managed by thisSolutionEvaluator
SolutionEvaluator.Objective¶
-
public static interface
Objective
<Solution, Value> extends DescribedEntity¶ An
Objective
represents the evaluation information of a set of homogeneousSolution
s (e.g. a population of solutions returned by anAlgorithm
). For instance, anAlgorithm
used to solve a TSP problem would manage a whole population ofSolution
s, each representing a different path, and anObjective
would represent a type of information which evaluates theseSolution
s, like the length of the path, the time needed to travel through this path, or the amount of fuel consumed.Author: Matthieu Vergne
Parameters: - <Solution> –
- <Value> –
org.uma.jmetal.solution.impl¶
AbstractGenericSolution¶
-
public abstract class
AbstractGenericSolution
<T, P extends Problem<?>> implements Solution<T>¶ Abstract class representing a generic solution
Author: Antonio J. Nebro
Fields¶
randomGenerator¶
-
protected final JMetalRandom
randomGenerator
¶
Methods¶
ArrayDoubleSolution¶
-
public class
ArrayDoubleSolution
implements DoubleSolution¶ Implementation of
DoubleSolution
using arrays.Author: Antonio J. Nebro
Fields¶
problem¶
-
protected DoubleProblem
problem
¶
randomGenerator¶
-
protected final JMetalRandom
randomGenerator
¶
Constructors¶
ArrayDoubleSolution¶
-
public
ArrayDoubleSolution
(DoubleProblem problem)¶ Constructor
ArrayDoubleSolution¶
-
public
ArrayDoubleSolution
(ArrayDoubleSolution solution)¶ Copy constructor
Parameters: - solution – to copy
Methods¶
ArrayDoubleSolutionTest¶
-
public class
ArrayDoubleSolutionTest
¶ Author: Antonio J. Nebro
DefaultBinarySolution¶
-
public class
DefaultBinarySolution
extends AbstractGenericSolution<BinarySet, BinaryProblem> implements BinarySolution¶ Defines an implementation of a binary solution
Author: Antonio J. Nebro
Constructors¶
DefaultBinarySolution¶
-
public
DefaultBinarySolution
(BinaryProblem problem)¶ Constructor
DefaultBinarySolution¶
-
public
DefaultBinarySolution
(DefaultBinarySolution solution)¶ Copy constructor
DefaultBinarySolutionTest¶
-
public class
DefaultBinarySolutionTest
¶
Fields¶
problem¶
-
BinaryProblem
problem
¶
Methods¶
shouldGetNumberOfBitsBeEqualToTheNumberOfOfBitsPerVariable¶
-
public void
shouldGetNumberOfBitsBeEqualToTheNumberOfOfBitsPerVariable
()¶
shouldGetTotalNumberOfBitsBeEqualToTheSumOfBitsPerVariable¶
-
public void
shouldGetTotalNumberOfBitsBeEqualToTheSumOfBitsPerVariable
()¶
shouldGetVariableValueStringReturnARightStringRepresentation¶
-
public void
shouldGetVariableValueStringReturnARightStringRepresentation
()¶
shouldTheHashCodeOfTwoIdenticalSolutionsBeTheSame¶
-
public void
shouldTheHashCodeOfTwoIdenticalSolutionsBeTheSame
()¶
DefaultDoubleBinarySolution¶
-
public class
DefaultDoubleBinarySolution
extends AbstractGenericSolution<Object, DoubleBinaryProblem<?>> implements DoubleBinarySolution¶ Description: - this solution contains an array of double value + a binary string - getNumberOfVariables() returns the number of double values + 1 (the string) - getNumberOfDoubleVariables() returns the number of double values - getNumberOfVariables() = getNumberOfDoubleVariables() + 1 - the bitset is the last variable
Author: Antonio J. Nebro
Constructors¶
DefaultDoubleBinarySolution¶
-
public
DefaultDoubleBinarySolution
(DoubleBinaryProblem<?> problem)¶ Constructor
DefaultDoubleBinarySolution¶
-
public
DefaultDoubleBinarySolution
(DefaultDoubleBinarySolution solution)¶ Copy constructor
Methods¶
copy¶
-
public DefaultDoubleBinarySolution
copy
()¶
DefaultDoubleSolution¶
-
public class
DefaultDoubleSolution
extends AbstractGenericSolution<Double, DoubleProblem> implements DoubleSolution¶ Defines an implementation of a double solution
Author: Antonio J. Nebro
Constructors¶
DefaultDoubleSolution¶
-
public
DefaultDoubleSolution
(DoubleProblem problem)¶ Constructor
DefaultDoubleSolution¶
-
public
DefaultDoubleSolution
(DefaultDoubleSolution solution)¶ Copy constructor
DefaultIntegerDoubleSolution¶
-
public class
DefaultIntegerDoubleSolution
extends AbstractGenericSolution<Number, IntegerDoubleProblem<?>> implements IntegerDoubleSolution¶ Defines an implementation of a class for solutions having integers and doubles
Author: Antonio J. Nebro
Constructors¶
DefaultIntegerDoubleSolution¶
-
public
DefaultIntegerDoubleSolution
(IntegerDoubleProblem<?> problem)¶ Constructor
DefaultIntegerDoubleSolution¶
-
public
DefaultIntegerDoubleSolution
(DefaultIntegerDoubleSolution solution)¶ Copy constructor
Methods¶
copy¶
-
public DefaultIntegerDoubleSolution
copy
()¶
DefaultIntegerPermutationSolution¶
-
public class
DefaultIntegerPermutationSolution
extends AbstractGenericSolution<Integer, PermutationProblem<?>> implements PermutationSolution<Integer>¶ Defines an implementation of solution composed of a permuation of integers
Author: Antonio J. Nebro
Constructors¶
DefaultIntegerPermutationSolution¶
-
public
DefaultIntegerPermutationSolution
(PermutationProblem<?> problem)¶ Constructor
DefaultIntegerPermutationSolution¶
-
public
DefaultIntegerPermutationSolution
(DefaultIntegerPermutationSolution solution)¶ Copy Constructor
DefaultIntegerPermutationSolutionTest¶
-
public class
DefaultIntegerPermutationSolutionTest
¶ Author: Antonio J. Nebro
DefaultIntegerSolution¶
-
public class
DefaultIntegerSolution
extends AbstractGenericSolution<Integer, IntegerProblem> implements IntegerSolution¶ Defines an implementation of an integer solution
Author: Antonio J. Nebro
Constructors¶
DefaultIntegerSolution¶
-
public
DefaultIntegerSolution
(IntegerProblem problem)¶ Constructor
DefaultIntegerSolution¶
-
public
DefaultIntegerSolution
(DefaultIntegerSolution solution)¶ Copy constructor
DoubleSolutionComparisonIT¶
-
public class
DoubleSolutionComparisonIT
¶ Integration test to compare the performance of
ArrayDoubleSolution
againstDefaultDoubleSolution
Author: Antonio J. Nebro
ObjectiveFactory¶
-
public class
ObjectiveFactory
¶ This factory provides facilities to generate
Objective
s from usual situations.Author: Matthieu Vergne
Methods¶
createFromGetters¶
-
public <Solution> Collection<Objective<Solution, ?>>
createFromGetters
(Class<Solution> solutionClass)¶ This method retrieves all the values accessible through a getter (
getX()
method) in order to build the corresponding set ofObjective
s. Notice thatObjective
s are supposed to represent evaluations of aSolution
, so if theSolution
has other kinds of information accessible through getters, they will also be retrieved asObjective
s. In such a case, you should filter the returnedObjective
s, rely on more advanced methods, or generate theObjective
s manually.Parameters: - solutionClass – the
Solution
class to analyze
Returns: the set of
Objective
s retrieved from this classSee also:
.createFromLonelyGetters(Class)
- solutionClass – the
createFromGettersWithoutSetters¶
-
public <Solution> Collection<Objective<Solution, ?>>
createFromGettersWithoutSetters
(Class<Solution> solutionClass)¶ This method retrieves all the values accessible through a getter (
getX()
method) in order to build the corresponding set ofObjective
s. At the opposite ofcreateFromGetters(Class)
, an additional filter is used: we build anObjective
for each getter which does not correspond to a setter (setX()
method with the sameX
than the getter). This method is adapted forSolution
implementations which provide setters only for their fundamental values (e.g. the path of a TSPSolution
) and use getters only for the computed values (e.g. the length of such a path). Notice that, if all the relevant getters are not present, the correspondingObjective
s will not be retrieved. On the opposite, any additional getter which does not correspond to a relevantObjective
will be mistakenly retrieved. So be sure that the relevant elements (and only these ones) have their getter (and no setter). Otherwise, you should use a different method or generate theObjective
s manually.Parameters: - solutionClass – the
Solution
class to analyze
Returns: the set of
Objective
s retrieved from this class- solutionClass – the
ObjectiveFactoryTest¶
-
public class
ObjectiveFactoryTest
¶
VariableFactory¶
-
public class
VariableFactory
¶ This factory provides facilities to generate
Variable
s from usual situations.Author: Matthieu Vergne
Methods¶
createFromGetters¶
-
public <Solution> Collection<Variable<Solution, ?>>
createFromGetters
(Class<Solution> solutionClass)¶ This method retrieves all the values accessible through a getter (
getX()
method) in order to build the corresponding set ofVariable
s. Notice thatVariable
s are supposed to represent the fundamental description of aSolution
, so if theSolution
has computation or other additional methods which are named as getters, they will also be retrieved asVariable
s. In such a case, you should filter the returnedVariable
s, rely on more advanced methods, or generate theVariable
s manually.Parameters: - solutionClass – the
Solution
class to analyze
Returns: the set of
Variable
s retrieved from this classSee also:
.createFromGettersAndSetters(Class)
,.createFromGettersAndConstructors(Class)
- solutionClass – the
createFromGettersAndConstructors¶
-
public <Solution> Collection<Variable<Solution, ?>>
createFromGettersAndConstructors
(Class<Solution> solutionClass)¶ This method retrieves all the values accessible through a getter (
getX()
method) in order to build the corresponding set ofVariable
s. At the opposite ofcreateFromGetters(Class)
, an additional filter is used: we build aVariable
for each getter which corresponds to a constructor argument (argument of the same type). This method is adapted for staticSolution
implementations, which usually have a constructor which takes all the relevant values and provide getters to retrieve them. Because Java reflection does not always provide the required information (e.g. names of constructor arguments), this method can be applied only on solution classes which meet strict constraints:- only one getter should return a given type
- for each constructor and between constructors, only one argument should be of a given type (it can appear in several constructors, but it should be always the same argument)
If all the constraints are not met, an exception will be thrown.
Parameters: - solutionClass – the
Solution
class to analyze
Throws: - IllegalArgumentException – if one of the constraints is not met
- IsInterfaceException – if the
Solution
class to analyze is an interface, thus constructors make no sense
Returns: the set of
Variable
s retrieved from this class
createFromGettersAndSetters¶
-
public <Solution> Collection<Variable<Solution, ?>>
createFromGettersAndSetters
(Class<Solution> solutionClass)¶ This method retrieves all the values accessible through a getter (
getX()
method) in order to build the corresponding set ofVariable
s. At the opposite ofcreateFromGetters(Class)
, an additional filter is used: we build aVariable
for each getter which corresponds to a setter (setX()
method with the sameX
than the getter). This method is adapted for dynamicSolution
implementations, thus allowing to change the value of itsVariable
s (e.g. change the path of a TSPSolution
). Notice that, if all the relevant setters are not present (or they do not strictly respect the naming of the getter), the correspondingVariable
s will not be retrieved. On the opposite, any additional setter/getter couple which does not correspond to a relevantVariable
will be mistakenly retrieved. So be sure that the relevant elements (and only these ones) have their setter and getter. Otherwise, you should use a different method or generate theVariable
s manually.Parameters: - solutionClass – the
Solution
class to analyze
Returns: the set of
Variable
s retrieved from this class- solutionClass – the
VariableFactory.IsInterfaceException¶
-
public static class
IsInterfaceException
extends RuntimeException¶
VariableFactoryTest¶
-
public class
VariableFactoryTest
¶
Methods¶
testCreateFromGettersAndConstructorsRetrievesOnlyGettersWithConstructorArgument¶
-
public void
testCreateFromGettersAndConstructorsRetrievesOnlyGettersWithConstructorArgument
()¶
testCreateFromGettersAndConstructorsThrowExceptionIfInterface¶
-
public void
testCreateFromGettersAndConstructorsThrowExceptionIfInterface
()¶
testCreateFromGettersAndConstructorsThrowExceptionIfOverlappingTypes¶
-
public void
testCreateFromGettersAndConstructorsThrowExceptionIfOverlappingTypes
()¶
org.uma.jmetal.solution.util¶
RepairDoubleSolution¶
-
public interface
RepairDoubleSolution
extends Serializable¶ Author: Antonio J. Nebro
Methods¶
repairSolutionVariableValue¶
-
public double
repairSolutionVariableValue
(double value, double lowerBound, double upperBound)¶ Checks if a given value is between its bounds and repairs it otherwise
Parameters: - value – The value to be checked
- lowerBound –
- upperBound –
Returns: The same value if it is between the limits or a repaired value otherwise
RepairDoubleSolutionAtBounds¶
-
public class
RepairDoubleSolutionAtBounds
implements RepairDoubleSolution¶ Author: Antonio J. Nebro
Methods¶
repairSolutionVariableValue¶
-
public double
repairSolutionVariableValue
(double value, double lowerBound, double upperBound)¶ Checks if the value is between its bounds; if not, the lower or upper bound is returned
Parameters: - value – The value to be checked
- lowerBound –
- upperBound –
Returns: The same value if it is in the limits or a repaired value otherwise
RepairDoubleSolutionAtBoundsTest¶
-
public class
RepairDoubleSolutionAtBoundsTest
¶ Author: Antonio J. Nebro
Methods¶
shouldRRepairDoubleSolutionAtBoundsAssignTheLowerBoundIfValueIsLessThanIt¶
-
public void
shouldRRepairDoubleSolutionAtBoundsAssignTheLowerBoundIfValueIsLessThanIt
()¶
RepairDoubleSolutionAtRandom¶
-
public class
RepairDoubleSolutionAtRandom
implements RepairDoubleSolution¶ Author: Antonio J. Nebro
Constructors¶
RepairDoubleSolutionAtRandom¶
-
public
RepairDoubleSolutionAtRandom
(BoundedRandomGenerator<Double> randomGenerator)¶ Constructor
Methods¶
repairSolutionVariableValue¶
-
public double
repairSolutionVariableValue
(double value, double lowerBound, double upperBound)¶ Checks if the value is between its bounds; if not, a random value between the limits is returned
Parameters: - value – The value to be checked
- lowerBound –
- upperBound –
Returns: The same value if it is between the limits or a repaired value otherwise
RepairDoubleSolutionAtRandomTest¶
-
public class
RepairDoubleSolutionAtRandomTest
¶ Author: Antonio J. Nebro
Methods¶
shouldJMetalRandomGeneratorNotBeUsedWhenCustomRandomGeneratorProvided¶
-
public void
shouldJMetalRandomGeneratorNotBeUsedWhenCustomRandomGeneratorProvided
()¶
shouldRRepairDoubleSolutionAtRandomAssignARandomValueIfValueIsGreaterThanTheUpperBound¶
-
public void
shouldRRepairDoubleSolutionAtRandomAssignARandomValueIfValueIsGreaterThanTheUpperBound
()¶
org.uma.jmetal.util¶
AbstractAlgorithmRunner¶
-
public abstract class
AbstractAlgorithmRunner
¶ Abstract class for Runner classes
Author: Antonio J. Nebro
AdaptiveGrid¶
-
public class
AdaptiveGrid
<S extends Solution<?>>¶ This class defines an adaptive grid over a list of solutions as the one used by algorithm PAES.
Author: Antonio J. Nebro, Juan J. Durillo
Constructors¶
Methods¶
addSolution¶
-
public void
addSolution
(int location)¶ Increases the number of solutions into a specific hypercube.
Parameters: - location – Number of hypercube.
calculateOccupied¶
-
public void
calculateOccupied
()¶ Calculates the number of hypercubes having one or more solutions. return the number of hypercubes with more than zero solutions.
getAverageOccupation¶
-
public double
getAverageOccupation
()¶ Return the average number of solutions in the occupied hypercubes
getBisections¶
-
public int
getBisections
()¶ Returns the number of bi-divisions performed in each objective.
Returns: the number of bi-divisions.
getLocationDensity¶
-
public int
getLocationDensity
(int location)¶ Returns the number of solutions into a specific hypercube.
Parameters: - location – Number of the hypercube.
Returns: The number of solutions into a specific hypercube.
getMostPopulatedHypercube¶
-
public int
getMostPopulatedHypercube
()¶ Returns the value of the most populated hypercube.
Returns: The hypercube with the maximum number of solutions.
location¶
-
public int
location
(S solution)¶ Calculates the hypercube of a solution
Parameters: - solution – The
Solution
.
- solution – The
occupiedHypercubes¶
-
public int
occupiedHypercubes
()¶ Returns the number of hypercubes with more than zero solutions.
Returns: the number of hypercubes with more than zero solutions.
randomOccupiedHypercube¶
-
public int
randomOccupiedHypercube
()¶ Returns a random hypercube that has more than zero solutions.
Returns: The hypercube.
randomOccupiedHypercube¶
-
public int
randomOccupiedHypercube
(BoundedRandomGenerator<Integer> randomGenerator)¶ Returns a random hypercube that has more than zero solutions.
Parameters: - randomGenerator – the
BoundedRandomGenerator
to use for selecting the hypercube
Returns: The hypercube.
- randomGenerator – the
removeSolution¶
-
public void
removeSolution
(int location)¶ Decreases the number of solutions into a specific hypercube.
Parameters: - location – Number of hypercube.
rouletteWheel¶
-
public int
rouletteWheel
()¶ Returns a random hypercube using a rouleteWheel method.
Returns: the number of the selected hypercube.
rouletteWheel¶
-
public int
rouletteWheel
(BoundedRandomGenerator<Double> randomGenerator)¶ Returns a random hypercube using a rouleteWheel method.
Parameters: - randomGenerator – the
BoundedRandomGenerator
to use for the roulette
Returns: the number of the selected hypercube.
- randomGenerator – the
updateGrid¶
updateGrid¶
-
public void
updateGrid
(S solution, List<S> solutionSet)¶ Updates the grid limits and the grid content adding a new
Solution
. If the solution falls out of the grid bounds, the limits and content of the grid must be re-calculated.Parameters: - solution –
Solution
considered to update the grid. - solutionSet –
SolutionSet
used to update the grid.
- solution –
AdaptiveGridTest¶
-
public class
AdaptiveGridTest
¶ Created by ajnebro on 16/3/17.
Methods¶
shouldGetAverageOccupationReturnTheRightValue¶
-
public void
shouldGetAverageOccupationReturnTheRightValue
()¶
shouldGetAverageOccupationReturnZeroIfThereAreNoOccupiedHypercubes¶
-
public void
shouldGetAverageOccupationReturnZeroIfThereAreNoOccupiedHypercubes
()¶
shouldJMetalRandomGeneratorNotBeUsedWhenCustomRandomGeneratorProvidedInRandomOccupiedHypercube¶
-
public void
shouldJMetalRandomGeneratorNotBeUsedWhenCustomRandomGeneratorProvidedInRandomOccupiedHypercube
()¶
shouldJMetalRandomGeneratorNotBeUsedWhenCustomRandomGeneratorProvidedInRouletteWheel¶
-
public void
shouldJMetalRandomGeneratorNotBeUsedWhenCustomRandomGeneratorProvidedInRouletteWheel
()¶
AlgorithmBuilder¶
-
public interface
AlgorithmBuilder
<A extends Algorithm<?>>¶ Interface representing algorithm builders
Author: Antonio J. Nebro
AlgorithmRunner¶
-
public class
AlgorithmRunner
¶ Class for running algorithms in a concurrent thread
Author: Antonio J. Nebro
AlgorithmRunner.Executor¶
-
public static class
Executor
¶ Executor class
Methods¶
execute¶
-
public AlgorithmRunner
execute
()¶
JMetalException¶
-
public class
JMetalException
extends RuntimeException implements Serializable¶ jMetal exception class
Author: Antonio J. Nebro
JMetalLogger¶
-
public class
JMetalLogger
implements Serializable¶ This class provides some facilities to manage loggers. One might use the static logger of this class or use its own, custom logger. Also, we provide the static method
configureLoggers(File)
for configuring the loggers easily. This method is automatically called before any use of the static logger, but if you want it to apply on other loggers it is preferable to call it explicitly at the beginning of your main() method.Author: Antonio J. Nebro , Matthieu Vergne
Methods¶
configureLoggers¶
-
public static void
configureLoggers
(File propertyFile)¶ This method provides a single-call method to configure the
Logger
instances. A default configuration is considered, enriched with a custom property file for more convenient logging. The custom file is considered after the default configuration, so it can override it if necessary. The custom file might be provided as an argument of this method, otherwise we look for a file named “jMetal.log.ini”. If no custom file is provided, then only the default configuration is considered.Parameters: - propertyFile – the property file to use for custom configuration,
null
to use only the default configuration
Throws: - IOException –
- propertyFile – the property file to use for custom configuration,
SolutionListUtils¶
-
public class
SolutionListUtils
¶ Created by Antonio J. Nebro on 04/10/14. Modified by Juanjo 13/03/15
Methods¶
distanceMatrix¶
-
public static <S extends Solution<?>> double[][]
distanceMatrix
(List<S> solutionSet)¶ Returns a matrix with the euclidean distance between each pair of solutions in the population. Distances are measured in the objective space
Parameters: - solutionSet –
fillPopulationWithNewSolutions¶
-
public static <S> void
fillPopulationWithNewSolutions
(List<S> solutionList, Problem<S> problem, int maxListSize)¶ Fills a population with new solutions until its size is maxListSize
Parameters: - solutionList – The list of solutions
- problem – The problem being solved
- maxListSize – The target size of the list
- <S> – The type of the solutions to be created
findBestSolution¶
-
public static <S> S
findBestSolution
(List<S> solutionList, Comparator<S> comparator)¶
findIndexOfBestSolution¶
-
public static <S> int
findIndexOfBestSolution
(List<S> solutionList, Comparator<S> comparator)¶ Finds the index of the best solution in the list according to a comparator
Parameters: - solutionList –
- comparator –
Returns: The index of the best solution
findIndexOfWorstSolution¶
-
public static <S> int
findIndexOfWorstSolution
(List<? extends S> solutionList, Comparator<S> comparator)¶ Finds the index of the worst solution in the list according to a comparator
Parameters: - solutionList –
- comparator –
Returns: The index of the best solution
findWorstSolution¶
-
public <S> S
findWorstSolution
(Collection<S> solutionList, Comparator<S> comparator)¶
getInvertedFront¶
-
public static <S extends Solution<?>> List<S>
getInvertedFront
(List<S> solutionSet)¶ This method receives a normalized list of non-dominated solutions and return the inverted one. This operation is needed for minimization problem
Parameters: - solutionSet – The front to invert
Returns: The inverted front
getNondominatedSolutions¶
-
public static <S extends Solution<?>> List<S>
getNondominatedSolutions
(List<S> solutionList)¶
getNormalizedFront¶
-
public static List<Solution<?>>
getNormalizedFront
(List<Solution<?>> solutionList, List<Double> maximumValue, List<Double> minimumValue)¶ This method receives a list of non-dominated solutions and maximum and minimum values of the objectives, and returns a the normalized set of solutions.
Parameters: - solutionList – A list of non-dominated solutions
- maximumValue – The maximum values of the objectives
- minimumValue – The minimum values of the objectives
Returns: the normalized list of non-dominated solutions
getObjectiveArrayFromSolutionList¶
-
public static <S extends Solution<?>> double[]
getObjectiveArrayFromSolutionList
(List<S> solutionList, int objective)¶ Given a solution list and the identifier of an objective (0, 1, etc), returns an array with the values of that objective in all the solutions of the list
Parameters: - solutionList –
- objective –
- <S> –
isSolutionDominatedBySolutionList¶
-
public static <S extends Solution<?>> boolean
isSolutionDominatedBySolutionList
(S solution, List<? extends S> solutionSet)¶
removeSolutionsFromList¶
-
public static <S> void
removeSolutionsFromList
(List<S> solutionList, int numberOfSolutionsToRemove)¶ Removes a number of solutions from a list
Parameters: - solutionList – The list of solutions
- numberOfSolutionsToRemove –
restart¶
-
public static <S> void
restart
(List<S> solutionList, Problem<S> problem, int percentageOfSolutionsToRemove)¶ This methods takes a list of solutions, removes a percentage of its solutions, and it is filled with new random generated solutions
Parameters: - solutionList –
- problem –
- percentageOfSolutionsToRemove –
selectNRandomDifferentSolutions¶
-
public static <S> List<S>
selectNRandomDifferentSolutions
(int numberOfSolutionsToBeReturned, List<S> solutionList)¶ This method receives a normalized list of non-dominated solutions and return the inverted one. This operation is needed for minimization problem
Parameters: - solutionList – The front to invert
Returns: The inverted front
selectNRandomDifferentSolutions¶
-
public static <S> List<S>
selectNRandomDifferentSolutions
(int numberOfSolutionsToBeReturned, List<S> solutionList, BoundedRandomGenerator<Integer> randomGenerator)¶ This method receives a normalized list of non-dominated solutions and return the inverted one. This operation is needed for minimization problem
Parameters: - solutionList – The front to invert
- randomGenerator – The random generator to use
Returns: The inverted front
solutionListsAreEquals¶
-
public static <S> boolean
solutionListsAreEquals
(List<S> solutionList, List<S> newSolutionList)¶ Compares two solution lists to determine if both are equals
Parameters: - solutionList – A
Solution list
- newSolutionList – A
Solution list
Returns: true if both are contains the same solutions, false in other case
- solutionList – A
SolutionListUtilsTest¶
-
public class
SolutionListUtilsTest
¶ Author: Antonio J. Nebro
Methods¶
shouldExecuteReturnTheSolutionInTheListIfTheListContainsASolution¶
-
public void
shouldExecuteReturnTheSolutionInTheListIfTheListContainsASolution
()¶
shouldFillPopulationWithNewSolutionsDoNothingIfTheMaxSizeIsLowerThanTheListSize¶
-
public void
shouldFillPopulationWithNewSolutionsDoNothingIfTheMaxSizeIsLowerThanTheListSize
()¶
shouldFillPopulationWithNewSolutionsIncreaseTheListLengthToTheIndicatedValue¶
-
public void
shouldFillPopulationWithNewSolutionsIncreaseTheListLengthToTheIndicatedValue
()¶
shouldFindBestSolutionRaiseAnExceptionIfTheComparatorIsNull¶
-
public void
shouldFindBestSolutionRaiseAnExceptionIfTheComparatorIsNull
()¶
shouldFindBestSolutionRaiseAnExceptionIfTheSolutionListIsEmpty¶
-
public void
shouldFindBestSolutionRaiseAnExceptionIfTheSolutionListIsEmpty
()¶
shouldFindBestSolutionRaiseAnExceptionIfTheSolutionListIsNull¶
shouldFindBestSolutionReturnTheLastOneIfThisIsTheBestSolutionInALastInAListWithFiveSolutions¶
-
public void
shouldFindBestSolutionReturnTheLastOneIfThisIsTheBestSolutionInALastInAListWithFiveSolutions
()¶
shouldFindBestSolutionReturnTheSecondSolutionInTheListIfIsTheBestOufOfTwoSolutions¶
-
public void
shouldFindBestSolutionReturnTheSecondSolutionInTheListIfIsTheBestOufOfTwoSolutions
()¶
shouldFindBestSolutionReturnTheSolutionInTheListWhenItContainsOneSolution¶
-
public void
shouldFindBestSolutionReturnTheSolutionInTheListWhenItContainsOneSolution
()¶
shouldFindIndexOfBestSolutionRaiseAnExceptionIfTheComparatorIsNull¶
-
public void
shouldFindIndexOfBestSolutionRaiseAnExceptionIfTheComparatorIsNull
()¶
shouldFindIndexOfBestSolutionRaiseAnExceptionIfTheSolutionListIsEmpty¶
-
public void
shouldFindIndexOfBestSolutionRaiseAnExceptionIfTheSolutionListIsEmpty
()¶
shouldFindIndexOfBestSolutionRaiseAnExceptionIfTheSolutionListIsNull¶
shouldFindIndexOfBestSolutionReturn4IfTheBestSolutionIsTheLastInAListWithFiveSolutions¶
-
public void
shouldFindIndexOfBestSolutionReturn4IfTheBestSolutionIsTheLastInAListWithFiveSolutions
()¶
shouldFindIndexOfBestSolutionReturnOneIfTheSecondSolutionItTheBestOutOfTwoSolutionInTheList¶
-
public void
shouldFindIndexOfBestSolutionReturnOneIfTheSecondSolutionItTheBestOutOfTwoSolutionInTheList
()¶
shouldFindIndexOfBestSolutionReturnZeroIfTheFirstSolutionItTheBestOutOfTwoSolutionsInTheList¶
-
public void
shouldFindIndexOfBestSolutionReturnZeroIfTheFirstSolutionItTheBestOutOfTwoSolutionsInTheList
()¶
shouldFindIndexOfBestSolutionReturnZeroIfTheListWhenItContainsOneSolution¶
-
public void
shouldFindIndexOfBestSolutionReturnZeroIfTheListWhenItContainsOneSolution
()¶
shouldJMetalRandomGeneratorNotBeUsedWhenCustomRandomGeneratorProvidedInSelectNRandomDifferentSolutions¶
-
public void
shouldJMetalRandomGeneratorNotBeUsedWhenCustomRandomGeneratorProvidedInSelectNRandomDifferentSolutions
()¶
shouldRestartRemoveTheRequestedPercentageOfSolutions¶
-
public void
shouldRestartRemoveTheRequestedPercentageOfSolutions
()¶ TODO
shouldSelectNRandomDifferentSolutionsRaiseAnExceptionIfTheListSizeIsOneAndTwoSolutionsAreRequested¶
-
public void
shouldSelectNRandomDifferentSolutionsRaiseAnExceptionIfTheListSizeIsOneAndTwoSolutionsAreRequested
()¶
shouldSelectNRandomDifferentSolutionsRaiseAnExceptionIfTheSolutionListIsEmpty¶
-
public void
shouldSelectNRandomDifferentSolutionsRaiseAnExceptionIfTheSolutionListIsEmpty
()¶
shouldSelectNRandomDifferentSolutionsRaiseAnExceptionIfTheSolutionListIsNull¶
shouldSelectNRandomDifferentSolutionsReturnASingleSolution¶
-
public void
shouldSelectNRandomDifferentSolutionsReturnASingleSolution
()¶
shouldSelectNRandomDifferentSolutionsReturnTheCorrectListOfSolutions¶
-
public void
shouldSelectNRandomDifferentSolutionsReturnTheCorrectListOfSolutions
()¶ If the list contains 4 solutions, the result list must return all of them
shouldSelectNRandomDifferentSolutionsReturnTheCorrectNumberOfSolutions¶
-
public void
shouldSelectNRandomDifferentSolutionsReturnTheCorrectNumberOfSolutions
()¶
shouldSelectNRandomDifferentSolutionsReturnTheSolutionSInTheListIfTheListContainsTwoSolutions¶
-
public void
shouldSelectNRandomDifferentSolutionsReturnTheSolutionSInTheListIfTheListContainsTwoSolutions
()¶
shouldSolutionListsAreEqualsReturnIfTwoIdenticalSolutionListsAreCompared¶
-
public void
shouldSolutionListsAreEqualsReturnIfTwoIdenticalSolutionListsAreCompared
()¶
SolutionUtils¶
-
public class
SolutionUtils
¶ Created by Antonio J. Nebro on 6/12/14.
Methods¶
averageDistanceToSolutionList¶
distanceBetweenObjectives¶
-
public static <S extends Solution<?>> double
distanceBetweenObjectives
(S firstSolution, S secondSolution)¶ Returns the euclidean distance between a pair of solutions in the objective space
distanceBetweenSolutionsInObjectiveSpace¶
-
public static double
distanceBetweenSolutionsInObjectiveSpace
(DoubleSolution solutionI, DoubleSolution solutionJ)¶ Returns the distance between two solutions in the search space.
Parameters: - solutionI – The first
Solution
. - solutionJ – The second
Solution
.
Returns: the distance between solutions.
- solutionI – The first
distanceToSolutionListInSolutionSpace¶
-
public static double
distanceToSolutionListInSolutionSpace
(DoubleSolution solution, List<DoubleSolution> solutionList)¶ Returns the minimum distance from a
Solution
to a SolutionSet according to the encodings.variable values.Parameters: - solution – The
Solution
. - solutionList – The
List>
.
Returns: The minimum distance between solution and the set.
- solution – The
getBestSolution¶
-
public static <S extends Solution<?>> S
getBestSolution
(S solution1, S solution2, Comparator<S> comparator)¶ Return the best solution between those passed as arguments. If they are equal or incomparable one of them is chosen randomly.
Returns: The best solution
getBestSolution¶
-
public static <S extends Solution<?>> S
getBestSolution
(S solution1, S solution2, Comparator<S> comparator, RandomGenerator<Double> randomGenerator)¶ Return the best solution between those passed as arguments. If they are equal or incomparable one of them is chosen randomly.
Parameters: - randomGenerator –
RandomGenerator
for the equality case
Returns: The best solution
- randomGenerator –
getBestSolution¶
-
public static <S extends Solution<?>> S
getBestSolution
(S solution1, S solution2, Comparator<S> comparator, BinaryOperator<S> equalityPolicy)¶ Return the best solution between those passed as arguments. If they are equal or incomparable one of them is chosen based on the given policy.
Returns: The best solution
SolutionUtilsTest¶
-
public class
SolutionUtilsTest
¶
Methods¶
shouldAverageDistanceToSolutionListWorkProperlyCaseA¶
-
public void
shouldAverageDistanceToSolutionListWorkProperlyCaseA
()¶ Case A. Solution = [1], solutionList = [1]]
shouldAverageDistanceToSolutionListWorkProperlyCaseB¶
-
public void
shouldAverageDistanceToSolutionListWorkProperlyCaseB
()¶ Case B. Solution = [1], solutionList = [[2]]
shouldAverageDistanceToSolutionListWorkProperlyCaseC¶
-
public void
shouldAverageDistanceToSolutionListWorkProperlyCaseC
()¶ Case C. Solution = [1], solutionList = [[1], [2]]
shouldDistanceBetweenObjectivesWorkProperlyWithTwoSolutionsWithOneObjectiveCaseA¶
-
public void
shouldDistanceBetweenObjectivesWorkProperlyWithTwoSolutionsWithOneObjectiveCaseA
()¶ Case A: the two solutions are the same
shouldDistanceBetweenObjectivesWorkProperlyWithTwoSolutionsWithOneObjectiveCaseB¶
-
public void
shouldDistanceBetweenObjectivesWorkProperlyWithTwoSolutionsWithOneObjectiveCaseB
()¶ Case B: the two solutions are not the same
org.uma.jmetal.util.archive¶
Archive¶
-
public interface
Archive
<S> extends Serializable¶ Interface representing an archive of solutions
Author: Antonio J. Nebro
BoundedArchive¶
org.uma.jmetal.util.archive.impl¶
AbstractBoundedArchive¶
-
public abstract class
AbstractBoundedArchive
<S extends Solution<?>> implements BoundedArchive<S>¶ Author: Antonio J. Nebro
Parameters: - <S> –
Fields¶
archive¶
-
protected NonDominatedSolutionListArchive<S>
archive
¶
AdaptiveGridArchive¶
-
public class
AdaptiveGridArchive
<S extends Solution<?>> extends AbstractBoundedArchive<S>¶ This class implements an archive (solution list) based on an adaptive grid used in PAES
Author: Antonio J. Nebro , Juan J. Durillo
Constructors¶
Methods¶
add¶
-
public boolean
add
(S solution)¶ Adds a
Solution
to the setArchive. If theSolution
is dominated by any member of the setArchive then it is discarded. If theSolution
dominates some members of the setArchive, these are removed. If the setArchive is full and theSolution
has to be inserted, oneSolution
of the most populated hypercube of the adaptive grid is removed.Parameters: - solution – The
Solution
Returns: true if the
Solution
has been inserted, false otherwise.- solution – The
getComparator¶
-
public Comparator<S>
getComparator
()¶
getGrid¶
-
public AdaptiveGrid<S>
getGrid
()¶
AdaptiveGridArchiveTest¶
-
public class
AdaptiveGridArchiveTest
¶ Created by ajnebro on 16/11/16.
CrowdingDistanceArchive¶
-
public class
CrowdingDistanceArchive
<S extends Solution<?>> extends AbstractBoundedArchive<S>¶ Created by Antonio J. Nebro on 24/09/14. Modified by Juanjo on 07/04/2015
HypervolumeArchive¶
-
public class
HypervolumeArchive
<S extends Solution<?>> extends AbstractBoundedArchive<S>¶ Created by Antonio J. Nebro on 24/09/14.
Fields¶
hypervolume¶
-
Hypervolume<S>
hypervolume
¶
Constructors¶
HypervolumeArchive¶
-
public
HypervolumeArchive
(int maxSize, Hypervolume<S> hypervolume)¶
NonDominatedSolutionListArchive¶
-
public class
NonDominatedSolutionListArchive
<S extends Solution<?>> implements Archive<S>¶ This class implements an archive containing non-dominated solutions
Author: Antonio J. Nebro , Juan J. Durillo
Constructors¶
NonDominatedSolutionListArchive¶
-
public
NonDominatedSolutionListArchive
(DominanceComparator<S> comparator)¶ Constructor
Methods¶
add¶
-
public boolean
add
(S solution)¶ Inserts a solution in the list
Parameters: - solution – The solution to be inserted.
Returns: true if the operation success, and false if the solution is dominated or if an identical individual exists. The decision variables can be null if the solution is read from a file; in that case, the domination tests are omitted
NonDominatedSolutionListArchiveTest¶
-
public class
NonDominatedSolutionListArchiveTest
¶ Author: Antonio J. Nebro .
Methods¶
shouldAddADominantSolutionInAnArchiveOfSize1DiscardTheExistingSolution¶
-
public void
shouldAddADominantSolutionInAnArchiveOfSize1DiscardTheExistingSolution
()¶
shouldAddADominantSolutionInAnArchiveOfSize3DiscardTheRestOfSolutions¶
-
public void
shouldAddADominantSolutionInAnArchiveOfSize3DiscardTheRestOfSolutions
()¶
shouldAddADominatedSolutionInAnArchiveOfSize1DiscardTheNewSolution¶
-
public void
shouldAddADominatedSolutionInAnArchiveOfSize1DiscardTheNewSolution
()¶
shouldAddANonDominantSolutionInAnArchiveOfSize1IncorporateTheNewSolution¶
-
public void
shouldAddANonDominantSolutionInAnArchiveOfSize1IncorporateTheNewSolution
()¶
shouldAddASolutionEqualsToOneAlreadyInTheArchiveDoNothing¶
-
public void
shouldAddASolutionEqualsToOneAlreadyInTheArchiveDoNothing
()¶
shouldConstructorAssignThePassedComparator¶
-
public void
shouldConstructorAssignThePassedComparator
()¶
org.uma.jmetal.util.archivewithreferencepoint¶
ArchiveWithReferencePoint¶
-
public abstract class
ArchiveWithReferencePoint
<S extends Solution<?>> extends AbstractBoundedArchive<S>¶ This class defines a bounded archive that has associated a reference point as described in the paper “Extending the Speed-constrained Multi-Objective PSO (SMPSO) With Reference Point Based Preference Articulation Accepted in PPSN 2018.
Parameters: - <S> –
Fields¶
comparator¶
-
protected Comparator<S>
comparator
¶
org.uma.jmetal.util.archivewithreferencepoint.impl¶
CrowdingDistanceArchiveWithReferencePoint¶
-
public class
CrowdingDistanceArchiveWithReferencePoint
<S extends Solution<?>> extends ArchiveWithReferencePoint<S>¶ Class representing a
ArchiveWithReferencePoint
archive using a crowding distance based density estimatorAuthor: Antonio J. Nebro
Constructors¶
HypervolumeArchiveWithReferencePoint¶
-
public class
HypervolumeArchiveWithReferencePoint
<S extends Solution<?>> extends ArchiveWithReferencePoint<S>¶ Class representing a
ArchiveWithReferencePoint
archive using a hypervolume contribution based density estimator.Author: Antonio J. Nebro
Constructors¶
org.uma.jmetal.util.artificialdecisionmaker¶
ArtificialDecisionMaker¶
Fields¶
algorithm¶
-
protected InteractiveAlgorithm<S, R>
algorithm
¶
Constructors¶
ArtificialDecisionMaker¶
-
public
ArtificialDecisionMaker
(Problem<S> problem, InteractiveAlgorithm<S, R> algorithm)¶
org.uma.jmetal.util.artificialdecisionmaker.impl¶
ArtificialDecisionMakerDecisionTree¶
-
public class
ArtificialDecisionMakerDecisionTree
<S extends Solution<?>> extends ArtificialDecisionMaker<S, List<S>>¶ Class implementing the Towards automatic testing of reference point based interactive methods described in: Ojalehto, V., Podkopaev, D., & Miettinen, K. (2016, September). Towards automatic testing of reference point based interactive methods. In International Conference on Parallel Problem Solving from Nature (pp. 483-492). Springer, Cham.
Author: Cristobal Barba
Fields¶
random¶
-
protected JMetalRandom
random
¶
Constructors¶
ArtificiallDecisionMakerBuilder¶
-
public class
ArtificiallDecisionMakerBuilder
<S extends Solution<?>> implements AlgorithmBuilder<ArtificialDecisionMakerDecisionTree<S>>¶ Author: Antonio J. Nebro
Constructors¶
ArtificiallDecisionMakerBuilder¶
-
public
ArtificiallDecisionMakerBuilder
(Problem<S> problem, InteractiveAlgorithm<S, List<S>> algorithm)¶ ArtificiallDecisionMakerBuilder constructor
Methods¶
build¶
-
public ArtificialDecisionMakerDecisionTree<S>
build
()¶
setAlgorithm¶
-
public ArtificiallDecisionMakerBuilder<S>
setAlgorithm
(InteractiveAlgorithm<S, List<S>> algorithm)¶
setAsp¶
-
public ArtificiallDecisionMakerBuilder<S>
setAsp
(List<Double> asp)¶
setConsiderationProbability¶
-
public ArtificiallDecisionMakerBuilder<S>
setConsiderationProbability
(double considerationProbability)¶
setMaxEvaluations¶
-
public ArtificiallDecisionMakerBuilder<S>
setMaxEvaluations
(int maxEvaluations)¶
setNumberReferencePoints¶
-
public ArtificiallDecisionMakerBuilder<S>
setNumberReferencePoints
(int numberReferencePoints)¶
setRankingCoeficient¶
-
public ArtificiallDecisionMakerBuilder<S>
setRankingCoeficient
(List<Double> rankingCoeficient)¶
setTolerance¶
-
public ArtificiallDecisionMakerBuilder<S>
setTolerance
(double tolerance)¶
org.uma.jmetal.util.chartcontainer¶
ChartContainer¶
-
public class
ChartContainer
¶ Class for configuring and displaying a XChart.
Author: Jorge Rodriguez Ordonez
Constructors¶
Methods¶
setDelay¶
-
public ChartContainer
setDelay
(int delay)¶
setFrontChart¶
setName¶
-
public ChartContainer
setName
(String name)¶
updateFrontCharts¶
-
public void
updateFrontCharts
(List<DoubleSolution> solutionList)¶
ChartContainerWithReferencePoints¶
-
public class
ChartContainerWithReferencePoints
¶ Class for configuring and displaying a char with a number of subpopulations and reference points. Designed to be used with the SMPSORP.
Author: Antonio J. Nebro
Constructors¶
Methods¶
setDelay¶
-
public ChartContainerWithReferencePoints
setDelay
(int delay)¶
setFrontChart¶
setName¶
-
public ChartContainerWithReferencePoints
setName
(String name)¶
updateFrontCharts¶
-
public void
updateFrontCharts
(List<DoubleSolution> solutionList)¶
org.uma.jmetal.util.comparator¶
ConstraintViolationComparator¶
-
public interface
ConstraintViolationComparator
<S> extends Comparator<S>, Serializable¶
CrowdingDistanceComparator¶
-
public class
CrowdingDistanceComparator
<S extends Solution<?>> implements Comparator<S>, Serializable¶ Compares two solutions according to the crowding distance attribute. The higher the distance the better
Author: Antonio J. Nebro
Methods¶
compare¶
-
public int
compare
(S solution1, S solution2)¶ Compare two solutions.
Parameters: - solution1 – Object representing the first
Solution
. - solution2 – Object representing the second
Solution
.
Returns: -1, or 0, or 1 if solution1 is has greater, equal, or less distance value than solution2, respectively.
- solution1 – Object representing the first
CrowdingDistanceComparatorTest¶
-
public class
CrowdingDistanceComparatorTest
¶ Author: Antonio J. Nebro
Methods¶
shouldCompareReturnMinusOneIfSolutionBHasHigherDistance¶
-
public void
shouldCompareReturnMinusOneIfSolutionBHasHigherDistance
()¶
shouldCompareReturnMinusOneIfTheSecondSolutionIsNull¶
-
public void
shouldCompareReturnMinusOneIfTheSecondSolutionIsNull
()¶
shouldCompareReturnOneIfSolutionAHasLessDistance¶
-
public void
shouldCompareReturnOneIfSolutionAHasLessDistance
()¶
shouldCompareReturnOneIfTheFirstSolutionIsNull¶
-
public void
shouldCompareReturnOneIfTheFirstSolutionIsNull
()¶
shouldCompareReturnZeroIfBothSolutionsAreNull¶
-
public void
shouldCompareReturnZeroIfBothSolutionsAreNull
()¶
DominanceComparator¶
-
public class
DominanceComparator
<S extends Solution<?>> implements Comparator<S>, Serializable¶ This class implements a solution comparator taking into account the violation constraints
Author: Antonio J. Nebro
Constructors¶
DominanceComparator¶
-
public
DominanceComparator
(ConstraintViolationComparator<S> constraintComparator)¶ Constructor
DominanceComparator¶
-
public
DominanceComparator
(ConstraintViolationComparator<S> constraintComparator, double epsilon)¶ Constructor
Methods¶
compare¶
-
public int
compare
(S solution1, S solution2)¶ Compares two solutions.
Parameters: - solution1 – Object representing the first
Solution
. - solution2 – Object representing the second
Solution
.
Returns: -1, or 0, or 1 if solution1 dominates solution2, both are non-dominated, or solution1 is dominated by solution2, respectively.
- solution1 – Object representing the first
DominanceComparatorTest¶
-
public class
DominanceComparatorTest
¶ Author: Antonio J. Nebro
Methods¶
shouldCompareRaiseAnExceptionIfTheFirstSolutionIsNull¶
-
public void
shouldCompareRaiseAnExceptionIfTheFirstSolutionIsNull
()¶
shouldCompareRaiseAnExceptionIfTheSecondSolutionIsNull¶
-
public void
shouldCompareRaiseAnExceptionIfTheSecondSolutionIsNull
()¶
shouldCompareReturnMinusOneIfTheFirstSolutionDominatesTheSecondOneCaseA¶
-
public void
shouldCompareReturnMinusOneIfTheFirstSolutionDominatesTheSecondOneCaseA
()¶ Case A: solution1 has objectives [-1.0, 5.0, 9.0] and solution2 has [2.0, 6.0, 15.0]
shouldCompareReturnMinusOneIfTheFirstSolutionDominatesTheSecondOneCaseB¶
-
public void
shouldCompareReturnMinusOneIfTheFirstSolutionDominatesTheSecondOneCaseB
()¶ Case B: solution1 has objectives [-1.0, 5.0, 9.0] and solution2 has [-1.0, 5.0, 10.0]
shouldCompareReturnMinusOneIfTheTwoSolutionsHasOneObjectiveAndTheFirstOneIsLower¶
-
public void
shouldCompareReturnMinusOneIfTheTwoSolutionsHasOneObjectiveAndTheFirstOneIsLower
()¶
shouldCompareReturnOneIfTheSecondSolutionDominatesTheFirstOneCaseC¶
-
public void
shouldCompareReturnOneIfTheSecondSolutionDominatesTheFirstOneCaseC
()¶ Case C: solution1 has objectives [-1.0, 5.0, 9.0] and solution2 has [-2.0, 5.0, 9.0]
shouldCompareReturnOneIfTheSecondSolutionDominatesTheFirstOneCaseD¶
-
public void
shouldCompareReturnOneIfTheSecondSolutionDominatesTheFirstOneCaseD
()¶ Case D: solution1 has objectives [-1.0, 5.0, 9.0] and solution2 has [-1.0, 5.0, 8.0]
shouldCompareReturnOneIfTheTwoSolutionsHasOneObjectiveAndTheSecondOneIsLower¶
-
public void
shouldCompareReturnOneIfTheTwoSolutionsHasOneObjectiveAndTheSecondOneIsLower
()¶
EqualSolutionsComparator¶
-
public class
EqualSolutionsComparator
<S extends Solution<?>> implements Comparator<S>, Serializable¶ This class implements a
Comparator
(a method for comparingSolution
objects) based whether all the objective values are equal or not. A dominance test is applied to decide about what solution is the best.Author: Antonio J. Nebro
Methods¶
compare¶
-
public int
compare
(S solution1, S solution2)¶ Compares two solutions.
Parameters: - solution1 – First
Solution
. - solution2 – Second
Solution
.
Returns: -1, or 0, or 1, or 2 if solution1 is dominates solution2, solution1 and solution2 are equals, or solution1 is greater than solution2, respectively.
- solution1 – First
FitnessComparator¶
-
public class
FitnessComparator
<S extends Solution<?>> implements Comparator<S>, Serializable¶ This class implements a
Comparator
(a method for comparingSolution
objects) based on the fitness value returned by the methodgetFitness
.Author: Antonio J. Nebro
GDominanceComparator¶
-
public class
GDominanceComparator
<S extends Solution<?>> implements Comparator<S>, Serializable¶ This class implements a solution comparator according to the concept of g-dominance (https://doi.org/10.1016/j.ejor.2008.07.015)
Author: Antonio J. Nebro
Constructors¶
Methods¶
compare¶
-
public int
compare
(S solution1, S solution2)¶ Compares two solutions.
Parameters: - solution1 – Object representing the first
Solution
. - solution2 – Object representing the second
Solution
.
Returns: -1, or 0, or 1 if solution1 dominates solution2, both are non-dominated, or solution1 is dominated by solution2, respectively.
- solution1 – Object representing the first
HypervolumeContributionComparator¶
-
public class
HypervolumeContributionComparator
<S extends Solution<?>> implements Comparator<S>, Serializable¶ Compares two solutions according to the crowding distance attribute. The higher the distance the better
Author: Antonio J. Nebro
Methods¶
compare¶
-
public int
compare
(S solution1, S solution2)¶ Compare two solutions.
Parameters: - solution1 – Object representing the first
Solution
. - solution2 – Object representing the second
Solution
.
Returns: -1, or 0, or 1 if solution1 is has lower, equal, or higher contribution value than solution2, respectively.
- solution1 – Object representing the first
ObjectiveComparator¶
-
public class
ObjectiveComparator
<S extends Solution<?>> implements Comparator<S>, Serializable¶ This class implements a comparator based on a given objective
Author: Antonio J. Nebro
Constructors¶
Methods¶
compare¶
-
public int
compare
(S solution1, S solution2)¶ Compares two solutions according to a given objective.
Parameters: - solution1 – The first solution
- solution2 – The second solution
Returns: -1, or 0, or 1 if solution1 is less than, equal, or greater than solution2, respectively, according to the established order
ObjectiveComparator.Ordering¶
-
public enum
Ordering
¶
Enum Constants¶
ASCENDING¶
-
public static final ObjectiveComparator.Ordering
ASCENDING
¶
DESCENDING¶
-
public static final ObjectiveComparator.Ordering
DESCENDING
¶
ObjectiveComparatorTest¶
-
public class
ObjectiveComparatorTest
¶ Author: Antonio J. Nebro
Methods¶
shouldCompareRaiseAnExceptionIfSolution1HasLessObjectivesThanTheOneRequested¶
-
public void
shouldCompareRaiseAnExceptionIfSolution1HasLessObjectivesThanTheOneRequested
()¶
shouldCompareRaiseAnExceptionIfSolution2HasLessObjectivesThanTheOneRequested¶
-
public void
shouldCompareRaiseAnExceptionIfSolution2HasLessObjectivesThanTheOneRequested
()¶
shouldCompareReturnMinusOneIfTheObjectiveOfSolution1IsGreaterInDescendingOrder¶
-
public void
shouldCompareReturnMinusOneIfTheObjectiveOfSolution1IsGreaterInDescendingOrder
()¶
shouldCompareReturnMinusOneIfTheObjectiveOfSolution1IsLower¶
-
public void
shouldCompareReturnMinusOneIfTheObjectiveOfSolution1IsLower
()¶
shouldCompareReturnMinusOneIfTheSecondSolutionIsNull¶
-
public void
shouldCompareReturnMinusOneIfTheSecondSolutionIsNull
()¶
shouldCompareReturnOneIfTheFirstSolutionIsNull¶
-
public void
shouldCompareReturnOneIfTheFirstSolutionIsNull
()¶
shouldCompareReturnOneIfTheObjectiveOfSolution2IsGreaterInDescendingOrder¶
-
public void
shouldCompareReturnOneIfTheObjectiveOfSolution2IsGreaterInDescendingOrder
()¶
shouldCompareReturnOneIfTheObjectiveOfSolution2IsLower¶
-
public void
shouldCompareReturnOneIfTheObjectiveOfSolution2IsLower
()¶
RankingAndCrowdingDistanceComparator¶
-
public class
RankingAndCrowdingDistanceComparator
<S extends Solution<?>> implements Comparator<S>, Serializable¶ Author: Antonio J. Nebro
Methods¶
RankingAndCrowdingDistanceComparatorTest¶
-
public class
RankingAndCrowdingDistanceComparatorTest
¶ Author: Antonio J. Nebro
Methods¶
shouldCompareWhenRankingYieldingAZeroReturnTheCrowdingDistanceValue¶
-
public void
shouldCompareWhenRankingYieldingAZeroReturnTheCrowdingDistanceValue
()¶
shouldCompareWithANullSolutionAsFirstArgumentReturnOne¶
-
public void
shouldCompareWithANullSolutionAsFirstArgumentReturnOne
()¶
shouldCompareWithANullSolutionAsSecondArgumentReturnMinusOne¶
-
public void
shouldCompareWithANullSolutionAsSecondArgumentReturnMinusOne
()¶
shouldCompareWithNullRankingAttributeSolutionAsFirstArgumentReturnOne¶
-
public void
shouldCompareWithNullRankingAttributeSolutionAsFirstArgumentReturnOne
()¶
RankingComparator¶
-
public class
RankingComparator
<S extends Solution<?>> implements Comparator<S>, Serializable¶ Author: Antonio J. Nebro This class implements a comparator based on the rank of the solutions.
Methods¶
compare¶
-
public int
compare
(S solution1, S solution2)¶ Compares two solutions according to the ranking attribute. The lower the ranking the better
Parameters: - solution1 – Object representing the first solution.
- solution2 – Object representing the second solution.
Returns: -1, or 0, or 1 if o1 is less than, equal, or greater than o2, respectively.
RankingComparatorTest¶
-
public class
RankingComparatorTest
¶ Author: Antonio J. Nebro
Methods¶
shouldCompareReturnMinusOneIfSolutionAHasLessRanking¶
-
public void
shouldCompareReturnMinusOneIfSolutionAHasLessRanking
()¶
shouldCompareReturnMinusOneIfTheSecondSolutionIsNull¶
-
public void
shouldCompareReturnMinusOneIfTheSecondSolutionIsNull
()¶
shouldCompareReturnOneIfSolutionBHasLessRanking¶
-
public void
shouldCompareReturnOneIfSolutionBHasLessRanking
()¶
shouldCompareReturnOneIfTheFirstSolutionIsNull¶
-
public void
shouldCompareReturnOneIfTheFirstSolutionIsNull
()¶
shouldCompareReturnZeroIfBothSolutionsAreNull¶
-
public void
shouldCompareReturnZeroIfBothSolutionsAreNull
()¶
StrengthFitnessComparator¶
-
public class
StrengthFitnessComparator
<S extends Solution<?>> implements Comparator<S>, Serializable¶ Author: Juan J. Durillo
Parameters: - <S> –
org.uma.jmetal.util.comparator.impl¶
OverallConstraintViolationComparator¶
-
public class
OverallConstraintViolationComparator
<S extends Solution<?>> implements ConstraintViolationComparator<S>¶ This class implements a
Comparator
(a method for comparingSolution
objects) based on the overall constraint violation of the solutions, as done in NSGA-II.Author: Antonio J. Nebro
Constructors¶
Methods¶
compare¶
-
public int
compare
(S solution1, S solution2)¶ Compares two solutions. If the solutions has no constraints the method return 0
Parameters: - solution1 – Object representing the first
Solution
. - solution2 – Object representing the second
Solution
.
Returns: -1, or 0, or 1 if o1 is less than, equal, or greater than o2, respectively.
- solution1 – Object representing the first
ViolationThresholdComparator¶
-
public class
ViolationThresholdComparator
<S extends Solution<?>> implements ConstraintViolationComparator<S>¶ This class implements the ViolationThreshold Comparator *
Author: Juan J. Durillo
Methods¶
compare¶
-
public int
compare
(S solution1, S solution2)¶ Compares two solutions. If the solutions has no constraints the method return 0
Parameters: - solution1 – Object representing the first
Solution
. - solution2 – Object representing the second
Solution
.
Returns: -1, or 0, or 1 if o1 is less than, equal, or greater than o2, respectively.
- solution1 – Object representing the first
feasibilityRatio¶
meanOverallViolation¶
org.uma.jmetal.util.distance¶
org.uma.jmetal.util.distance.impl¶
CosineDistanceBetweenSolutionsInObjectiveSpace¶
-
public class
CosineDistanceBetweenSolutionsInObjectiveSpace
<S extends Solution<?>> implements Distance<S, S>¶ Class for calculating the cosine distance between two
Solution
objects in objective space.Author:
Constructors¶
CosineDistanceBetweenSolutionsInObjectiveSpaceTest¶
-
public class
CosineDistanceBetweenSolutionsInObjectiveSpaceTest
¶ Created by ajnebro on 12/2/16.
EuclideanDistanceBetweenSolutionAndASolutionListInObjectiveSpace¶
-
public class
EuclideanDistanceBetweenSolutionAndASolutionListInObjectiveSpace
<S extends Solution<Double>, L extends List<S>> implements Distance<S, L>¶ Class for calculating the Euclidean distance between a
Solution
object a list ofSolution
objects in objective space.Author:
Constructors¶
EuclideanDistanceBetweenSolutionsInObjectiveSpace¶
EuclideanDistanceBetweenSolutionsInSolutionSpace¶
-
public class
EuclideanDistanceBetweenSolutionsInSolutionSpace
<S extends Solution<Double>> implements Distance<S, S>¶ Class for calculating the Euclidean distance between two
DoubleSolution
objects in solution space.Author:
org.uma.jmetal.util.evaluator¶
org.uma.jmetal.util.evaluator.impl¶
MultithreadedSolutionListEvaluator¶
-
public class
MultithreadedSolutionListEvaluator
<S> implements SolutionListEvaluator<S>¶ Author: Antonio J. Nebro
Constructors¶
org.uma.jmetal.util.experiment¶
Experiment¶
-
public class
Experiment
<S extends Solution<?>, Result>¶ Class for describing the configuration of a jMetal experiment. Created by Antonio J. Nebro on 17/07/14.
Constructors¶
Experiment¶
-
public
Experiment
(ExperimentBuilder<S, Result> builder)¶ Constructor
Methods¶
getAlgorithmList¶
-
public List<ExperimentAlgorithm<S, Result>>
getAlgorithmList
()¶
getIndicatorList¶
-
public List<GenericIndicator<S>>
getIndicatorList
()¶
getProblemList¶
-
public List<ExperimentProblem<S>>
getProblemList
()¶
removeDuplicatedAlgorithms¶
-
public void
removeDuplicatedAlgorithms
()¶ The list of algorithms contain an algorithm instance per problem. This is not convenient for calculating statistical data, because a same algorithm will appear many times. This method remove duplicated algorithms and leave only an instance of each one.
setAlgorithmList¶
-
public void
setAlgorithmList
(List<ExperimentAlgorithm<S, Result>> algorithmList)¶
ExperimentBuilder¶
-
public class
ExperimentBuilder
<S extends Solution<?>, Result>¶ Builder for class
Experiment
Author: Antonio J. Nebro
Methods¶
build¶
-
public Experiment<S, Result>
build
()¶
getAlgorithmList¶
-
public List<ExperimentAlgorithm<S, Result>>
getAlgorithmList
()¶
getIndicatorList¶
-
public List<GenericIndicator<S>>
getIndicatorList
()¶
getProblemList¶
-
public List<ExperimentProblem<S>>
getProblemList
()¶
setAlgorithmList¶
-
public ExperimentBuilder<S, Result>
setAlgorithmList
(List<ExperimentAlgorithm<S, Result>> algorithmList)¶
setExperimentBaseDirectory¶
-
public ExperimentBuilder<S, Result>
setExperimentBaseDirectory
(String experimentBaseDirectory)¶
setIndependentRuns¶
-
public ExperimentBuilder<S, Result>
setIndependentRuns
(int independentRuns)¶
setIndicatorList¶
-
public ExperimentBuilder<S, Result>
setIndicatorList
(List<GenericIndicator<S>> indicatorList)¶
setNumberOfCores¶
-
public ExperimentBuilder<S, Result>
setNumberOfCores
(int numberOfCores)¶
setOutputParetoFrontFileName¶
-
public ExperimentBuilder<S, Result>
setOutputParetoFrontFileName
(String outputParetoFrontFileName)¶
setOutputParetoSetFileName¶
-
public ExperimentBuilder<S, Result>
setOutputParetoSetFileName
(String outputParetoSetFileName)¶
setProblemList¶
-
public ExperimentBuilder<S, Result>
setProblemList
(List<ExperimentProblem<S>> problemList)¶
setReferenceFrontDirectory¶
-
public ExperimentBuilder<S, Result>
setReferenceFrontDirectory
(String referenceFrontDirectory)¶
org.uma.jmetal.util.experiment.component¶
ComputeQualityIndicators¶
-
public class
ComputeQualityIndicators
<S extends Solution<?>, Result> implements ExperimentComponent¶ This class computes the
QualityIndicator
s of an experiment. Once the algorithms of an experiment have been executed through running an instance of classExecuteAlgorithms
, the list of indicators in obtained from the#getIndicatorsList()
method. Then, for every combination algorithm + problem, the indicators are applied to all the FUN files and the resulting values are store in a file called as#getName()
, which is located in the same directory of the FUN files.Author: Antonio J. Nebro
Constructors¶
ComputeQualityIndicators¶
-
public
ComputeQualityIndicators
(Experiment<S, Result> experiment)¶
ExecuteAlgorithms¶
-
public class
ExecuteAlgorithms
<S extends Solution<?>, Result> implements ExperimentComponent¶ This class executes the algorithms the have been configured with a instance of class
Experiment
. Java 8 parallel streams are used to run the algorithms in parallel.The result of the execution is a pair of files FUNrunId.tsv and VARrunID.tsv per experiment, which are stored in the directory
#getExperimentBaseDirectory()
/algorithmName/problemName.Author: Antonio J. Nebro
Constructors¶
ExecuteAlgorithms¶
-
public
ExecuteAlgorithms
(Experiment<S, Result> configuration)¶ Constructor
GenerateBoxplotsWithR¶
-
public class
GenerateBoxplotsWithR
<Result> implements ExperimentComponent¶ This class generates a R script that generates an eps file containing boxplots The results are a set of R files that are written in the directory
#getExperimentBaseDirectory()
/R. Each file is called as indicatorName.Wilcoxon.R To run the R script: Rscript indicatorName.Wilcoxon.R To generate the resulting Latex file: pdflatex indicatorName.Wilcoxon.texAuthor: Antonio J. Nebro
Constructors¶
GenerateBoxplotsWithR¶
-
public
GenerateBoxplotsWithR
(Experiment<?, Result> experimentConfiguration)¶
Methods¶
setColumns¶
-
public GenerateBoxplotsWithR<Result>
setColumns
(int columns)¶
setDisplayNotch¶
-
public GenerateBoxplotsWithR<Result>
setDisplayNotch
()¶
setRows¶
-
public GenerateBoxplotsWithR<Result>
setRows
(int rows)¶
GenerateFriedmanTestTables¶
-
public class
GenerateFriedmanTestTables
<Result> implements ExperimentComponent¶ This class computes the Friedman test ranking and generates a Latex script that produces a table per quality indicator containing the ranking The results are a set of Latex files that are written in the directory
#getExperimentBaseDirectory()
/latex. Each file is called as FriedmanTest[indicatorName].tex The implementation is based on the one included in Keel: J. Alcalá-Fdez, L. Sánchez, S. García, M.J. del Jesus, S. Ventura, J.M. Garrell, J. Otero, C. Romero, J. Bacardit, V.M. Rivas, J.C. Fernández, F. Herrera. KEEL: A Software Tool to Assess Evolutionary Algorithms to Data Mining Problems. Soft Computing 13:3 (2009) 307-318 Doi: 10.1007/s00500-008-0323-yAuthor: Antonio J. Nebro
Constructors¶
GenerateFriedmanTestTables¶
-
public
GenerateFriedmanTestTables
(Experiment<?, Result> experimentConfiguration)¶
GenerateLatexTablesWithStatistics¶
-
public class
GenerateLatexTablesWithStatistics
implements ExperimentComponent¶ This class computes a number of statistical values (mean, median, standard deviation, interquartile range) from the indicator files generated after executing
ExecuteAlgorithms
andComputeQualityIndicators
. After reading the data files and calculating the values, a Latex file is created containing an script that generates tables with the best and second best values per indicator. The name of the file is#getExperimentName()
.tex, which is located by default in the directory#getExperimentBaseDirectory()
/latex Although the maximum, minimum, and total number of items are also computed, no tables are generated with them (this is a pending work).Author: Antonio J. Nebro
Constructors¶
GenerateLatexTablesWithStatistics¶
-
public
GenerateLatexTablesWithStatistics
(Experiment<?, ?> configuration)¶
GenerateReferenceParetoFront¶
-
public class
GenerateReferenceParetoFront
implements ExperimentComponent¶ This class computes a reference Pareto front from a set of files. Once the algorithms of an experiment have been executed through running an instance of class
ExecuteAlgorithms
, all the obtained fronts of all the algorithms are gathered per problem; then, the dominated solutions are removed and the final result is a file per problem containing the reference Pareto front. By default, the files are stored in a directory called “referenceFront”, which is located in the experiment base directory. Each front is named following the scheme “problemName.rf”.Author: Antonio J. Nebro
Constructors¶
GenerateReferenceParetoFront¶
-
public
GenerateReferenceParetoFront
(Experiment<?, ?> experimentConfiguration)¶
GenerateReferenceParetoSetAndFrontFromDoubleSolutions¶
-
public class
GenerateReferenceParetoSetAndFrontFromDoubleSolutions
implements ExperimentComponent¶ This class computes the reference Pareto set and front from a set of data files containing the variable (VARx.tsv file) and objective (FUNx.tsv) values. A requirement is that the variable values MUST correspond to
DoubleSolution
solutions, i.e., the solved problems must be instances ofDoubleProblem
. Once the algorithms of an experiment have been executed through running an instance of classExecuteAlgorithms
, all the obtained fronts of all the algorithms are gathered per problem; then, the dominated solutions are removed thus yielding to the reference Pareto front. By default, the files are stored in a directory called “referenceFront”, which is located in the experiment base directory. The following files are generated per problem: - “problemName.pf”: the reference Pareto front. - “problemName.ps”: the reference Pareto set (i.e., the variable values of the solutions of the reference Pareto front. - “problemName.algorithmName.pf”: the objectives values of the contributed solutions by the algorithm called “algorithmName” to “problemName.pf” - “problemName.algorithmName.ps”: the variable values of the contributed solutions by the algorithm called “algorithmName” to “problemName.ps”Author: Antonio J. Nebro
Constructors¶
GenerateReferenceParetoSetAndFrontFromDoubleSolutions¶
-
public
GenerateReferenceParetoSetAndFrontFromDoubleSolutions
(Experiment<?, ?> experimentConfiguration)¶
GenerateWilcoxonTestTablesWithR¶
-
public class
GenerateWilcoxonTestTablesWithR
<Result> implements ExperimentComponent¶ This class generates a R script that computes the Wilcoxon Signed Rank Test and generates a Latex script that produces a table per quality indicator containing the pairwise comparison between all the algorithms on all the solved problems. The results are a set of R files that are written in the directory
#getExperimentBaseDirectory()
/R. Each file is called as indicatorName.Wilcoxon.R To run the R script: Rscript indicatorName.Wilcoxon.R To generate the resulting Latex file: pdflatex indicatorName.Wilcoxon.texAuthor: Antonio J. Nebro
Constructors¶
GenerateWilcoxonTestTablesWithR¶
-
public
GenerateWilcoxonTestTablesWithR
(Experiment<?, Result> experimentConfiguration)¶
org.uma.jmetal.util.experiment.util¶
ExperimentAlgorithm¶
-
public class
ExperimentAlgorithm
<S extends Solution<?>, Result>¶ Class defining tasks for the execution of algorithms in parallel.
Author: Antonio J. Nebro
Constructors¶
ExperimentAlgorithm¶
-
public
ExperimentAlgorithm
(Algorithm<Result> algorithm, String algorithmTag, ExperimentProblem<S> problem, int runId)¶ Constructor
ExperimentAlgorithm¶
-
public
ExperimentAlgorithm
(Algorithm<Result> algorithm, ExperimentProblem<S> problem, int runId)¶
Methods¶
runAlgorithm¶
-
public void
runAlgorithm
(Experiment<?, ?> experimentData)¶
org.uma.jmetal.util.extremevalues¶
org.uma.jmetal.util.extremevalues.impl¶
org.uma.jmetal.util.fileinput.util¶
org.uma.jmetal.util.fileoutput¶
FileOutputContext¶
-
public interface
FileOutputContext
extends Serializable¶ This interface represents output contexts, which are classes providing a mean for getting a buffer reader object.
Author: Antonio J. Nebro
SolutionListOutput¶
-
public class
SolutionListOutput
¶ Author: Antonio J. Nebro
Constructors¶
Methods¶
printObjectivesToFile¶
-
public void
printObjectivesToFile
(FileOutputContext context, List<? extends Solution<?>> solutionList)¶
printObjectivesToFile¶
printObjectivesToFile¶
printVariablesToFile¶
-
public void
printVariablesToFile
(FileOutputContext context, List<? extends Solution<?>> solutionList)¶
setFunFileOutputContext¶
-
public SolutionListOutput
setFunFileOutputContext
(FileOutputContext fileContext)¶
setObjectiveMinimizingObjectiveList¶
-
public SolutionListOutput
setObjectiveMinimizingObjectiveList
(List<Boolean> isObjectiveToBeMinimized)¶
setSeparator¶
-
public SolutionListOutput
setSeparator
(String separator)¶
setVarFileOutputContext¶
-
public SolutionListOutput
setVarFileOutputContext
(FileOutputContext fileContext)¶
org.uma.jmetal.util.fileoutput.impl¶
DefaultFileOutputContext¶
-
public class
DefaultFileOutputContext
implements FileOutputContext¶ Class using the default method for getting a buffered writer
Author: Antonio J. Nebro
org.uma.jmetal.util.front¶
Front¶
-
public interface
Front
extends Serializable¶ A front is a list of points
Author: Antonio J. Nebro
org.uma.jmetal.util.front.imp¶
ArrayFront¶
-
public class
ArrayFront
implements Front¶ This class implements the
Front
interface by using an array ofPoint
objectsAuthor: Antonio J. Nebro
Constructors¶
Methods¶
ArrayFrontTest¶
-
public class
ArrayFrontTest
¶ Author: Antonio J. Nebro
Methods¶
shouldConstructorCreateAnArranFrontFromAFileContainingA2DFront¶
-
public void
shouldConstructorCreateAnArranFrontFromAFileContainingA2DFront
()¶
shouldConstructorCreateAnArranFrontFromAFileContainingA3DFront¶
-
public void
shouldConstructorCreateAnArranFrontFromAFileContainingA3DFront
()¶
shouldCreateAnArrayFrontFromAListOfSolutionsHavingOneDoubleSolutionObject¶
-
public void
shouldCreateAnArrayFrontFromAListOfSolutionsHavingOneDoubleSolutionObject
()¶
shouldCreateAnArrayFrontFromAListOfSolutionsHavingOneSingleSolutionObject¶
-
public void
shouldCreateAnArrayFrontFromAListOfSolutionsHavingOneSingleSolutionObject
()¶
shouldCreateAnArrayFrontFromAListOfSolutionsHavingTwoDoubleSolutionObject¶
-
public void
shouldCreateAnArrayFrontFromAListOfSolutionsHavingTwoDoubleSolutionObject
()¶
shouldCreateAnArrayFrontFromANullFrontRaiseAnException¶
-
public void
shouldCreateAnArrayFrontFromANullFrontRaiseAnException
()¶
shouldCreateAnArrayFrontFromANullListRaiseAnAnException¶
-
public void
shouldCreateAnArrayFrontFromANullListRaiseAnAnException
()¶
shouldCreateAnArrayFrontFromASolutionListResultInTwoEqualsFronts¶
-
public void
shouldCreateAnArrayFrontFromASolutionListResultInTwoEqualsFronts
()¶
shouldCreateAnArrayFrontFromAnEmptyFrontRaiseAnException¶
-
public void
shouldCreateAnArrayFrontFromAnEmptyFrontRaiseAnException
()¶
shouldCreateAnArrayFrontFromAnEmptyListRaiseAnException¶
-
public void
shouldCreateAnArrayFrontFromAnEmptyListRaiseAnException
()¶
shouldCreateAnArrayFrontFromAnotherFrontResultInTwoEqualsFrontssss¶
-
public void
shouldCreateAnArrayFrontFromAnotherFrontResultInTwoEqualsFrontssss
()¶
shouldCreateInputStreamThrownAnExceptionIfFileDoesNotExist¶
-
public void
shouldCreateInputStreamThrownAnExceptionIfFileDoesNotExist
()¶
shouldDefaultConstructorCreateAnEmptyArrayFront¶
-
public void
shouldDefaultConstructorCreateAnEmptyArrayFront
()¶
shouldEqualsReturnFalseIfPointDimensionsOfTheFrontsIsDifferent¶
-
public void
shouldEqualsReturnFalseIfPointDimensionsOfTheFrontsIsDifferent
()¶
shouldEqualsReturnFalseIfTheArgumentIsFromAWrongClass¶
-
public void
shouldEqualsReturnFalseIfTheArgumentIsFromAWrongClass
()¶
shouldEqualsReturnFalseIfTheArgumentIsNull¶
-
public void
shouldEqualsReturnFalseIfTheArgumentIsNull
()¶
shouldEqualsReturnFalseIfTheComparedFrontHasADifferentNumberOfPoints¶
-
public void
shouldEqualsReturnFalseIfTheComparedFrontHasADifferentNumberOfPoints
()¶
shouldEqualsReturnFalseIfTheFrontsAreDifferent¶
-
public void
shouldEqualsReturnFalseIfTheFrontsAreDifferent
()¶
shouldEqualsReturnTrueIfTheArgumentIsEqual¶
-
public void
shouldEqualsReturnTrueIfTheArgumentIsEqual
()¶
shouldEqualsReturnTrueIfTheArgumentIsTheSameObject¶
-
public void
shouldEqualsReturnTrueIfTheArgumentIsTheSameObject
()¶
shouldGetPointRaiseAnExceptionWhenTheIndexIsGreaterThanTheFrontSize¶
-
public void
shouldGetPointRaiseAnExceptionWhenTheIndexIsGreaterThanTheFrontSize
()¶
shouldGetPointRaiseAnExceptionWhenTheIndexIsNegative¶
-
public void
shouldGetPointRaiseAnExceptionWhenTheIndexIsNegative
()¶
shouldReadFrontAFileWithOnePointCreateTheCorrectFront¶
-
public void
shouldReadFrontAFileWithOnePointCreateTheCorrectFront
()¶ Test using a file containing: 1.0 2.0 -3.0
shouldReadFrontAnEmptyFileCreateAnEmptyFront¶
-
public void
shouldReadFrontAnEmptyFileCreateAnEmptyFront
()¶
shouldReadFrontFourPointsCreateTheCorrectFront¶
-
public void
shouldReadFrontFourPointsCreateTheCorrectFront
()¶ Test using a file containing: 1 2 3 4 5 6 7 8 9 10 11 12 -1 -2 -3 -4
shouldReadFrontWithALineContainingWrongDataRaiseAnException¶
-
public void
shouldReadFrontWithALineContainingWrongDataRaiseAnException
()¶ Test using a file containing: 3.0 2.3 asdfg
shouldReadFrontWithALineWithALineMissingDataRaiseAnException¶
-
public void
shouldReadFrontWithALineWithALineMissingDataRaiseAnException
()¶ Test using a file containing: -30 234.234 90.25 15 -5.23
shouldSetPointRaiseAnExceptionWhenTheIndexIsGreaterThanTheFrontSize¶
-
public void
shouldSetPointRaiseAnExceptionWhenTheIndexIsGreaterThanTheFrontSize
()¶
shouldSetPointRaiseAnExceptionWhenTheIndexIsNegative¶
-
public void
shouldSetPointRaiseAnExceptionWhenTheIndexIsNegative
()¶
FrontUtilsTest¶
-
public class
FrontUtilsTest
¶ Author: Antonio J. Nebro
Methods¶
shouldConvertFrontToArrayRaiseAnExceptionIfTheFrontIsNull¶
-
public void
shouldConvertFrontToArrayRaiseAnExceptionIfTheFrontIsNull
()¶
shouldConvertFrontToArrayReturnAnEmptyArrayIfTheFrontIsEmpty¶
-
public void
shouldConvertFrontToArrayReturnAnEmptyArrayIfTheFrontIsEmpty
()¶
shouldConvertFrontToArrayReturnTheCorrectArrayCaseA¶
-
public void
shouldConvertFrontToArrayReturnTheCorrectArrayCaseA
()¶ Case A: The front has one point
shouldConvertFrontToArrayReturnTheCorrectArrayCaseB¶
-
public void
shouldConvertFrontToArrayReturnTheCorrectArrayCaseB
()¶ Case A: The front has one three points
shouldConvertFrontToSolutionListRaiseAnExceptionIfTheFrontIsNull¶
-
public void
shouldConvertFrontToSolutionListRaiseAnExceptionIfTheFrontIsNull
()¶
shouldConvertFrontToSolutionListReturnAnEmptyListIfTheFrontIsEmpty¶
-
public void
shouldConvertFrontToSolutionListReturnAnEmptyListIfTheFrontIsEmpty
()¶
shouldConvertFrontToSolutionListReturnTheCorrectListCaseA¶
-
public void
shouldConvertFrontToSolutionListReturnTheCorrectListCaseA
()¶ Case A: The front has one point
shouldConvertFrontToSolutionListReturnTheCorrectListCaseB¶
-
public void
shouldConvertFrontToSolutionListReturnTheCorrectListCaseB
()¶ Case A: The front has one three points
shouldDistanceToClosestPointRaiseAnExceptionIfTheFrontIsEmpty¶
-
public void
shouldDistanceToClosestPointRaiseAnExceptionIfTheFrontIsEmpty
()¶
shouldDistanceToClosestPointRaiseAnExceptionIfTheFrontIsNull¶
-
public void
shouldDistanceToClosestPointRaiseAnExceptionIfTheFrontIsNull
()¶
shouldDistanceToClosestPointRaiseAnExceptionIfThePointIsNull¶
-
public void
shouldDistanceToClosestPointRaiseAnExceptionIfThePointIsNull
()¶
shouldDistanceToClosestPointReturnMaxZeroIfThePointIsTheOnlyPointInTheFront¶
-
public void
shouldDistanceToClosestPointReturnMaxZeroIfThePointIsTheOnlyPointInTheFront
()¶
shouldDistanceToClosestPointReturnTheCorrectValueIfTheFrontHasHasOnePoint¶
-
public void
shouldDistanceToClosestPointReturnTheCorrectValueIfTheFrontHasHasOnePoint
()¶
shouldDistanceToNearestPointClosestTheCorrectValueIfTheFrontHasTwoPointsCaseA¶
-
public void
shouldDistanceToNearestPointClosestTheCorrectValueIfTheFrontHasTwoPointsCaseA
()¶ Case A: the front has two points and one of them is the point passed as a parameter
shouldDistanceToNearestPointClosestTheCorrectValueIfTheFrontHasTwoPointsCaseB¶
-
public void
shouldDistanceToNearestPointClosestTheCorrectValueIfTheFrontHasTwoPointsCaseB
()¶ Case B: the front has two points and none of them is the point passed as a parameter. The dimensions of the points are ordered
shouldDistanceToNearestPointClosestTheCorrectValueIfTheFrontHasTwoPointsCaseC¶
-
public void
shouldDistanceToNearestPointClosestTheCorrectValueIfTheFrontHasTwoPointsCaseC
()¶ Case B: the front has two points and none of them is the point passed as a parameter. The dimensions of the points are not ordered
shouldDistanceToNearestPointRaiseAnExceptionIfTheFrontIsEmpty¶
-
public void
shouldDistanceToNearestPointRaiseAnExceptionIfTheFrontIsEmpty
()¶
shouldDistanceToNearestPointRaiseAnExceptionIfTheFrontIsNull¶
-
public void
shouldDistanceToNearestPointRaiseAnExceptionIfTheFrontIsNull
()¶
shouldDistanceToNearestPointRaiseAnExceptionIfThePointIsNull¶
-
public void
shouldDistanceToNearestPointRaiseAnExceptionIfThePointIsNull
()¶
shouldDistanceToNearestPointReturnMaxDoubleIfThePointIsTheOnlyPointInTheFront¶
-
public void
shouldDistanceToNearestPointReturnMaxDoubleIfThePointIsTheOnlyPointInTheFront
()¶
shouldDistanceToNearestPointReturnTheCorrectValueIfTheFrontHasHasOnePoint¶
-
public void
shouldDistanceToNearestPointReturnTheCorrectValueIfTheFrontHasHasOnePoint
()¶
shouldDistanceToNearestPointReturnTheCorrectValueIfTheFrontHasTwoPointsCaseA¶
-
public void
shouldDistanceToNearestPointReturnTheCorrectValueIfTheFrontHasTwoPointsCaseA
()¶ Case A: the front has two points and one of them is the point passed as a parameter
shouldGetInvertedFrontRaiseAnExceptionIfTheFrontIsEmpty¶
-
public void
shouldGetInvertedFrontRaiseAnExceptionIfTheFrontIsEmpty
()¶
shouldGetInvertedFrontRaiseAnExceptionIfTheFrontIsNull¶
-
public void
shouldGetInvertedFrontRaiseAnExceptionIfTheFrontIsNull
()¶
shouldGetInvertedFrontReturnTheCorrectFrontIfItComposedOfFourPoints¶
-
public void
shouldGetInvertedFrontReturnTheCorrectFrontIfItComposedOfFourPoints
()¶ The front has the points [0.1, 0.9], [0.2, 0.8], [0.3, 0.7], [0.4, 0.6]. The inverted front is [0.9, 0.1], [0.8, 0.2], [0.7, 0.3], [0.6, 0.4]
shouldGetInvertedFrontReturnTheCorrectFrontIfItComposedOfOnePointCaseA¶
-
public void
shouldGetInvertedFrontReturnTheCorrectFrontIfItComposedOfOnePointCaseA
()¶ Case A: the front has the point [0.5, 0.5]. The inverted front is the same
shouldGetInvertedFrontReturnTheCorrectFrontIfItComposedOfOnePointCaseB¶
-
public void
shouldGetInvertedFrontReturnTheCorrectFrontIfItComposedOfOnePointCaseB
()¶ Case B: the front has the point [0.0, 1.0]. The inverted front is [1.0, 0.0]
shouldGetInvertedFrontReturnTheCorrectFrontIfItComposedOfOnePointCaseC¶
-
public void
shouldGetInvertedFrontReturnTheCorrectFrontIfItComposedOfOnePointCaseC
()¶ Case C: the front has the point [3.0, -2.0]. The inverted front is [0.0, 1.0]
shouldGetMaximumValuesRaiseAnExceptionIfTheFrontIsEmpty¶
-
public void
shouldGetMaximumValuesRaiseAnExceptionIfTheFrontIsEmpty
()¶
shouldGetMaximumValuesRaiseAnExceptionIfTheFrontIsNull¶
-
public void
shouldGetMaximumValuesRaiseAnExceptionIfTheFrontIsNull
()¶
shouldGetMaximumValuesWithAFrontWithOnePointReturnTheCorrectValue¶
-
public void
shouldGetMaximumValuesWithAFrontWithOnePointReturnTheCorrectValue
()¶
shouldGetMaximumValuesWithAFrontWithThreePointReturnTheCorrectValue¶
-
public void
shouldGetMaximumValuesWithAFrontWithThreePointReturnTheCorrectValue
()¶
shouldGetMinimumValuesRaiseAnExceptionIfTheFrontIsEmpty¶
-
public void
shouldGetMinimumValuesRaiseAnExceptionIfTheFrontIsEmpty
()¶
shouldGetMinimumValuesRaiseAnExceptionIfTheFrontIsNull¶
-
public void
shouldGetMinimumValuesRaiseAnExceptionIfTheFrontIsNull
()¶
org.uma.jmetal.util.front.util¶
FrontNormalizerTest¶
-
public class
FrontNormalizerTest
¶ Author: Antonio J. Nebro
Methods¶
shouldFrontNormalizerConstructorRaiseAnExceptionIsTheReferenceFrontIsNull¶
-
public void
shouldFrontNormalizerConstructorRaiseAnExceptionIsTheReferenceFrontIsNull
()¶
shouldFrontNormalizerConstructorRaiseAnExceptionIsTheReferenceSolutionListIsNull¶
-
public void
shouldFrontNormalizerConstructorRaiseAnExceptionIsTheReferenceSolutionListIsNull
()¶
shouldFrontNormalizerConstructorRaiseAnExceptionIsTheVectorOfMaximumValuesIsNull¶
-
public void
shouldFrontNormalizerConstructorRaiseAnExceptionIsTheVectorOfMaximumValuesIsNull
()¶
shouldFrontNormalizerConstructorRaiseAnExceptionIsTheVectorOfMinimumValuesIsNull¶
-
public void
shouldFrontNormalizerConstructorRaiseAnExceptionIsTheVectorOfMinimumValuesIsNull
()¶
shouldFrontNormalizerContructorRaiseAnExceptionTheDimensionOfTheMaximumAndMinimumArrayIsNotEqual¶
-
public void
shouldFrontNormalizerContructorRaiseAnExceptionTheDimensionOfTheMaximumAndMinimumArrayIsNotEqual
()¶
shouldGetNormalizedFrontReturnTheCorrectFrontIfTheSolutionListContainsTwoPoints¶
-
public void
shouldGetNormalizedFrontReturnTheCorrectFrontIfTheSolutionListContainsTwoPoints
()¶ Points: [2,4], [-2, 3] Maximum values: [6, 8] Minimum values: [-10, 1] Result: [0.5, 1.0], []
shouldGetNormalizedFrontReturnTheCorrectFrontIfThisContainsTwoPoints¶
-
public void
shouldGetNormalizedFrontReturnTheCorrectFrontIfThisContainsTwoPoints
()¶ Points: [2,4], [-2, 3] Maximum values: [6, 8] Minimum values: [-10, 1] Result: [0.5, 1.0], []
shouldNormalizeRaiseAnExceptionIfTheFrontIsEmpty¶
-
public void
shouldNormalizeRaiseAnExceptionIfTheFrontIsEmpty
()¶
shouldNormalizeRaiseAnExceptionIfTheMaxAndMinValuesAreTheSame¶
-
public void
shouldNormalizeRaiseAnExceptionIfTheMaxAndMinValuesAreTheSame
()¶ Point: [2,4] Maximum values: [2, 4] Minimum values: [2, 4] Result: [0.5, 1.0]
shouldNormalizeRaiseAnExceptionIfTheSolutionListIsEmpty¶
-
public void
shouldNormalizeRaiseAnExceptionIfTheSolutionListIsEmpty
()¶
shouldNormalizeRaiseAnExceptionTheDimensionOfTheMaximumArrayPointsIsNotCorrect¶
-
public void
shouldNormalizeRaiseAnExceptionTheDimensionOfTheMaximumArrayPointsIsNotCorrect
()¶
shouldNormalizeRaiseAnExceptionTheFrontIsNull¶
-
public void
shouldNormalizeRaiseAnExceptionTheFrontIsNull
()¶
FrontUtils¶
-
public class
FrontUtils
¶ A Front is a list of points. This class includes utilities to work with
Front
objects.Author: Antonio J. Nebro
Methods¶
convertFrontToArray¶
convertFrontToSolutionList¶
-
public static List<PointSolution>
convertFrontToSolutionList
(Front front)¶ Given a front, converts it to a Solution set of PointSolutions
Parameters: - front –
Returns: A front as a List
distanceToClosestPoint¶
-
public static double
distanceToClosestPoint
(Point point, Front front)¶ Gets the distance between a point and the nearest one in a given front. The Euclidean distance is assumed
Parameters: - point – The point
- front – The front that contains the other points to calculate the distances
Returns: The minimum distance between the point and the front
distanceToClosestPoint¶
-
public static double
distanceToClosestPoint
(Point point, Front front, PointDistance distance)¶ Gets the distance between a point and the nearest one in a given front
Parameters: - point – The point
- front – The front that contains the other points to calculate the distances
Returns: The minimum distance between the point and the front
distanceToNearestPoint¶
-
public static double
distanceToNearestPoint
(Point point, Front front)¶ Gets the distance between a point and the nearest one in a front. If a distance equals to 0 is found, that means that the point is in the front, so it is excluded
Parameters: - point – The point
- front – The front that contains the other points to calculate the distances
Returns: The minimum distance between the point and the front
distanceToNearestPoint¶
-
public static double
distanceToNearestPoint
(Point point, Front front, PointDistance distance)¶ Gets the distance between a point and the nearest one in a front. If a distance equals to 0 is found, that means that the point is in the front, so it is excluded
Parameters: - point – The point
- front – The front that contains the other points to calculate the distances
Returns: The minimum distance between the point and the front
getInvertedFront¶
getMaximumValues¶
org.uma.jmetal.util.naming¶
DescribedEntity¶
-
public interface
DescribedEntity
¶ A
DescribedEntity
is identified through its name (getName()
) and further detailed through its description (getDescription()
).Author: Matthieu Vergne
Methods¶
getDescription¶
-
public String
getDescription
()¶ Returns: the description of the DescribedEntity
getName¶
-
public String
getName
()¶ Returns: the name of the DescribedEntity
org.uma.jmetal.util.naming.impl¶
DescribedEntitySet¶
-
public class
DescribedEntitySet
<Entity extends DescribedEntity> implements Set<Entity>¶
Methods¶
DescribedEntitySetTest¶
-
public class
DescribedEntitySetTest
¶
SimpleDescribedEntity¶
-
public class
SimpleDescribedEntity
implements DescribedEntity¶ SimpleDescribedEntity
is a basic implementation ofDescribedEntity
. It provides a basic support for the most generic properties required by this interface.Author: Matthieu Vergne
Constructors¶
SimpleDescribedEntity¶
-
public
SimpleDescribedEntity
(String name, String description)¶ Create a
SimpleDescribedEntity
with a given name and a given description.Parameters: - name – the name of the
DescribedEntity
- description – the description of the
DescribedEntity
- name – the name of the
SimpleDescribedEntity¶
-
public
SimpleDescribedEntity
(String name)¶ Create a
SimpleDescribedEntity
with a given name and anull
description.Parameters: - name – the name of the
DescribedEntity
- name – the name of the
SimpleDescribedEntity¶
-
public
SimpleDescribedEntity
()¶ Create a
SimpleDescribedEntity
with the class name as its name and anull
description.
Methods¶
setDescription¶
-
public void
setDescription
(String description)¶ Parameters: - description – the new description of this
DescribedEntity
- description – the new description of this
setName¶
-
public void
setName
(String name)¶ Parameters: - name – the new name of this
DescribedEntity
- name – the new name of this
SimpleDescribedEntityTest.TestedClass¶
-
class
TestedClass
extends SimpleDescribedEntity¶
org.uma.jmetal.util.neighborhood¶
org.uma.jmetal.util.neighborhood.impl¶
AdaptiveRandomNeighborhood¶
-
public class
AdaptiveRandomNeighborhood
<S> implements Neighborhood<S>¶ This class implements the adaptive random neighborhood (topology) defined by M. Clerc. Each solution in a solution list must have a neighborhood composed by it itself and K random selected neighbors (the same solution can be chosen several times).
Author: Antonio J. Nebro
Constructors¶
AdaptiveRandomNeighborhood¶
-
public
AdaptiveRandomNeighborhood
(int solutionListSize, int numberOfRandomNeighbours)¶ Constructor
Parameters: - solutionListSize – The expected size of the list of solutions
- numberOfRandomNeighbours – The number of neighbors per solution
AdaptiveRandomNeighborhood¶
-
public
AdaptiveRandomNeighborhood
(int solutionListSize, int numberOfRandomNeighbours, BoundedRandomGenerator<Integer> randomGenerator)¶ Constructor
Parameters: - solutionListSize – The expected size of the list of solutions
- numberOfRandomNeighbours – The number of neighbors per solution
- randomGenerator – the
BoundedRandomGenerator
to use for the randomisation
AdaptiveRandomNeighborhoodTest¶
-
public class
AdaptiveRandomNeighborhoodTest
¶ Author: Antonio J. Nebro
Methods¶
shouldConstructorCreateAnInstanceIfTheParamtersAreValid¶
-
public void
shouldConstructorCreateAnInstanceIfTheParamtersAreValid
()¶
shouldConstructorThrowAnExceptionWhenTheNumberOfNeighboursIsEqualThanTheListSize¶
-
public void
shouldConstructorThrowAnExceptionWhenTheNumberOfNeighboursIsEqualThanTheListSize
()¶
shouldConstructorThrowAnExceptionWhenTheNumberOfNeighboursIsGreaterThanTheListSize¶
-
public void
shouldConstructorThrowAnExceptionWhenTheNumberOfNeighboursIsGreaterThanTheListSize
()¶
shouldConstructorThrowAnExceptionWhenTheNumberOfNeighboursIsNegative¶
-
public void
shouldConstructorThrowAnExceptionWhenTheNumberOfNeighboursIsNegative
()¶
shouldGetNeighborsReturnThreeNeighborsPlusTheCurrentSolution¶
-
public void
shouldGetNeighborsReturnThreeNeighborsPlusTheCurrentSolution
()¶ Case 1 Solution list size: 3 Number of neighbors: 1 Neighbors: - solution 0: 0, 2 - solution 1: 1, 0 - solution 2: 2, 0
shouldGetNeighborsReturnTwoNeighborsPlusTheCurrentSolution¶
-
public void
shouldGetNeighborsReturnTwoNeighborsPlusTheCurrentSolution
()¶ Case 1 Solution list size: 4 Number of neighbors: 2
shouldGetNeighborsThrowAnExceptionIfTheListSizeIsNotCorrect¶
-
public void
shouldGetNeighborsThrowAnExceptionIfTheListSizeIsNotCorrect
()¶
shouldGetNeighborsWithANegativeSolutionIndexThrowAnException¶
-
public void
shouldGetNeighborsWithANegativeSolutionIndexThrowAnException
()¶
shouldGetNeighborsWithANullListOfSolutionsThrowAnException¶
-
public void
shouldGetNeighborsWithANullListOfSolutionsThrowAnException
()¶
C25¶
-
public class
C25
<S extends Solution<?>> extends TwoDimensionalMesh<S>¶ Class defining an C25 neighborhood of a solution belonging to a list of solutions which is structured as a bi-dimensional mesh. The neighbors are those solutions that are in 2-hop distance or less Shape: * * * * * * * * * * * * o * * * * * * * * * * * *
Author: Esteban López Camacho
C49¶
-
public class
C49
<S extends Solution<?>> extends TwoDimensionalMesh<S>¶ Class defining an C49 neighborhood of a solution belonging to a list of solutions which is structured as a bi-dimensional mesh. The neighbors are those solutions that are in 3-hop distance or less Shape: * * * * * * * * * * * * * * * * * * * * * * * * o * * * * * * * * * * * * * * * * * * * * * * * *
Author: Esteban López Camacho
C9¶
-
public class
C9
<S> extends TwoDimensionalMesh<S>¶ Class defining an L9 neighborhood of a solution belonging to a list of solutions which is structured as a bi-dimensional mesh. The neighbors are those solutions that are in 1-hop distance Shape: * * * * o * * * *
Author: Antonio J. Nebro , Juan J. Durillo
C9Test¶
-
public class
C9Test
¶ Created by ajnebro on 26/5/15.
Methods¶
shouldGetNeighborsReturnFourNeighborsCase1¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase1
()¶ Case 1 Solution list: 0 The solution location is 0, the neighborhood is 0
shouldGetNeighborsReturnFourNeighborsCase10¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase10
()¶ Case 10 Solution list: 0 1 2 3 4 5 6 7 8 9 10 11 The solution location is 5, the neighborhood is 0, 1, 2, 4, 6, 8, 9
shouldGetNeighborsReturnFourNeighborsCase11¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase11
()¶ Case 11 Solution list: 0 1 2 3 4 5 6 7 8 9 10 11 The solution location is 11, the neighborhood is 6, 7, 10, 3, 2, 8
shouldGetNeighborsReturnFourNeighborsCase2¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase2
()¶ Case 2 Solution list: 0 1 The solution location is 0, the neighborhood is 0, 1
shouldGetNeighborsReturnFourNeighborsCase3¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase3
()¶ Case 3 Solution list: 0 1 The solution location is 1, the neighborhood is 0, 1
shouldGetNeighborsReturnFourNeighborsCase4¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase4
()¶ Case 4 Solution list: 0 1 2 3 The solution location is 0, the neighborhood is 1, 2, 3
shouldGetNeighborsReturnFourNeighborsCase5¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase5
()¶ Case 5 Solution list: 0 1 2 3 The solution location is 1, the neighborhood is 0, 2, 3
shouldGetNeighborsReturnFourNeighborsCase6¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase6
()¶ Case 6 Solution list: 0 1 2 3 The solution location is 2, the neighborhood is 0, 1, 3
shouldGetNeighborsReturnFourNeighborsCase7¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase7
()¶ Case 7 Solution list: 0 1 2 3 The solution location is 3, the neighborhood is 0, 1, 2
KNearestNeighborhood¶
-
public class
KNearestNeighborhood
<S extends Solution<?>> implements Neighborhood<S>¶ This class implements a neighborhood that select the k-nearest solutions according to a distance measure. By default, the Euclidean distance between objectives is used.
Parameters: - <S> –
Constructors¶
KNearestNeighborhoodTest¶
-
public class
KNearestNeighborhoodTest
¶
Methods¶
shouldGetNeighborsWorkProperlyCaseA¶
-
public void
shouldGetNeighborsWorkProperlyCaseA
()¶ Case A: The solution list has two solutions and the neighbor size is 1
shouldGetNeighborsWorkProperlyCaseB¶
-
public void
shouldGetNeighborsWorkProperlyCaseB
()¶ Case B: The solution list has three solutions, the index of the solution is 0, and the neighbor size is 2
shouldGetNeighborsWorkProperlyCaseC¶
-
public void
shouldGetNeighborsWorkProperlyCaseC
()¶ Case C: The solution list has three solutions, the index of the solution is 1, and the neighbor size is 2
shouldGetNeighborsWorkProperlyCaseD¶
-
public void
shouldGetNeighborsWorkProperlyCaseD
()¶ Case D: The solution list has three solutions, the index of the solution is 2, and the neighbor size is 2
L13¶
-
public class
L13
<S extends Solution<?>> extends TwoDimensionalMesh<S>¶ Class defining an L9 neighborhood of a solution belonging to a list of solutions which is structured as a bi-dimensional mesh. The neighbors is illustrated as follows: * * * * * * o * * * * * *
Author: Esteban López Camacho
L13Test¶
-
public class
L13Test
¶ Created by ajnebro on 20/12/17.
Methods¶
shouldGetNeighborsReturnFourNeighborsCase1¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase1
()¶ Case 1 Solution list: 0 The solution location is 0, the neighborhood is 0
shouldGetNeighborsReturnFourNeighborsCase10¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase10
()¶ Case 10 Solution list: 0 1 2 3 4 5 6 7 The solution location is 0, the neighborhood is 1, 2, 6
shouldGetNeighborsReturnFourNeighborsCase11¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase11
()¶ Case 11 Solution list: 0 1 2 3 4 5 6 7 8 The solution location is 4, the neighborhood is 1, 3, 5, 7
shouldGetNeighborsReturnFourNeighborsCase12¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase12
()¶ Case 12 Solution list: 0 1 2 3 4 5 6 7 8 The solution location is 8, the neighborhood is 2, 6, 5, 7
shouldGetNeighborsReturnFourNeighborsCase2¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase2
()¶ Case 2 Solution list: 0 1 The solution location is 0, the neighborhood is 0, 1
shouldGetNeighborsReturnFourNeighborsCase3¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase3
()¶ Case 3 Solution list: 0 1 The solution location is 1, the neighborhood is 0, 1
shouldGetNeighborsReturnFourNeighborsCase4¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase4
()¶ Case 4 Solution list: 0 1 2 3 The solution location is 0, the neighborhood is 1, 2
shouldGetNeighborsReturnFourNeighborsCase5¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase5
()¶ Case 5 Solution list: 0 1 2 3 The solution location is 1, the neighborhood is 0, 3
shouldGetNeighborsReturnFourNeighborsCase6¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase6
()¶ Case 6 Solution list: 0 1 2 3 The solution location is 2, the neighborhood is 0, 3
shouldGetNeighborsReturnFourNeighborsCase7¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase7
()¶ Case 7 Solution list: 0 1 2 3 The solution location is 3, the neighborhood is 1, 2
L25¶
-
public class
L25
<S extends Solution<?>> extends TwoDimensionalMesh<S>¶ Class representing neighborhoods for a solution into a list of solutions
Author: Esteban López Camacho
L41¶
-
public class
L41
<S extends Solution<?>> extends TwoDimensionalMesh<S>¶ Class representing neighborhoods for a solution into a list of solutions
Author: Esteban López Camacho
L5¶
-
public class
L5
<S> extends TwoDimensionalMesh<S>¶ Class defining an L5 neighborhood of a solution belonging to a list of solutions which is structured as a bi-dimensional mesh. The neighbors are those solutions that are in the positions North, South, East and West Shape: * * o * *
Author: Antonio J. Nebro , Juan J. Durillo
L5Test¶
-
public class
L5Test
¶ Created by ajnebro on 26/5/15.
Methods¶
shouldGetNeighborsReturnFourNeighborsCase1¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase1
()¶ Case 1 Solution list: 0 The solution location is 0, the neighborhood is 0
shouldGetNeighborsReturnFourNeighborsCase2¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase2
()¶ Case 2 Solution list: 0 1 The solution location is 0, the neighborhood is 0, 1
WeightVectorNeighborhood¶
-
public class
WeightVectorNeighborhood
<S> implements Neighborhood<S>¶ This class implements a neighborhood based on the weight vectors of MOEA/D
Author: Antonio J. Nebro
Constructors¶
Methods¶
WeightVectorNeighborhoodTest¶
-
public class
WeightVectorNeighborhoodTest
¶
org.uma.jmetal.util.neighborhood.util¶
TwoDimensionalMesh¶
-
public class
TwoDimensionalMesh
<S> implements Neighborhood<S>¶ Class defining a bi-dimensional mesh.
Constructors¶
Methods¶
TwoDimensionalMeshTest¶
-
public class
TwoDimensionalMeshTest
¶ Created by ajnebro on 21/5/15.
Methods¶
shouldGetNeighborsReturnFourNeighborsCase1¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase1
()¶ Case 1 Solution list: 0 1 2 3 4 5 6 7 8 The solution location is 4, the neighborhood is 1, 3, 5, 7
shouldGetNeighborsReturnFourNeighborsCase2¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase2
()¶ Case 2 Solution list: 0 1 2 3 4 5 6 7 8 The solution location is 1, the neighborhood is 7, 0, 2, 4
shouldGetNeighborsReturnFourNeighborsCase3¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase3
()¶ Case 3 Solution list: 0 1 2 3 4 5 6 7 8 The solution location is 0, the neighborhood is 1, 2, 3, 6
shouldGetNeighborsReturnFourNeighborsCase4¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase4
()¶ Case 4 Solution list: 0 1 2 3 4 5 6 7 8 The solution location is 2, the neighborhood is 1, 0, 5, 8
shouldGetNeighborsReturnFourNeighborsCase5¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase5
()¶ Case 5 Solution list: 0 1 2 3 4 5 6 7 8 The solution location is 2, the neighborhood is 2, 6, 7, 5
shouldGetNeighborsReturnFourNeighborsCase6¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase6
()¶ Case 6 Solution list: 0 1 2 3 4 5 The solution location is 0, the neighborhood is 1, 3, 3, 2
shouldGetNeighborsReturnFourNeighborsCase7¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase7
()¶ Case 7 Solution list: 0 1 2 3 4 5 The solution location is 3, the neighborhood is 0, 4, 5, 0
shouldGetNeighborsReturnFourNeighborsCase8¶
-
public void
shouldGetNeighborsReturnFourNeighborsCase8
()¶ Case 8 Solution list: 0 1 2 3 The solution location is 0, the neighborhood is 2, 1, 2, 1
shouldGetNeighborsWithANegativeSolutionIndexThrowAnException¶
-
public void
shouldGetNeighborsWithANegativeSolutionIndexThrowAnException
()¶
shouldGetNeighborsWithANullListOfSolutionsThrowAnException¶
-
public void
shouldGetNeighborsWithANullListOfSolutionsThrowAnException
()¶
shouldGetNeighborsWithASolutionIndexValueEqualToTheListSizeThrowAnException¶
-
public void
shouldGetNeighborsWithASolutionIndexValueEqualToTheListSizeThrowAnException
()¶
org.uma.jmetal.util.point¶
PointSolution¶
-
public class
PointSolution
implements Solution<Double>¶ Solution used to wrap a
Point
object. Only objectives are used.Author: Antonio J. Nebro
Constructors¶
PointSolution¶
-
public
PointSolution
(int numberOfObjectives)¶ Constructor
Parameters: - numberOfObjectives –
PointSolution¶
-
public
PointSolution
(PointSolution point)¶ Copy constructor
Parameters: - point –
Methods¶
copy¶
-
public PointSolution
copy
()¶
org.uma.jmetal.util.point.impl¶
ArrayPoint¶
-
public class
ArrayPoint
implements Point¶ Class representing a point (i.e, an array of double values)
Author: Antonio J. Nebro
Constructors¶
ArrayPoint¶
-
public
ArrayPoint
(int dimension)¶ Constructor
Parameters: - dimension – Dimension of the point
Methods¶
ArrayPointTest¶
-
public class
ArrayPointTest
¶ Author: Antonio J. Nebro
Methods¶
shouldConstructAPointFromANullPointRaiseAnException¶
-
public void
shouldConstructAPointFromANullPointRaiseAnException
()¶
shouldConstructAPointFromOtherPointReturnAnIdenticalPoint¶
-
public void
shouldConstructAPointFromOtherPointReturnAnIdenticalPoint
()¶
shouldConstructFromASolutionReturnTheCorrectPoint¶
-
public void
shouldConstructFromASolutionReturnTheCorrectPoint
()¶
shouldConstructFromArrayReturnTheCorrectPoint¶
-
public void
shouldConstructFromArrayReturnTheCorrectPoint
()¶
shouldConstructFromNullArrayRaiseAnException¶
-
public void
shouldConstructFromNullArrayRaiseAnException
()¶
shouldEqualsReturnFalseIfTheClassIsNotAPoint¶
-
public void
shouldEqualsReturnFalseIfTheClassIsNotAPoint
()¶
shouldEqualsReturnFalseIfThePointsAreNotIdentical¶
-
public void
shouldEqualsReturnFalseIfThePointsAreNotIdentical
()¶
shouldEqualsReturnTrueIfThePointsAreIdentical¶
-
public void
shouldEqualsReturnTrueIfThePointsAreIdentical
()¶
shouldEqualsReturnTrueIfTheTwoPointsAreTheSame¶
-
public void
shouldEqualsReturnTrueIfTheTwoPointsAreTheSame
()¶
shouldGetDimensionValueReturnTheCorrectValue¶
-
public void
shouldGetDimensionValueReturnTheCorrectValue
()¶
shouldGetDimensionValueWithInvalidIndexesRaiseAnException¶
-
public void
shouldGetDimensionValueWithInvalidIndexesRaiseAnException
()¶
shouldGetNumberOfDimensionsReturnTheCorrectValue¶
-
public void
shouldGetNumberOfDimensionsReturnTheCorrectValue
()¶
IdealPoint¶
-
public class
IdealPoint
extends ArrayPoint¶ d Class representing an ideal point (minimization is assumed)
Author: Antonio J.Nebro
IdealPointTest¶
-
public class
IdealPointTest
¶ Created by ajnebro on 12/2/16.
Methods¶
shouldConstructorCreateAnIdealPointWithAllObjectiveValuesCorrectlyInitialized¶
-
public void
shouldConstructorCreateAnIdealPointWithAllObjectiveValuesCorrectlyInitialized
()¶
shouldUpdateWithOneSolutionMakeTheIdealPointHaveTheSolutionValues¶
-
public void
shouldUpdateWithOneSolutionMakeTheIdealPointHaveTheSolutionValues
()¶
LexicographicalPointComparatorTest¶
-
public class
LexicographicalPointComparatorTest
¶ Author: Antonio J. Nebro
Methods¶
shouldCompareDifferentLengthPointsReturnTheCorrectValue¶
-
public void
shouldCompareDifferentLengthPointsReturnTheCorrectValue
()¶
shouldCompareIdenticalPointsButTheFirstValueReturnMinus1¶
-
public void
shouldCompareIdenticalPointsButTheFirstValueReturnMinus1
()¶
shouldCompareIdenticalPointsButTheFirstValueReturnPlus1¶
-
public void
shouldCompareIdenticalPointsButTheFirstValueReturnPlus1
()¶
shouldCompareIdenticalPointsButTheLastValueReturnMinus1¶
-
public void
shouldCompareIdenticalPointsButTheLastValueReturnMinus1
()¶
shouldCompareIdenticalPointsButTheLastValueReturnPlus1¶
-
public void
shouldCompareIdenticalPointsButTheLastValueReturnPlus1
()¶
shouldFirstPointToCompareEqualsToNullRaiseAnException¶
-
public void
shouldFirstPointToCompareEqualsToNullRaiseAnException
()¶
NadirPoint¶
-
public class
NadirPoint
extends ArrayPoint¶ Class representing a nadir point (minimization is assumed)
Author: Antonio J.Nebro
NadirPointTest¶
-
public class
NadirPointTest
¶ Created by ajnebro on 12/2/16.
Methods¶
shouldConstructorCreateANadirPointWithAllObjectiveValuesCorrectlyInitialized¶
-
public void
shouldConstructorCreateANadirPointWithAllObjectiveValuesCorrectlyInitialized
()¶
shouldUpdateAListOfSolutionsLeadToTheCorrectNadirPoint¶
-
public void
shouldUpdateAListOfSolutionsLeadToTheCorrectNadirPoint
()¶
shouldUpdateWithOneSolutionMakeTheNadirPointHaveTheSolutionValues¶
-
public void
shouldUpdateWithOneSolutionMakeTheNadirPointHaveTheSolutionValues
()¶
PointComparatorTest¶
-
public class
PointComparatorTest
¶ Author: Antonio J. Nebro
Methods¶
shouldCompareBetterReturnZeroIfBothPointsAreEqualWhenMaximizing¶
-
public void
shouldCompareBetterReturnZeroIfBothPointsAreEqualWhenMaximizing
()¶
shouldCompareBetterReturnZeroIfBothPointsAreEqualWhenMinimizing¶
-
public void
shouldCompareBetterReturnZeroIfBothPointsAreEqualWhenMinimizing
()¶
shouldCompareReturnMinusOneIfTheFirstPointIsBetterThanTheSecondOneWhenMaximizing¶
-
public void
shouldCompareReturnMinusOneIfTheFirstPointIsBetterThanTheSecondOneWhenMaximizing
()¶
shouldCompareReturnOneIfTheSecondPointIsBetterThanTheFirstOneWhenMaximizing¶
-
public void
shouldCompareReturnOneIfTheSecondPointIsBetterThanTheFirstOneWhenMaximizing
()¶
shouldComparingDifferentLengthPointsRaiseAnException¶
-
public void
shouldComparingDifferentLengthPointsRaiseAnException
()¶
PointDimensionComparatorTest¶
-
public class
PointDimensionComparatorTest
¶ Author: Antonio J. Nebro
Methods¶
shouldCompareReturnMinusOneIfTheFirstValueIsLower¶
-
public void
shouldCompareReturnMinusOneIfTheFirstValueIsLower
()¶
shouldCompareReturnPlusOneIfTheFirstValueIsGreater¶
-
public void
shouldCompareReturnPlusOneIfTheFirstValueIsGreater
()¶
shouldCompareReturnZeroIfTheComparedValuesAreEqual¶
-
public void
shouldCompareReturnZeroIfTheComparedValuesAreEqual
()¶
shouldFirstPointToCompareEqualsToNullRaiseAnException¶
-
public void
shouldFirstPointToCompareEqualsToNullRaiseAnException
()¶
shouldIndexValueGreaterThanFirstPointDimensionsRaiseAnException¶
-
public void
shouldIndexValueGreaterThanFirstPointDimensionsRaiseAnException
()¶
PointSolutionTest¶
-
public class
PointSolutionTest
¶ Author: Antonio J. Nebro
Methods¶
shouldCopyConstructorCreateAnIdenticalObject¶
-
public void
shouldCopyConstructorCreateAnIdenticalObject
()¶
shouldDefaultConstructorCreateTheObjectCorrectly¶
-
public void
shouldDefaultConstructorCreateTheObjectCorrectly
()¶
shouldEqualsReturnFalseIfTheClassIsNotAPoint¶
-
public void
shouldEqualsReturnFalseIfTheClassIsNotAPoint
()¶
shouldEqualsReturnFalseIfThePointsAreNotIdentical¶
-
public void
shouldEqualsReturnFalseIfThePointsAreNotIdentical
()¶
shouldEqualsReturnFalseIfTheSolutionIsNull¶
-
public void
shouldEqualsReturnFalseIfTheSolutionIsNull
()¶
shouldEqualsReturnFalseIfTheTwoSolutionsHaveDifferentNumberOfObjectives¶
-
public void
shouldEqualsReturnFalseIfTheTwoSolutionsHaveDifferentNumberOfObjectives
()¶
shouldEqualsReturnTrueIfTheSolutionsAreIdentical¶
-
public void
shouldEqualsReturnTrueIfTheSolutionsAreIdentical
()¶
shouldEqualsReturnTrueIfTheTwoPointsAreTheSame¶
-
public void
shouldEqualsReturnTrueIfTheTwoPointsAreTheSame
()¶
org.uma.jmetal.util.point.util¶
DominanceDistanceTest¶
-
public class
DominanceDistanceTest
¶ Author: Antonio J. Nebro
Methods¶
shouldCalculatingDistanceOfPointsWithOneDimensionReturnTheCorrectValue¶
-
public void
shouldCalculatingDistanceOfPointsWithOneDimensionReturnTheCorrectValue
()¶
shouldCalculatingDistanceOfPointsWithTwoDimensionsReturnTheCorrectValueCaseA¶
-
public void
shouldCalculatingDistanceOfPointsWithTwoDimensionsReturnTheCorrectValueCaseA
()¶
shouldCalculatingDistanceOfPointsWithTwoDimensionsReturnTheCorrectValueCaseB¶
-
public void
shouldCalculatingDistanceOfPointsWithTwoDimensionsReturnTheCorrectValueCaseB
()¶
shouldCalculatingDistanceOfPointsWithTwoDimensionsReturnTheCorrectValueCaseC¶
-
public void
shouldCalculatingDistanceOfPointsWithTwoDimensionsReturnTheCorrectValueCaseC
()¶
shouldCalculatingDistanceOfPointsWithTwoDimensionsReturnTheCorrectValueCaseD¶
-
public void
shouldCalculatingDistanceOfPointsWithTwoDimensionsReturnTheCorrectValueCaseD
()¶
shouldCalculatingDistanceOfPointsWithTwoDimensionsReturnTheCorrectValueCaseE¶
-
public void
shouldCalculatingDistanceOfPointsWithTwoDimensionsReturnTheCorrectValueCaseE
()¶
shouldCalculatingDistanceOfPointsWithTwoDimensionsReturnTheCorrectValueCaseF¶
-
public void
shouldCalculatingDistanceOfPointsWithTwoDimensionsReturnTheCorrectValueCaseF
()¶
shouldCalculatingDistanceOfPointsWithZeroDimensionReturnZero¶
-
public void
shouldCalculatingDistanceOfPointsWithZeroDimensionReturnZero
()¶
shouldFirstPointToCompareEqualsToNullRaiseAnException¶
-
public void
shouldFirstPointToCompareEqualsToNullRaiseAnException
()¶
EuclideanDistanceTest¶
-
public class
EuclideanDistanceTest
¶ Author: Antonio J. Nebro
Methods¶
shouldCalculatingDistanceOfPointsWithOneDimensionReturnTheCorrectValue¶
-
public void
shouldCalculatingDistanceOfPointsWithOneDimensionReturnTheCorrectValue
()¶
shouldCalculatingDistanceOfPointsWithTwoDimensionsReturnTheCorrectValueCaseA¶
-
public void
shouldCalculatingDistanceOfPointsWithTwoDimensionsReturnTheCorrectValueCaseA
()¶
shouldCalculatingDistanceOfPointsWithTwoDimensionsReturnTheCorrectValueCaseB¶
-
public void
shouldCalculatingDistanceOfPointsWithTwoDimensionsReturnTheCorrectValueCaseB
()¶
shouldCalculatingDistanceOfPointsWithZeroDimensionReturnZero¶
-
public void
shouldCalculatingDistanceOfPointsWithZeroDimensionReturnZero
()¶
shouldFirstPointToCompareEqualsToNullRaiseAnException¶
-
public void
shouldFirstPointToCompareEqualsToNullRaiseAnException
()¶
org.uma.jmetal.util.point.util.comparator¶
LexicographicalPointComparator¶
-
public class
LexicographicalPointComparator
implements Comparator<Point>¶ This class implements the Comparator interface for comparing tow points. The order used is lexicographical order.
Author: Antonio J. Nebro , Juan J. Durillo
Methods¶
compare¶
-
public int
compare
(Point pointOne, Point pointTwo)¶ The compare method compare the objects o1 and o2.
Parameters: - pointOne – An object that reference a double[]
- pointTwo – An object that reference a double[]
Returns: The following value: -1 if point1 < point2, 1 if point1 > point2 or 0 in other case.
PointComparator¶
-
public class
PointComparator
implements Comparator<Point>¶ Point comparator. Starts the comparison from front last point dimension to the first one
Author: Antonio J. Nebro
PointDimensionComparator¶
-
public class
PointDimensionComparator
implements Comparator<Point>¶ This class implements the
Comparator
interface. It is used to compare two points according the value of a particular dimension.Author: Antonio J. Nebro , Juan J. Durillo
org.uma.jmetal.util.point.util.distance¶
DominanceDistance¶
-
public class
DominanceDistance
implements PointDistance¶ Computes the distance between two points a y b according to the dominance relationship. Point a is supposed to be point of the Pareto front
Author: Antonio J. Nebro
EuclideanDistance¶
-
public class
EuclideanDistance
implements PointDistance¶ Computes the Euclidean distance between two points
Author: Antonio J. Nebro
org.uma.jmetal.util.pseudorandom¶
BoundedRandomGenerator¶
-
public interface
BoundedRandomGenerator
<Value extends Comparable<Value>>¶ A
BoundedRandomGenerator
aims to provide a random value within a specific range. The range is inclusive, such that the lower bound and upper bound can be generated. Because lower and upper bounds make no sense if values cannot be compared, onlyComparable
values can be generated through this kind of generator. ABoundedRandomGenerator
is aFunctionalInterface
. It is not intended to be directly implemented by a class, but instead to request a method for generating random values, usually by using lambda expressions.Author: Matthieu Vergne
Parameters: - <Value> – The type of value to generate
Methods¶
bound¶
-
static BoundedRandomGenerator<Double>
bound
(RandomGenerator<Double> unboundedGenerator)¶ Create a
BoundedRandomGenerator
from aRandomGenerator
which generateDouble
values between 0 and 1 (inclusive or exclusive). The distribution is preserved.Parameters: - unboundedGenerator –
RandomGenerator
which generates values between 0 and 1
Returns: BoundedRandomGenerator
which generatesDouble
values based on the provided generator- unboundedGenerator –
fromDoubleToInteger¶
-
static BoundedRandomGenerator<Integer>
fromDoubleToInteger
(BoundedRandomGenerator<Double> doubleGenerator)¶ Create a
BoundedRandomGenerator
which generatesInteger
values from aBoundedRandomGenerator
which generateDouble
values. The distribution is preserved.Parameters: - doubleGenerator –
BoundedRandomGenerator
which generatesDouble
values
Returns: BoundedRandomGenerator
which generatesInteger
values based on the provided generator- doubleGenerator –
fromDoubleToInteger¶
-
static BoundedRandomGenerator<Integer>
fromDoubleToInteger
(RandomGenerator<Double> doubleGenerator)¶ Create a
BoundedRandomGenerator
which generatesInteger
values from aBoundedRandomGenerator
which generateDouble
values between 0 and 1 (inclusive or exclusive). The distribution is preserved.Parameters: - doubleGenerator –
RandomGenerator
which generatesDouble
values
Returns: BoundedRandomGenerator
which generatesInteger
values based on the provided generator- doubleGenerator –
BoundedRandomGeneratorTest¶
-
public class
BoundedRandomGeneratorTest
¶
Methods¶
testBoundedDoubleToIntegerFactoryMethodReturnsGeneratorWithCorrectDistribution¶
-
public void
testBoundedDoubleToIntegerFactoryMethodReturnsGeneratorWithCorrectDistribution
()¶
testBoundedDoubleToIntegerFactoryMethodReturnsGeneratorWithCorrectValues¶
-
public void
testBoundedDoubleToIntegerFactoryMethodReturnsGeneratorWithCorrectValues
()¶
testBoundingFactoryMethodReturnsGeneratorWithCorrectValues¶
-
public void
testBoundingFactoryMethodReturnsGeneratorWithCorrectValues
()¶
JMetalRandom¶
-
public class
JMetalRandom
implements Serializable¶ Author: Antonio J. Nebro
Methods¶
getInstance¶
-
public static JMetalRandom
getInstance
()¶
getRandomGenerator¶
-
public PseudoRandomGenerator
getRandomGenerator
()¶
setRandomGenerator¶
-
public void
setRandomGenerator
(PseudoRandomGenerator randomGenerator)¶
PseudoRandomGenerator¶
-
public interface
PseudoRandomGenerator
extends Serializable¶ Author: Antonio J. Nebro
RandomGenerator¶
-
public interface
RandomGenerator
<Value>¶ A
RandomGenerator
aims to provide a random value of a given type. Any value of this type can be generated. ARandomGenerator
is aFunctionalInterface
. It is not intended to be directly implemented by a class, but instead to request a method for generating random values, usually by using lambda expressions.Author: Matthieu Vergne
Parameters: - <Value> – The type of value to generate
Methods¶
filter¶
-
static <T> RandomGenerator<T>
filter
(RandomGenerator<T> generator, Predicate<T> filter)¶ Reduce a
RandomGenerator
range. The returnedRandomGenerator
uses the provided one to generate random values, but regenerate them if they do not pass the filter. Consequently, the initialRandomGenerator
may be called several times o generate a single value. The impact on performance depends on the part of the distribution which is filtered out: if a significant part of the distribution is rejected, it might be more interesting to create a dedicatedRandomGenerator
.Parameters: - generator – the
RandomGenerator
to filter - filter – the filter to pass to be an acceptable value
Returns: a
RandomGenerator
which provides only acceptable values- generator – the
forArray¶
-
static <T> RandomGenerator<T>
forArray
(BoundedRandomGenerator<Integer> indexSelector, T... values)¶ Create a
RandomGenerator
over an array based on a random selector.Parameters: - indexSelector – the random selector
- values – the values to return
Returns: a
RandomGenerator
on the provided values
forCollection¶
-
static <T> RandomGenerator<T>
forCollection
(BoundedRandomGenerator<Integer> indexSelector, Collection<T> values)¶ Create a
RandomGenerator
over aCollection
based on a random selector.Parameters: - indexSelector – the random selector
- values – the values to return
Returns: a
RandomGenerator
on the provided values
forEnum¶
-
static <T extends Enum<T>> RandomGenerator<T>
forEnum
(BoundedRandomGenerator<Integer> indexSelector, Class<T> enumClass)¶ Create a
RandomGenerator
overEnum
values based on a random selector.Parameters: - indexSelector – the random selector
- enumClass – the
Enum
to cover
Returns: a
RandomGenerator
on theEnum
values
RandomGeneratorTest.EnumValues¶
-
enum
EnumValues
¶
Enum Constants¶
VAL1¶
-
public static final RandomGeneratorTest.EnumValues
VAL1
¶
VAL2¶
-
public static final RandomGeneratorTest.EnumValues
VAL2
¶
VAL3¶
-
public static final RandomGeneratorTest.EnumValues
VAL3
¶
org.uma.jmetal.util.pseudorandom.impl¶
AuditableRandomGenerator¶
-
public class
AuditableRandomGenerator
implements PseudoRandomGenerator¶ An
AuditableRandomGenerator
is aPseudoRandomGenerator
which can be audited to know when a random generation method is called.Author: Matthieu Vergne
Constructors¶
AuditableRandomGenerator¶
-
public
AuditableRandomGenerator
(PseudoRandomGenerator generator)¶
Methods¶
AuditableRandomGenerator.RandomMethod¶
-
public static enum
RandomMethod
¶
Enum Constants¶
BOUNDED_DOUBLE¶
-
public static final AuditableRandomGenerator.RandomMethod
BOUNDED_DOUBLE
¶
BOUNDED_INT¶
-
public static final AuditableRandomGenerator.RandomMethod
BOUNDED_INT
¶
DOUBLE¶
-
public static final AuditableRandomGenerator.RandomMethod
DOUBLE
¶
AuditableRandomGeneratorTest¶
-
public class
AuditableRandomGeneratorTest
¶
Methods¶
testAuditableRandomGeneratorProvidesCorrectAuditWhenGettingBoundedDouble¶
-
public void
testAuditableRandomGeneratorProvidesCorrectAuditWhenGettingBoundedDouble
()¶
ExtendedPseudoRandomGenerator¶
-
public class
ExtendedPseudoRandomGenerator
implements PseudoRandomGenerator¶ Extended pseudo random number generator based on the decorator pattern. Two new methods are added: randNormal() and randSphere()
Author: Antonio J. Nebro
Constructors¶
ExtendedPseudoRandomGenerator¶
-
public
ExtendedPseudoRandomGenerator
(PseudoRandomGenerator randomGenerator)¶
Methods¶
randNormal¶
-
public double
randNormal
(double mean, double standardDeviation)¶ Use the polar form of the Box-Muller transformation to obtain a pseudo random number from a Gaussian distribution Code taken from Maurice Clerc’s implementation
Parameters: - mean –
- standardDeviation –
Returns: A pseudo random number
randSphere¶
-
public double[]
randSphere
(int dimension)¶ Get a random point from an hypersphere (center = 0, radius = 1) Code taken from Maurice Clerc’s implementation
Parameters: - dimension –
Returns: A pseudo random point
JavaRandomGenerator¶
-
public class
JavaRandomGenerator
implements PseudoRandomGenerator¶ Author: Antonio J. Nebro
Constructors¶
MersenneTwisterGenerator¶
-
public class
MersenneTwisterGenerator
implements PseudoRandomGenerator¶ Author: Antonio J. Nebro
Constructors¶
Well44497bGenerator¶
-
public class
Well44497bGenerator
implements PseudoRandomGenerator¶ Author: Antonio J. Nebro
Constructors¶
org.uma.jmetal.util.solutionattribute¶
DensityEstimator¶
-
public interface
DensityEstimator
<S> extends SolutionAttribute<S, Double>¶ Interface representing implementations to compute the crowding distance
Author: Antonio J. Nebro
Ranking¶
-
public interface
Ranking
<S> extends SolutionAttribute<S, Integer>¶ Ranks a list of solutions according to the dominance relationship
Author: Antonio J. Nebro
SolutionAttribute¶
-
public interface
SolutionAttribute
<S, V> extends Serializable¶ Attributes allows to extend the solution classes to incorporate data required by operators or algorithms manipulating them.
Author: Antonio J. Nebro
org.uma.jmetal.util.solutionattribute.impl¶
CrowdingDistance¶
-
public class
CrowdingDistance
<S extends Solution<?>> extends GenericSolutionAttribute<S, Double> implements DensityEstimator<S>¶ This class implements the crowding distance
Author: Antonio J. Nebro
CrowdingDistanceTest¶
-
public class
CrowdingDistanceTest
¶ Author: Antonio J. Nebro
Methods¶
shouldTheCrowdingDistanceOfASingleSolutionBeInfinity¶
-
public void
shouldTheCrowdingDistanceOfASingleSolutionBeInfinity
()¶
shouldTheCrowdingDistanceOfAnEmptySetDoNothing¶
-
public void
shouldTheCrowdingDistanceOfAnEmptySetDoNothing
()¶
DistanceToSolutionListAttribute¶
-
public class
DistanceToSolutionListAttribute
extends GenericSolutionAttribute<Solution<?>, Double>¶ Created by cbarba on 24/3/15.
DominanceRanking¶
-
public class
DominanceRanking
<S extends Solution<?>> extends GenericSolutionAttribute<S, Integer> implements Ranking<S>¶ This class implements some facilities for ranking set of solutions. Given a collection of solutions, they are ranked according to scheme proposed in NSGA-II; as an output, a set of subsets are obtained. The subsets are numbered starting from 0 (in NSGA-II, the numbering starts from 1); thus, subset 0 contains the non-dominated solutions, subset 1 contains the non-dominated solutions after removing those belonging to subset 0, and so on.
Author: Antonio J. Nebro , Juan J. Durillo
Constructors¶
DominanceRankingTest¶
-
public class
DominanceRankingTest
¶ Author: Antonio J. Nebro
Methods¶
shouldRankingOfAPopulationWithFiveSolutionsWorkProperly¶
-
public void
shouldRankingOfAPopulationWithFiveSolutionsWorkProperly
()¶
shouldRankingOfAPopulationWithThreeDominatedSolutionsReturnThreeSubfronts¶
-
public void
shouldRankingOfAPopulationWithThreeDominatedSolutionsReturnThreeSubfronts
()¶
shouldRankingOfAPopulationWithTwoDominatedSolutionsReturnTwoSubfronts¶
-
public void
shouldRankingOfAPopulationWithTwoDominatedSolutionsReturnTwoSubfronts
()¶
shouldRankingOfAPopulationWithTwoNonDominatedSolutionsReturnOneSubfront¶
-
public void
shouldRankingOfAPopulationWithTwoNonDominatedSolutionsReturnOneSubfront
()¶
Fitness¶
-
public class
Fitness
<S extends Solution<?>> extends GenericSolutionAttribute<S, Double>¶ Author: Antonio J. Nebro
GenericSolutionAttribute¶
-
public class
GenericSolutionAttribute
<S extends Solution<?>, V> implements SolutionAttribute<S, V>¶ Generic class for implementing
SolutionAttribute
classes. By default, the identifier of aSolutionAttribute
is the class object, but it can be set to a different value when constructing an instance.Author: Antonio J. Nebro
Constructors¶
GenericSolutionAttributeTest¶
-
public class
GenericSolutionAttributeTest
¶ Author: Antonio J. Nebro
Methods¶
shouldConstructorCreateASolutionAttributedWithThePassedIdentifier¶
-
public void
shouldConstructorCreateASolutionAttributedWithThePassedIdentifier
()¶
shouldDefaultConstructorCreateASolutionAttributedWithAnIdentifierEqualToTheClassObject¶
-
public void
shouldDefaultConstructorCreateASolutionAttributedWithAnIdentifierEqualToTheClassObject
()¶
shouldGetAttributeIdentifierReturnTheRightIdentifier¶
-
public void
shouldGetAttributeIdentifierReturnTheRightIdentifier
()¶
HypervolumeContributionAttribute¶
-
public class
HypervolumeContributionAttribute
<S extends Solution<?>> extends GenericSolutionAttribute<S, Double>¶ Author: Antonio J. Nebro
LocationAttribute¶
-
public class
LocationAttribute
<S extends Solution<?>> extends GenericSolutionAttribute<S, Integer>¶ Assign to each solution in a solution list an attribute containing the position of the solutions in the list.
Author: Antonio J. Nebro
Parameters: - <S> –
NumberOfViolatedConstraints¶
-
public class
NumberOfViolatedConstraints
<S extends Solution<?>> extends GenericSolutionAttribute<S, Integer>¶ Author: Antonio J. Nebro
OverallConstraintViolation¶
-
public class
OverallConstraintViolation
<S extends Solution<?>> extends GenericSolutionAttribute<S, Double>¶ Author: Antonio J. Nebro
PreferenceDistance¶
-
public class
PreferenceDistance
<S extends Solution<?>> extends GenericSolutionAttribute<S, Double> implements DensityEstimator<S>¶
Constructors¶
StrengthRawFitness¶
-
public class
StrengthRawFitness
<S extends Solution<?>> extends GenericSolutionAttribute<S, Double> implements DensityEstimator<S>¶
org.uma.jmetal.utility¶
GenerateReferenceFrontFromFile¶
-
public class
GenerateReferenceFrontFromFile
¶ This utility reads a file or the files in a directory and creates a reference front. The file(s) must contain only objective values. The program receives two parameters: 1. the name of the file or directory containing the data 2. the output file name which will contain the generated front
Author: Antonio J. Nebro
org.uma.jmetal.workingTest¶
BLXAlphaCrossoverWorkingTest¶
-
public class
BLXAlphaCrossoverWorkingTest
¶ Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Program to generate data representing the distribution of points generated by a SBX crossover operator. The parameters to be introduced by the command line are: - numberOfSolutions: number of solutions to generate - granularity: number of subdivisions to be considered. - alpha: alpha value - outputFile: file containing the results
Parameters: - args – Command line arguments
BLXAlphaCrossoverWorkingTest.VariableComparator¶
-
public static class
VariableComparator
implements Comparator<DoubleSolution>¶
Methods¶
compare¶
-
public int
compare
(DoubleSolution solution1, DoubleSolution solution2)¶ Compares two solutions according to the first variable value
Parameters: - solution1 – Object representing the first
Solution
. - solution2 – Object representing the second
Solution
.
Returns: -1, or 0, or 1 if o1 is less than, equal, or greater than o2, respectively.
- solution1 – Object representing the first
IntegerPolynomialMutationWorkingTest¶
-
public class
IntegerPolynomialMutationWorkingTest
¶ Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Program to generate data representing the distribution of points generated by a polynomial mutation operator. The parameters to be introduced by the command line are: - numberOfSolutions: number of solutions to generate - granularity: number of subdivisions to be considered. - distributionIndex: distribution index of the polynomial mutation operator - outputFile: file containing the results
Parameters: - args – Command line arguments
IntegerPolynomialMutationWorkingTest.VariableComparator¶
-
public static class
VariableComparator
implements Comparator<IntegerSolution>¶
Methods¶
compare¶
-
public int
compare
(IntegerSolution solution1, IntegerSolution solution2)¶ Compares two solutions according to the first variable value
Parameters: - solution1 – Object representing the first
Solution
. - solution2 – Object representing the second
Solution
.
Returns: -1, or 0, or 1 if o1 is less than, equal, or greater than o2, respectively.
- solution1 – Object representing the first
IntegerSBXCrossoverWorkingTest¶
-
public class
IntegerSBXCrossoverWorkingTest
¶ Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Program to generate data representing the distribution of points generated by a SBX crossover operator. The parameters to be introduced by the command line are: - numberOfSolutions: number of solutions to generate - granularity: number of subdivisions to be considered. - distributionIndex: distribution index of the polynomial mutation operator - outputFile: file containing the results
Parameters: - args – Command line arguments
IntegerSBXCrossoverWorkingTest.VariableComparator¶
-
public static class
VariableComparator
implements Comparator<IntegerSolution>¶
Methods¶
compare¶
-
public int
compare
(IntegerSolution solution1, IntegerSolution solution2)¶ Compares two solutions according to the first variable value
Parameters: - solution1 – Object representing the first
Solution
. - solution2 – Object representing the second
Solution
.
Returns: -1, or 0, or 1 if o1 is less than, equal, or greater than o2, respectively.
- solution1 – Object representing the first
PolynomialMutationWorkingTest¶
-
public class
PolynomialMutationWorkingTest
¶ Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Program to generate data representing the distribution of points generated by a polynomial mutation operator. The parameters to be introduced by the command line are: - numberOfSolutions: number of solutions to generate - granularity: number of subdivisions to be considered. - distributionIndex: distribution index of the polynomial mutation operator - outputFile: file containing the results
Parameters: - args – Command line arguments
PolynomialMutationWorkingTest.VariableComparator¶
-
public static class
VariableComparator
implements Comparator<DoubleSolution>¶
Methods¶
compare¶
-
public int
compare
(DoubleSolution solution1, DoubleSolution solution2)¶ Compares two solutions according to the first variable value
Parameters: - solution1 – Object representing the first
Solution
. - solution2 – Object representing the second
Solution
.
Returns: -1, or 0, or 1 if o1 is less than, equal, or greater than o2, respectively.
- solution1 – Object representing the first
SBXCrossoverWorkingTest¶
-
public class
SBXCrossoverWorkingTest
¶ Author: Antonio J. Nebro
Methods¶
main¶
-
public static void
main
(String[] args)¶ Program to generate data representing the distribution of points generated by a SBX crossover operator. The parameters to be introduced by the command line are: - numberOfSolutions: number of solutions to generate - granularity: number of subdivisions to be considered. - distributionIndex: distribution index of the polynomial mutation operator - outputFile: file containing the results
Parameters: - args – Command line arguments
SBXCrossoverWorkingTest.VariableComparator¶
-
public static class
VariableComparator
implements Comparator<DoubleSolution>¶
Methods¶
compare¶
-
public int
compare
(DoubleSolution solution1, DoubleSolution solution2)¶ Compares two solutions according to the first variable value
Parameters: - solution1 – Object representing the first
Solution
. - solution2 – Object representing the second
Solution
.
Returns: -1, or 0, or 1 if o1 is less than, equal, or greater than o2, respectively.
- solution1 – Object representing the first
About¶
jMetal is being developed by Antonio J. Nebro (email), associate professor at the University of Málaga, Juan J. Durillo (email), Matthieu Vergne (email) and Antonio Benítez-Hidalgo (email).
Note
Latest version: jMetal 5.6. Last update: September 25th 2018. This site was up in: September 25th 2018.
References¶
- J.J. Durillo, A.J. Nebro jMetal: a Java Framework for Multi-Objective Optimization. Advances in Engineering Software 42 (2011) 760-771.
- A.J. Nebro, J.J. Durillo, M. Vergne Redesigning the jMetal Multi-Objective Optimization Framework. GECCO (Companion) 2015, pp: 1093-1100. July 2015.
- Nebro A.J. et al. (2018) Extending the Speed-Constrained Multi-objective PSO (SMPSO) with Reference Point Based Preference Articulation. In: Auger A., Fonseca C., Lourenço N., Machado P., Paquete L., Whitley D. (eds) Parallel Problem Solving from Nature – PPSN XV. PPSN 2018. Lecture Notes in Computer Science, vol 11101. Springer, Cham
About jMetal 5¶
jMetal 5 is the first major revision of jMetal since its initial version. The architecture have been redesigned from scratch to provide a simpler design while keeping the same functionality. The current version is jMetal 5.6.
Now jMetal is a Maven project that is hosted at GitHub, where interested people can access to the current status of the project and are free to contribute.
Note
The former jMetal versions are still available at SourceForge.
How to use it¶
You can find the last released versions of jMetal on the Maven Central Repository.
To use jMetal in your project, you need at least the jmetal-core
artifact.
It provides various components used to implement jMetal algorithms.
To implement your own, you only need this package.
jMetal comes with various algorithms already implemented, which you can obtain by adding the jmetal-algorithm
artifact.
If you are more interested in experimenting with your own algorithms, you can instead add the jmetal-problem
artifact to obtain various problems to solve.
You can of course add both of them to try combinations.
If you want to go further by running and evaluating different combinations, you can finally add the jmetal-exec
artifact, which comes with various utilities.
Summary of features¶
- Multi-objective algoritms: NSGA-II, SPEA2, PAES, PESA-II, OMOPSO, MOCell, AbYSS, MOEA/D, GDE3, IBEA, SMPSO, SMPSOhv, SMS-EMOA, MOEA/D-STM, MOEA/D-DE, MOCHC, MOMBI, MOMBI-II, NSGA-III, WASF-GA, GWASF-GA, R-NSGA-II, CDG-MOEA, ESPEA, SMSPO/RP
- Single-objective algoritms: genetic algorithm (variants: generational, steady-state), evolution strategy (variants: elitist or mu+lambda, non-elitist or mu, lambda), DE, CMA-ES, PSO (Stantard 2007, Standard 2011), Coral reef optimization.
- Algorithms that can be executed in parallel: NSGA-II, SMPSO, GDE3, SPEA2, PESA-II
- Included problems:
- Problem families: ZDT, DTLZ, WFG, CEC2009, LZ09, GLT, MOP, CEC2018
- Classical problems: Kursawe, Fonseca, Schaffer, Viennet2, Viennet3
- Constrained problems: Srinivas, Tanaka, Osyczka2, Constr_Ex, Golinski, Water, Viennet4
- Combinatorial problems: multi-objective TSP
- Academic problems: OneMax, OneZeroMax
- Quality indicators: hypervolume, spread, generational distance, inverted generational distance, inverted generational distance plus, additive epsilon.
- Variable representations: binary, real, integer, permutation, mixed encoding (real+binary, int+real).