|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jgap.impl.GreedyCrossover
Greedy crossover can be best explained in the terms of the Traveling Salesman Problem: The algorithm selects the first city of one parent, compares the cities leaving that city in both parents, and chooses the closer one to extend the tour. If one city has already appeared in the tour, we choose the other city. If both cities have already appeared, we randomly select a non-selected city.
CrossoverOperator)Grefenstette, R. Gopal, R. Rosmaita, and D. Gucht.
Genetic algorithms for the traveling salesman problem.
In Proceedings of the Second International Conference on Genetic Algorithms.
Lawrence Eribaum Associates, Mahwah, NJ, 1985.
and also {@link http://ecsl.cs.unr.edu/docs/techreports/gong/node3.html
Sushil J. Louis & Gong Li },
Serialized Form| Field Summary | |
static boolean |
ASSERTIONS
Switches assertions on. |
| Constructor Summary | |
GreedyCrossover()
|
|
| Method Summary | |
double |
distance(java.lang.Object a_from,
java.lang.Object a_to)
Compute the distance between "cities", indicated by these two given genes. |
int |
getStartOffset()
Gets a number of genes at the start of chromosome, that are excluded from the swapping. |
void |
operate(Population a_population,
java.util.List a_candidateChromosomes)
The operate method will be invoked on each of the genetic operators referenced by the current Configuration object during the evolution phase. |
void |
setStartOffset(int a_offset)
Sets a number of genes at the start of chromosome, that are excluded from the swapping. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static boolean ASSERTIONS
| Constructor Detail |
public GreedyCrossover()
| Method Detail |
public double distance(java.lang.Object a_from,
java.lang.Object a_to)
a_from - Objecta_to - Object
public void operate(Population a_population,
java.util.List a_candidateChromosomes)
GeneticOperator
operate in interface GeneticOperatora_population - The population of chromosomes from the current
evolution prior to exposure to any genetic operators.
Chromosomes in this array should never be modified.a_candidateChromosomes - The pool of chromosomes that have been selected
for the next evolved population.public void setStartOffset(int a_offset)
a_offset - intpublic int getStartOffset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||