Components¶
Archive¶
-
class
jmetal.component.archive.
Archive
¶ Bases:
typing.Generic
-
add
(solution: S) → bool¶
-
get
(index: int) → S¶
-
get_name
() → str¶
-
size
() → int¶
-
-
class
jmetal.component.archive.
ArchiveWithReferencePoint
(maximum_size: int, reference_point: typing.List[float], comparator: jmetal.component.comparator.Comparator[S], density_estimator: jmetal.component.density_estimator.DensityEstimator)¶ Bases:
jmetal.component.archive.BoundedArchive
-
add
(solution: S) → bool¶
-
get_reference_point
() → typing.List[float]¶
-
-
class
jmetal.component.archive.
BoundedArchive
(maximum_size: int, comparator: jmetal.component.comparator.Comparator[S] = None, density_estimator: jmetal.component.density_estimator.DensityEstimator = None)¶ Bases:
jmetal.component.archive.Archive
-
add
(solution: S) → bool¶
-
compute_density_estimator
()¶
-
-
class
jmetal.component.archive.
CrowdingDistanceArchive
(maximum_size: int)¶
-
class
jmetal.component.archive.
CrowdingDistanceArchiveWithReferencePoint
(maximum_size: int, reference_point: typing.List[float])¶
-
class
jmetal.component.archive.
NonDominatedSolutionListArchive
¶ Bases:
jmetal.component.archive.Archive
-
add
(solution: S) → bool¶
-
Comparator¶
-
class
jmetal.component.comparator.
Comparator
¶ Bases:
typing.Generic
-
compare
(solution1: S, solution2: S) → int¶
-
get_name
() → str¶
-
-
class
jmetal.component.comparator.
DominanceComparator
(constraint_comparator=<jmetal.component.comparator.SolutionAttributeComparator object>)¶ Bases:
jmetal.component.comparator.Comparator
-
compare
(solution1: jmetal.core.solution.Solution, solution2: jmetal.core.solution.Solution) → int¶
-
-
class
jmetal.component.comparator.
EqualSolutionsComparator
¶ Bases:
jmetal.component.comparator.Comparator
-
compare
(solution1: jmetal.core.solution.Solution, solution2: jmetal.core.solution.Solution) → int¶
-
-
class
jmetal.component.comparator.
RankingAndCrowdingDistanceComparator
¶ Bases:
jmetal.component.comparator.Comparator
-
compare
(solution1: jmetal.core.solution.Solution, solution2: jmetal.core.solution.Solution) → int¶
-
-
class
jmetal.component.comparator.
SolutionAttributeComparator
(key: str, lowest_is_best: bool = True)¶ Bases:
jmetal.component.comparator.Comparator
-
compare
(solution1: jmetal.core.solution.Solution, solution2: jmetal.core.solution.Solution) → int¶
-
Density Estimator¶
-
class
jmetal.component.density_estimator.
CrowdingDistance
¶ Bases:
jmetal.component.density_estimator.DensityEstimator
This class implements a DensityEstimator based on the crowding distance. In consequence, the main method of this class is
compute_density_estimator()
.-
compute_density_estimator
(front: typing.List[S])¶ This function performs the computation of the crowding density estimation over the solution list.
Note
This method assign the distance in the inner elements of the solution list.
Parameters: front – The list of solutions.
-
-
class
jmetal.component.density_estimator.
DensityEstimator
¶ Bases:
typing.List
This is the interface of any density estimator algorithm.
-
compute_density_estimator
(solution_list: typing.List[S]) → float¶
-
-
jmetal.component.density_estimator.
S
= ~S¶
Evaluator¶
-
class
jmetal.component.evaluator.
Evaluator
¶ Bases:
typing.Generic
-
evaluate
(solution_list: typing.List[S], problem: jmetal.core.problem.Problem) → typing.List[S]¶
-
static
evaluate_solution
(solution: S, problem: jmetal.core.problem.Problem) → None¶
-
get_name
() → str¶
-
-
class
jmetal.component.evaluator.
MapEvaluator
(processes=None)¶ Bases:
jmetal.component.evaluator.Evaluator
-
evaluate
(solution_list: typing.List[S], problem: jmetal.core.problem.Problem) → typing.List[S]¶
-
-
class
jmetal.component.evaluator.
SequentialEvaluator
¶ Bases:
jmetal.component.evaluator.Evaluator
-
evaluate
(solution_list: typing.List[S], problem: jmetal.core.problem.Problem) → typing.List[S]¶
-
Observer¶
-
class
jmetal.component.observer.
BasicAlgorithmObserver
(frequency: float = 1.0) → None¶ Bases:
jmetal.core.observable.Observer
Show the number of evaluations, best fitness and computing time.
Parameters: frequency – Display frequency. -
update
(*args, **kwargs)¶
-
-
class
jmetal.component.observer.
ProgressBarObserver
(step: int, maximum: int, desc: str = 'Progress') → None¶ Bases:
jmetal.core.observable.Observer
Show a smart progress meter with the number of evaluations and computing time.
Parameters: - step – Initial counter value.
- maximum – Number of expected iterations.
- desc – Prefix for the progressbar.
-
update
(*args, **kwargs)¶
-
class
jmetal.component.observer.
VisualizerObserver
(replace: bool = True) → None¶ Bases:
jmetal.core.observable.Observer
-
update
(*args, **kwargs)¶
-
-
class
jmetal.component.observer.
WriteFrontToFileObserver
(output_directory) → None¶ Bases:
jmetal.core.observable.Observer
Write function values of the front into files.
Parameters: output_directory – Output directory. Each front will be saved on a file FUN.x. -
update
(*args, **kwargs)¶
-
-
jmetal.component.observer.
jMetalPyLogger
= <Logger jMetalPy (DEBUG)>¶
Quality indicator¶
-
class
jmetal.component.quality_indicator.
HyperVolume
(reference_point: list)¶ Bases:
jmetal.component.quality_indicator.Metric
Hypervolume computation based on variant 3 of the algorithm in the paper:
- C. M. Fonseca, L. Paquete, and M. Lopez-Ibanez. An improved dimension-sweep algorithm for the hypervolume indicator. In IEEE Congress on Evolutionary Computation, pages 1157-1163, Vancouver, Canada, July 2006.
Minimization is implicitly assumed here!
Constructor.
-
compute
(front: typing.List[jmetal.core.solution.Solution])¶ Before the HV computation, front and reference point are translated, so that the reference point is [0, …, 0].
Returns: The hypervolume that is dominated by a non-dominated front.
-
get_name
() → str¶
-
class
jmetal.component.quality_indicator.
Metric
¶ Bases:
object
-
compute
(front: typing.List[jmetal.core.solution.Solution])¶
-
get_name
() → str¶
-
-
class
jmetal.component.quality_indicator.
MultiList
(number_lists)¶ Bases:
object
A special front structure needed by FonsecaHyperVolume.
It consists of several doubly linked lists that share common nodes. So, every node has multiple predecessors and successors, one in every list.
Builds ‘numberLists’ doubly linked lists.
-
class
Node
(number_lists, cargo=None)¶ Bases:
object
-
append
(node, index)¶ Appends a node to the end of the list at the given index.
-
extend
(nodes, index)¶ Extends the list at the given index with the nodes.
-
get_length
(i)¶ Returns the length of the i-th list.
-
reinsert
(node, index, bounds)¶ Inserts ‘node’ at the position it had in all lists in [0, ‘index’[ before it was removed. This method assumes that the next and previous nodes of the node that is reinserted are in the list.
-
remove
(node, index, bounds)¶ Removes and returns ‘node’ from all lists in [0, ‘index’[.
-
class
Ranking¶
-
class
jmetal.component.ranking.
EfficientNonDominatedRanking
¶ Bases:
jmetal.component.ranking.Ranking
Class implementing the EDS (efficient non-dominated sorting) algorithm.
-
compute_ranking
(solution_list: typing.List[S])¶
-
-
class
jmetal.component.ranking.
FastNonDominatedRanking
¶ Bases:
jmetal.component.ranking.Ranking
Class implementing the non-dominated ranking of NSGA-II.
-
compute_ranking
(solution_list: typing.List[S])¶
-