Class EpsilonNeighborhoodCoupler

  • All Implemented Interfaces:
    Coupler

    public class EpsilonNeighborhoodCoupler
    extends java.lang.Object
    implements Coupler
    The EpsilonNeighborhoodCoupler implements a parent selection process based on by the ε-neighborhood.
    • Constructor Summary

      Constructors 
      Constructor Description
      EpsilonNeighborhoodCoupler​(EpsilonMapping epsilonMapping, EpsilonAdaptation epsilonAdaption, java.util.Random random, int plannedNeighborhoodNumber, double epsilonNeighborhood, double epsilonNeighborhoodDelta, double epsilonNeighborhoodDeltaMax, double epsilonNeighborhoodDeltaMin)
      Basic constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.List<java.util.Set<org.opt4j.core.Individual>> createNeighborhoods​(java.util.List<org.opt4j.core.Individual> survivorPool)
      Applies the epsilon neighborhood creation.
      java.util.Collection<org.opt4j.operators.crossover.Pair<org.opt4j.core.Individual>> getCouples​(int size, java.util.List<org.opt4j.core.Individual> survivors)
      Generates parent couples.
      protected org.opt4j.operators.crossover.Pair<org.opt4j.core.Individual> pickCouple​(java.util.Set<org.opt4j.core.Individual> neighborhood)
      Picks a couple of parents from the given neighborhood.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • random

        protected final java.util.Random random
      • plannedNeighborhoodNumber

        protected final int plannedNeighborhoodNumber
      • adaptiveEpsilonNeighborhood

        protected final AdaptiveEpsilon adaptiveEpsilonNeighborhood
    • Constructor Detail

      • EpsilonNeighborhoodCoupler

        @Inject
        public EpsilonNeighborhoodCoupler​(EpsilonMapping epsilonMapping,
                                          EpsilonAdaptation epsilonAdaption,
                                          java.util.Random random,
                                          int plannedNeighborhoodNumber,
                                          double epsilonNeighborhood,
                                          double epsilonNeighborhoodDelta,
                                          double epsilonNeighborhoodDeltaMax,
                                          double epsilonNeighborhoodDeltaMin)
        Basic constructor.
        Parameters:
        epsilonMapping - an EpsilonMapping that is used to enhance the Objectives during the creation of the neighborhoods
        epsilonAdaption - an EpsilonAdaptation that adjusts the ε valued used for the creation of the neighborhoods
        random - a Random
        plannedNeighborhoodNumber - A value provided by the user. The ε used for the creation of the neighborhoods is adjusted in order to create a number of neighborhoods similar to this value.
    • Method Detail

      • getCouples

        public java.util.Collection<org.opt4j.operators.crossover.Pair<org.opt4j.core.Individual>> getCouples​(int size,
                                                                                                              java.util.List<org.opt4j.core.Individual> survivors)
        Generates parent couples. Distributes the parent Individuals onto neighborhoods. Both parents of a couple are picked from the same neighborhood. Uses a NeighborhoodSchedulerRoundRobin to arbitrate the neighborhoods from where the parent couples are picked.
        Specified by:
        getCouples in interface Coupler
        Parameters:
        size - the number of couples that is generated
        survivors - the Individuals that can be used as parents
        Returns:
        a collection of Individual pairs, that will be used to generate the next generation of individuals
      • pickCouple

        protected org.opt4j.operators.crossover.Pair<org.opt4j.core.Individual> pickCouple​(java.util.Set<org.opt4j.core.Individual> neighborhood)
        Picks a couple of parents from the given neighborhood. Here, we just pick two random individuals.
        Parameters:
        neighborhood - the set of similar Individuals from where the parents are picked
        Returns:
        the pair that was picked as parents for a crossover
      • createNeighborhoods

        protected java.util.List<java.util.Set<org.opt4j.core.Individual>> createNeighborhoods​(java.util.List<org.opt4j.core.Individual> survivorPool)
        Applies the epsilon neighborhood creation.
        Parameters:
        survivorPool - a list of Individuals that can be used as parents
        Returns:
        a list of individual sets. Each set is considered as a neighborhood.