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 baseScalingNsga2
onNsga2
.TheNsga2
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 Summary
Fields Modifier and Type Field Description protected double[]
dist
Deprecated.protected List<List<Integer>>
fronts
Deprecated.protected Individual[]
ind
Deprecated.protected Integer
m
Deprecated.protected Map<Individual,Integer>
map
Deprecated.protected Random
random
Deprecated.protected int[]
rank
Deprecated.protected int
tournament
Deprecated.
-
Constructor Summary
Constructors Constructor Description AlternativeNsga2(Rand random, int tournament)
Deprecated.Constructs aNsga2
Selector
.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
calcDistance(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 ofIndividual
s and returns it as a newCollection
.void
init(int maxsize)
Deprecated.Sets the maximal number ofIndividual
s.protected boolean
synchronize(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 aNsga2
Selector
.- Parameters:
random
- the random number generatortournament
- the tournament value
-
-
Method Detail
-
init
public void init(int maxsize)
Deprecated.Description copied from interface:Selector
Sets the maximal number ofIndividual
s.
-
getParents
public Collection<Individual> getParents(int mu, Collection<Individual> population)
Deprecated.Description copied from interface:Selector
Selects a subset ofIndividual
s and returns it as a newCollection
. These so called parents can be used to form the next generation.- Specified by:
getParents
in 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:Selector
Selects a subset oflambda
Individual
s 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.
-
-