[−][src]Trait vrp_core::solver::Population
A trait which models a population with individuals (solutions).
Required methods
fn add_all(&mut self, individuals: Vec<Individual>)
Adds all individuals into the population, then sorts and shrinks population if necessary.
fn add(&mut self, individual: Individual)
Adds an individual into the population.
fn ranked<'a>(&'a self) -> Box<dyn Iterator<Item = (&Individual, usize)> + 'a>
Returns individuals within their rank sorted according their quality.
fn size(&self) -> usize
Returns population size.