* @throws NumberIsTooSmallException if the new population size is smaller than the current number
* of chromosomes in the population
*/
public void setPopulationLimit(final int populationLimit) throws NotPositiveException, NumberIsTooSmallException {
if (populationLimit <= 0) {
throw new NotPositiveException(LocalizedFormats.POPULATION_LIMIT_NOT_POSITIVE, populationLimit);
}
if (populationLimit < chromosomes.size()) {
throw new NumberIsTooSmallException(populationLimit, chromosomes.size(), true);
}
this.populationLimit = populationLimit;