public final class PartiallyMatchedCrossover<T> extends Crossover<EnumGene<T>> implements Immutable
The PartiallyMatchedCrossover (PMX) guarantees that all Genes
are found exactly once in each chromosome. No gene is duplicated by this
crossover. The PMX can be applied usefully in the TSP or other permutation
problem encodings. Permutation encoding is useful for all problems where the
fitness only depends on the ordering of the genes within the chromosome. This
is the case in many combinatorial optimization problems. Other crossover
operators for combinatorial optimization are:
C1 = 012|345|6789
C2 = 987|654|3210
After performing the crossover we normally got two invalid chromosomes.
C1 = 012|654|6789
C2 = 987|345|3210
Chromosome C1 contains the value 6 twice and misses the value
3. On the other side chromosome C2 contains the value 3 twice and
misses the value 6. We can observe that this crossover is equivalent
to the exchange of the values 3 -> 6, 4 -> 5 and 5 -> 4. To repair the two
chromosomes we have to apply this exchange outside the crossing region.
C1 = 012|654|3789
C2 = 987|345|6210
PermutationChromosome_probability, DEFAULT_ALTER_PROBABILITY| Constructor and Description |
|---|
PartiallyMatchedCrossover(double probability) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
crossover(MSeq<EnumGene<T>> that,
MSeq<EnumGene<T>> other)
Template method which performs the crossover.
|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
toString() |
alter, getOrdergetProbability, Nullpublic PartiallyMatchedCrossover(double probability)
protected int crossover(MSeq<EnumGene<T>> that, MSeq<EnumGene<T>> other)
Crossoverpublic int hashCode()
hashCode in class AbstractAlterer<EnumGene<T>>© 2007-2013 Franz Wilhelmstötter (2013-12-18 20:17)