Class EvolutionaryStrategy<V extends Variable<?>>

java.lang.Object
jeco.core.algorithms.Algorithm<V>
jeco.core.algorithms.EvolutionaryStrategy<V>

public class EvolutionaryStrategy<V extends Variable<?>> extends Algorithm<V>
Evolutionary Strategy algorithm.
  • Field Details

    • SELECTION_PLUS

      public static final int SELECTION_PLUS
      Selection types
      See Also:
    • SELECTION_DEFAULT

      public static final int SELECTION_DEFAULT
      See Also:
    • RHO_DEFAULT

      public static final int RHO_DEFAULT
      Recombination offspring number
      See Also:
    • stopWhenSolved

      protected boolean stopWhenSolved
      Stop if the optimal solution is found
    • maxGenerations

      protected int maxGenerations
      Maximum number of generations
    • mu

      protected int mu
      Population size
    • selectionType

      protected int selectionType
      Selection type
    • rho

      protected int rho
      Recombination offspring number
    • lambda

      protected int lambda
      Number of offspring
    • dominance

      protected SimpleDominance<V extends Variable<?>> dominance
      Dominance operator
    • currentGeneration

      protected int currentGeneration
      Current generation
    • muPopulation

      protected Solutions<V extends Variable<?>> muPopulation
      Population
    • mutationOperator

      protected MutationOperator<V extends Variable<?>> mutationOperator
      Mutation operator
    • crossoverOperator

      protected SinglePointCrossover<V extends Variable<?>> crossoverOperator
      Crossover operator
    • selectionOperator

      protected SelectionOperator<V extends Variable<?>> selectionOperator
      Selection operator
  • Constructor Details

    • EvolutionaryStrategy

      public EvolutionaryStrategy(Problem<V> problem, MutationOperator<V> mutationOperator, int mu, int rho, int selectionType, int lambda, int maxGenerations, boolean stopWhenSolved)
      Constructor
      Parameters:
      problem - Problem to solve
      mutationOperator - Mutation operator
      mu - Population size
      rho - Recombination offspring number
      selectionType - Selection type
      lambda - Number of offspring
      maxGenerations - Maximum number of generations
      stopWhenSolved - Stop if the optimal solution is found
    • EvolutionaryStrategy

      public EvolutionaryStrategy(Problem<V> problem, MutationOperator<V> mutationOperator, int mu, int lambda, int maxGenerations)
      Constructor
      Parameters:
      problem - Problem to solve
      mutationOperator - Mutation operator
      mu - Population size
      lambda - Number of offspring
      maxGenerations - Maximum number of generations
  • Method Details

    • initialize

      public void initialize(Solutions<V> initialSolutions)
      Description copied from class: Algorithm
      Initializes the algorithm
      Specified by:
      initialize in class Algorithm<V extends Variable<?>>
      Parameters:
      initialSolutions - initial population. If null, a random population is generated.
    • execute

      public Solutions<V> execute()
      Description copied from class: Algorithm
      Executes the algorithm
      Specified by:
      execute in class Algorithm<V extends Variable<?>>
      Returns:
      Set of solutions obtained
    • step

      public void step()
      Description copied from class: Algorithm
      Executes one step of the algorithm
      Specified by:
      step in class Algorithm<V extends Variable<?>>
    • main

      public static void main(String[] args)