Struct vrp_core::solver::population::Elitism [−][src]
pub struct Elitism { /* fields omitted */ }Expand description
A simple evolution aware implementation of Population trait with the the following
characteristics:
- sorting of individuals in population according their objective fitness using
NSGA-IIalgorithm - maintaining diversity of population based on their crowding distance
Implementations
Creates a new instance of Elitism.
problem- a Vehicle Routing Problem definition.max_population_size- a max size of population size.
Shuffles objective function.
Extracts all individuals from population.
Trait Implementations
Adds all individuals into the population, then sorts and shrinks population if necessary. Returns true if any of newly added individuals is considered as best known. Read more
Adds an individual into the population. Returns true if newly added individual is considered as best known. Read more
Informs population about new generation event. This is time for the population to decide whether selection phase has to be changed. Read more
Compares two solutions the same way as population does.
Selects parents from the population based on current selection phase.
Returns subset of individuals within their rank sorted according their quality.
Returns a current selection phase.