Class PMXCrossover
java.lang.Object
org.uma.jmetal.operator.crossover.impl.PMXCrossover
- All Implemented Interfaces:
Serializable,CrossoverOperator<PermutationSolution<Integer>>,Operator<List<PermutationSolution<Integer>>,List<PermutationSolution<Integer>>>
This class allows to apply a PMX crossover operator using two parent solutions.
- Author:
- Antonio J. Nebro, Juan J. Durillo
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPMXCrossover(double crossoverProbability) ConstructorPMXCrossover(double crossoverProbability, RandomGenerator<Double> randomGenerator) ConstructorPMXCrossover(double crossoverProbability, RandomGenerator<Double> crossoverRandomGenerator, BoundedRandomGenerator<Integer> cuttingPointRandomGenerator) Constructor -
Method Summary
Modifier and TypeMethodDescriptiondoublevoidcrossoverProbability(double crossoverProbability) doCrossover(double probability, List<PermutationSolution<Integer>> parents) Perform the crossover operationexecute(List<PermutationSolution<Integer>> parents) Executes the operationintint
-
Constructor Details
-
PMXCrossover
public PMXCrossover(double crossoverProbability) Constructor -
PMXCrossover
Constructor -
PMXCrossover
public PMXCrossover(double crossoverProbability, RandomGenerator<Double> crossoverRandomGenerator, BoundedRandomGenerator<Integer> cuttingPointRandomGenerator) Constructor
-
-
Method Details
-
crossoverProbability
public double crossoverProbability()- Specified by:
crossoverProbabilityin interfaceCrossoverOperator<PermutationSolution<Integer>>
-
crossoverProbability
public void crossoverProbability(double crossoverProbability) -
execute
Executes the operation- Specified by:
executein interfaceOperator<List<PermutationSolution<Integer>>,List<PermutationSolution<Integer>>> - Parameters:
parents- An object containing an array of two solutions
-
doCrossover
public List<PermutationSolution<Integer>> doCrossover(double probability, List<PermutationSolution<Integer>> parents) Perform the crossover operation- Parameters:
probability- Crossover probabilityparents- Parents- Returns:
- An array containing the two offspring
-
numberOfRequiredParents
public int numberOfRequiredParents()- Specified by:
numberOfRequiredParentsin interfaceCrossoverOperator<PermutationSolution<Integer>>
-
numberOfGeneratedChildren
public int numberOfGeneratedChildren()- Specified by:
numberOfGeneratedChildrenin interfaceCrossoverOperator<PermutationSolution<Integer>>
-