public class TSPGA extends GeneticAlgorithm<IntegerChromosome>
Modifier and Type | Class and Description |
---|---|
class |
TSPGA.TSPFitness |
GeneticAlgorithm.ElitismStrategy, GeneticAlgorithm.ResizeStrategy, GeneticAlgorithm.Statistics
algorithmListeners, body, DEFAULT_GENERATION_LIMIT, DEFAULT_HISTORY_SIZE, elitism, elitismStrategy, fullEvaluationForced, generation, generationLimit, generationListeners, initialPopulation, MAX_HISTORY_SIZE, MIN_HISTORY_SIZE, random, randomization, resizeStrategy, statistics
Constructor and Description |
---|
TSPGA(double[][] matrix,
Population<IntegerChromosome> pop,
int genlimit) |
Modifier and Type | Method and Description |
---|---|
protected void |
randomizeIndividual(Individual<IntegerChromosome> individual)
Performs an individual randomization.
|
addAlgorithmEventListener, addGenerationEventListener, addStage, applyElitism, end, evaluateIndividual, evaluatePopulation, evaluatePopulation, evolve, evolve, evolve, getBody, getCurrentPopulation, getElitism, getElitismStrategy, getFitness, getGeneration, getGenerationLimit, getHistoryAt, getHistorySize, getInitialPopulation, getLastPopulation, getNextPopulation, getPool, getRandomization, getResizeStrategy, getRunner, getStatistics, isBiggerBetter, isFitnessChanged, isFullEvaluationForced, onGeneration, onInit, onStart, onStop, randomizePopulation, removeAlgorithmEventListener, removeGenerationEventListener, setBiggerIsBetter, setElitism, setElitismStrategy, setFitness, setFullEvaluationForced, setGenerationLimit, setHistorySize, setRandomization, setRandomization, setRandomSeed, setResizeStrategy, setRunner, start, stop, toString, updateStatistics
public TSPGA(double[][] matrix, Population<IntegerChromosome> pop, int genlimit)
protected void randomizeIndividual(Individual<IntegerChromosome> individual)
GeneticAlgorithm
GeneticAlgorithm.randomizePopulation(Population)
. By default randomization is
delegated to the individual. In some problems, it would be useful to
control the randomization process of individual. This is especially the
case of when there are some constraints on genes in order to make the
individual valid.
randomizeIndividual
in class GeneticAlgorithm<IntegerChromosome>
individual
- the individual to be randomize