Class AlternativeNsga2

java.lang.Object
org.opt4j.optimizer.ea.AlternativeNsga2
All Implemented Interfaces:
Selector
Direct Known Subclasses:
ScalingNsga2

public class AlternativeNsga2 extends Object implements Selector
Deprecated.
Previous implementation as of Opt4J version 2.2. and Qais extensions, which is still used as the basis for ScalingNsga2. TODO: delete this and base ScalingNsga2 on Nsga2.
The Nsga2 Selector.
See Also:
  • Nsga2Module
  • "A Fast Elitist Non-Dominated Sorting Genetic Algorithm for Multi-Objective Optimization: NSGA-II, K. Deb, Samir Agrawal, Amrit Pratap, and T. Meyarivan, Parallel Problem Solving from Nature, 2000"
  • Field Details

    • random

      protected final Random random
      Deprecated.
    • tournament

      protected final int tournament
      Deprecated.
    • map

      protected final Map<Individual,Integer> map
      Deprecated.
    • ind

      protected Individual[] ind
      Deprecated.
    • rank

      protected int[] rank
      Deprecated.
    • dist

      protected double[] dist
      Deprecated.
    • m

      protected Integer m
      Deprecated.
    • fronts

      protected List<List<Integer>> fronts
      Deprecated.
  • Constructor Details

    • AlternativeNsga2

      @Inject public AlternativeNsga2(Rand random, int tournament)
      Deprecated.
      Constructs a Nsga2 Selector.
      Parameters:
      random - the random number generator
      tournament - the tournament value
  • Method Details

    • init

      public void init(int maxsize)
      Deprecated.
      Description copied from interface: Selector
      Sets the maximal number of Individuals.
      Specified by:
      init in interface Selector
      Parameters:
      maxsize - the number of individuals
    • getParents

      public Collection<Individual> getParents(int mu, Collection<Individual> population)
      Deprecated.
      Description copied from interface: Selector
      Selects a subset of Individuals and returns it as a new Collection. These so called parents can be used to form the next generation.
      Specified by:
      getParents in interface Selector
      Parameters:
      mu - the number of parents to select
      population - the list of individuals
      Returns:
      the parents
    • getLames

      public Collection<Individual> getLames(int n, Collection<Individual> population)
      Deprecated.
      Description copied from interface: Selector
      Selects a subset of lambda Individuals and returns it as a new Collection. These individuals can be erased in the next generation.
      Specified by:
      getLames in interface Selector
      Parameters:
      n - the number of lames to select
      population - the list of individuals
      Returns:
      the worst lambda individuals
    • fronts

      public List<List<Integer>> fronts()
      Deprecated.
      Evaluate the fronts and set the correspondent rank values.
      Returns:
      the fronts
    • calcDistance

      protected void calcDistance(List<Integer> list)
      Deprecated.
    • synchronize

      protected boolean synchronize(Collection<Individual> population)
      Deprecated.