Class EvolutionaryAlgorithmModule

    • Field Detail

      • generations

        protected int generations
      • populationSize

        protected int populationSize
      • parentsPerGeneration

        protected int parentsPerGeneration
      • offspringsPerGeneration

        protected int offspringsPerGeneration
      • crossoverRate

        protected double crossoverRate
    • Constructor Detail

      • EvolutionaryAlgorithmModule

        public EvolutionaryAlgorithmModule()
    • Method Detail

      • getPopulationSize

        public int getPopulationSize()
        Returns the population size alpha.
        Returns:
        the population size
      • setPopulationSize

        public void setPopulationSize​(int alpha)
        Sets the population size alpha.
        Parameters:
        alpha - the population size to set
      • getGenerations

        public int getGenerations()
        Returns the number of generations.
        Returns:
        the number of generations
      • setGenerations

        public void setGenerations​(int generations)
        Sets the number of generations.
        Parameters:
        generations - the number of generations
        See Also:
        getGenerations()
      • getOffspringsPerGeneration

        public int getOffspringsPerGeneration()
        Returns the number of children lambda.
        Returns:
        the number of children
      • setOffspringsPerGeneration

        public void setOffspringsPerGeneration​(int lambda)
        Sets the number of children lambda.
        Parameters:
        lambda - the number of children
      • getParentsPerGeneration

        public int getParentsPerGeneration()
        Returns the number of parents mu.
        Returns:
        the number of parents
      • setParentsPerGeneration

        public void setParentsPerGeneration​(int mu)
        Sets the number of parents mu.
        Parameters:
        mu - the number of parents
      • setCrossoverRateType

        public void setCrossoverRateType​(EvolutionaryAlgorithmModule.CrossoverRateType crossoverRateType)
        Sets the type of crossover rate to use.
        Parameters:
        crossoverRateType - the crossoverRateType to set
      • getCrossoverRate

        public double getCrossoverRate()
        Returns the used crossover rate.
        Returns:
        the crossoverRate
      • setCrossoverRate

        public void setCrossoverRate​(double crossoverRate)
        Sets the crossover rate.
        Parameters:
        crossoverRate - the crossoverRate to set
      • config

        public void config()
        Specified by:
        config in class org.opt4j.core.start.Opt4JModule