Class SingleObjectiveEvolutionaryAlgorithm

All Implemented Interfaces:
Algorithm, Configurable, EvolutionaryAlgorithm, Stateful
Direct Known Subclasses:
DifferentialEvolution, EvolutionStrategy, GeneticAlgorithm

public abstract class SingleObjectiveEvolutionaryAlgorithm extends AbstractEvolutionaryAlgorithm
Abstract class for building single-objective evolutionary algorithms. These use an aggregating or scalarizing function that converts multiple objective values into a single fitness value.
  • Field Details

  • Constructor Details

    • SingleObjectiveEvolutionaryAlgorithm

      public SingleObjectiveEvolutionaryAlgorithm(Problem problem, int initialPopulationSize, Population population, NondominatedPopulation archive, AggregateObjectiveComparator comparator, Initialization initialization, Variation variation)
      Constructs a new single-objective algorithm.
      Parameters:
      problem - the problem to solve
      initialPopulationSize - the initial population size
      population - the population
      archive - the archive storing the non-dominated solutions
      comparator - the aggregate objective comparator
      initialization - the initialization method
      variation - the variation operator
  • Method Details

    • getResult

      public NondominatedPopulation getResult()
      Description copied from interface: Algorithm
      Returns the current best-known result.
      Specified by:
      getResult in interface Algorithm
      Overrides:
      getResult in class AbstractEvolutionaryAlgorithm
      Returns:
      the current best-known result
    • getComparator

      public AggregateObjectiveComparator getComparator()
      Returns the aggregate objective comparator that scalarizes multiple objectives into a single fitness value.
      Returns:
      the aggregate objective comparator
    • setComparator

      public void setComparator(AggregateObjectiveComparator comparator)
      Sets the aggregate objective comparator that scalarizes multiple objectives into a single fitness value.
      Parameters:
      comparator - the aggregate objective comparator
    • setInitialPopulationSize

      public void setInitialPopulationSize(int initialPopulationSize)
      Description copied from class: AbstractEvolutionaryAlgorithm
      Sets the initial population size. This value can not be set after initialization.
      Overrides:
      setInitialPopulationSize in class AbstractEvolutionaryAlgorithm
      Parameters:
      initialPopulationSize - the initial population size
    • applyConfiguration

      public void applyConfiguration(TypedProperties properties)
      Description copied from interface: Configurable
      Applies the properties to this instance. It is strongly recommended to apply a configuration immediately after creating the instance, as some properties can not be changed after the class is used. Exceptions may be thrown if attempting to set such properties. After calling this method, we encourage users to call TypedProperties.warnIfUnaccessedProperties() to verify all properties were processed. This can identify simple mistakes like typos. If overriding this method, properties should only be updated if a new value is provided. Additionally, if updating any Configurable objects inside this object, they should be updated before calling super.applyConfiguration(properties).
      Parameters:
      properties - the user-defined properties
    • getConfiguration

      public TypedProperties getConfiguration()
      Description copied from interface: Configurable
      Gets the current configuration of this instance. In theory, these properties should be able to create a duplicate instance. Note however, they are unlikely to behave identically due to random numbers and other transient fields.
      Returns:
      the properties defining this instance