Class DEOptim.Solution

    • Method Detail

      • getNextGeneration

        public List<Chromosome> getNextGeneration​(List<Chromosome> parents,
                                                  List<Chromosome> children)
        Description copied from class: GeneticAlgorithm
        Populate the next generation using the parent and children chromosome pools.

        This implementation chooses the best chromosomes among the parents and children.

        Overrides:
        getNextGeneration in class GeneticAlgorithm
        Parameters:
        parents - the parent chromosome pool
        children - the children chromosome pool
        Returns:
        the next generation population
      • getChild

        public Chromosome getChild​(int i)
        Description copied from class: GeneticAlgorithm
        Produce a child chromosome.

        This implementation first applies the crossover and then the mutation operators.

        Overrides:
        getChild in class GeneticAlgorithm
        Parameters:
        i - an index that ranges from 0 to (population size - 1)
        Returns:
        a child chromosome