Class MatingWithHeuristics

  • All Implemented Interfaces:
    org.opt4j.optimizer.ea.Mating

    public class MatingWithHeuristics
    extends org.opt4j.optimizer.ea.MatingCrossoverMutate
    • Field Summary

      • Fields inherited from class org.opt4j.optimizer.ea.MatingCrossoverMutate

        copy, coupler, crossover, crossoverRate, individualFactory, mutate, mutationRate, random
    • Constructor Summary

      Constructors 
      Constructor Description
      MatingWithHeuristics​(org.opt4j.operator.crossover.Crossover<org.opt4j.core.Genotype> crossover, org.opt4j.operator.mutate.Mutate<org.opt4j.core.Genotype> mutate, org.opt4j.operator.copy.Copy<org.opt4j.core.Genotype> copy, org.opt4j.optimizer.ea.Coupler coupler, org.opt4j.optimizer.ea.CrossoverRate crossoverRate, org.opt4j.operator.mutate.MutationRate mutationRate, org.opt4j.common.random.Rand random, org.opt4j.core.IndividualFactory individualFactory, QMLBoundDependentTacticOperatorsManager qmlTacticManager)  
    • Constructor Detail

      • MatingWithHeuristics

        @Inject
        public MatingWithHeuristics​(org.opt4j.operator.crossover.Crossover<org.opt4j.core.Genotype> crossover,
                                    org.opt4j.operator.mutate.Mutate<org.opt4j.core.Genotype> mutate,
                                    org.opt4j.operator.copy.Copy<org.opt4j.core.Genotype> copy,
                                    org.opt4j.optimizer.ea.Coupler coupler,
                                    org.opt4j.optimizer.ea.CrossoverRate crossoverRate,
                                    org.opt4j.operator.mutate.MutationRate mutationRate,
                                    org.opt4j.common.random.Rand random,
                                    org.opt4j.core.IndividualFactory individualFactory,
                                    QMLBoundDependentTacticOperatorsManager qmlTacticManager)
    • Method Detail

      • getOffspring

        public Collection<org.opt4j.core.Individual> getOffspring​(int size,
                                                                  Collection<org.opt4j.core.Individual> parents)
        Specified by:
        getOffspring in interface org.opt4j.optimizer.ea.Mating
        Overrides:
        getOffspring in class org.opt4j.optimizer.ea.MatingCrossoverMutate
      • mate

        protected org.opt4j.optimizer.ea.Pair<org.opt4j.core.Individual> mate​(org.opt4j.core.Individual parent1,
                                                                              org.opt4j.core.Individual parent2,
                                                                              boolean doCrossover)
        Performs the actual coupler process of two parents using heuristics
        Overrides:
        mate in class org.opt4j.optimizer.ea.MatingCrossoverMutate
        Parameters:
        parent1 - parent one
        parent2 - parent two
        doCrossover - indicates whether the coupler shall take place
        Returns:
        the two offspring individuals