Package org.opt4j.optimizers.ea.aeseh
Class EpsilonNeighborhoodCoupler
- java.lang.Object
-
- org.opt4j.optimizers.ea.aeseh.EpsilonNeighborhoodCoupler
-
- All Implemented Interfaces:
Coupler
public class EpsilonNeighborhoodCoupler extends java.lang.Object implements Coupler
TheEpsilonNeighborhoodCoupler
implements a parent selection process based on by the ε-neighborhood.
-
-
Field Summary
Fields Modifier and Type Field Description protected AdaptiveEpsilon
adaptiveEpsilonNeighborhood
protected EpsilonAdaptation
epsilonAdaption
protected EpsilonMapping
epsilonMapping
protected int
plannedNeighborhoodNumber
protected java.util.Random
random
-
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.
-
-
-
Field Detail
-
epsilonAdaption
protected final EpsilonAdaptation epsilonAdaption
-
epsilonMapping
protected final EpsilonMapping epsilonMapping
-
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
- anEpsilonMapping
that is used to enhance theObjectives
during the creation of the neighborhoodsepsilonAdaption
- anEpsilonAdaptation
that adjusts the ε valued used for the creation of the neighborhoodsrandom
- aRandom
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 parentIndividual
s onto neighborhoods. Both parents of a couple are picked from the same neighborhood. Uses aNeighborhoodSchedulerRoundRobin
to arbitrate the neighborhoods from where the parent couples are picked.- Specified by:
getCouples
in interfaceCoupler
- Parameters:
size
- the number of couples that is generatedsurvivors
- theIndividual
s 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 similarIndividual
s 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 ofIndividual
s that can be used as parents- Returns:
- a list of individual sets. Each set is considered as a neighborhood.
-
-