Package org.opt4j.optimizer.ea
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 forScalingNsga2. TODO: delete this and baseScalingNsga2onNsga2.TheNsga2Selector.- 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 Summary
Fields Modifier and Type Field Description protected double[]distDeprecated.protected List<List<Integer>>frontsDeprecated.protected Individual[]indDeprecated.protected IntegermDeprecated.protected Map<Individual,Integer>mapDeprecated.protected RandomrandomDeprecated.protected int[]rankDeprecated.protected inttournamentDeprecated.
-
Constructor Summary
Constructors Constructor Description AlternativeNsga2(Rand random, int tournament)Deprecated.Constructs aNsga2Selector.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidcalcDistance(List<Integer> list)Deprecated.List<List<Integer>>fronts()Deprecated.Evaluate the fronts and set the correspondent rank values.Collection<Individual>getLames(int n, Collection<Individual> population)Deprecated.Collection<Individual>getParents(int mu, Collection<Individual> population)Deprecated.Selects a subset ofIndividuals and returns it as a newCollection.voidinit(int maxsize)Deprecated.Sets the maximal number ofIndividuals.protected booleansynchronize(Collection<Individual> population)Deprecated.
-
-
-
Field Detail
-
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.
-
-
Constructor Detail
-
AlternativeNsga2
@Inject public AlternativeNsga2(Rand random, int tournament)
Deprecated.Constructs aNsga2Selector.- Parameters:
random- the random number generatortournament- the tournament value
-
-
Method Detail
-
init
public void init(int maxsize)
Deprecated.Description copied from interface:SelectorSets the maximal number ofIndividuals.
-
getParents
public Collection<Individual> getParents(int mu, Collection<Individual> population)
Deprecated.Description copied from interface:SelectorSelects a subset ofIndividuals and returns it as a newCollection. These so called parents can be used to form the next generation.- Specified by:
getParentsin interfaceSelector- Parameters:
mu- the number of parents to selectpopulation- the list of individuals- Returns:
- the parents
-
getLames
public Collection<Individual> getLames(int n, Collection<Individual> population)
Deprecated.Description copied from interface:SelectorSelects a subset oflambdaIndividuals and returns it as a newCollection. These individuals can be erased in the next generation.
-
fronts
public List<List<Integer>> fronts()
Deprecated.Evaluate the fronts and set the correspondent rank values.- Returns:
- the fronts
-
synchronize
protected boolean synchronize(Collection<Individual> population)
Deprecated.
-
-