|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sdt.ga.Population
Provides a representation of a population in a particular genertion. The population consists of a number of organisms.
Field Summary | |
Population |
old
|
Organism[] |
storage
|
Constructor Summary | |
Population(GeneticAlgorithm ga,
boolean instantiate_organisms)
Creates an instance of population with organisms instatiated depending on the specification |
Method Summary | |
protected void |
applyMGAOps(Organism incumbent)
Implements the MGA operations. |
void |
crossover()
Implements the recombination by crossing over successive organisms. |
Fitness |
getAvgFitness()
|
Organism |
getFittestOrganism()
Returns the fittest organism in the current population. |
Organism |
getRandomOrganism()
|
int |
getRandomPosition(int length)
|
void |
mutate()
Implements the mutation operator |
void |
populateWith(Population old)
Implements the tournament selection of organisms in the present population from the old population. |
void |
populateWith(Population old,
Organism incumbent,
Organism[] MGA)
Tournament Selection operation when MGA solutions are required. |
void |
randomize()
Randomizes the population by randomizing each constituting organism. |
void |
setGA(GeneticAlgorithm ga)
|
java.lang.String |
toString()
|
protected Organism[] |
updateMGA(Organism[] MGA,
Organism incumbent)
updates the MGA solution set if better solutions are found. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public Organism[] storage
public Population old
Constructor Detail |
public Population(GeneticAlgorithm ga, boolean instantiate_organisms)
Method Detail |
public void randomize()
public void populateWith(Population old)
public void populateWith(Population old, Organism incumbent, Organism[] MGA)
protected void applyMGAOps(Organism incumbent)
protected Organism[] updateMGA(Organism[] MGA, Organism incumbent)
public void crossover()
public void mutate()
public Organism getRandomOrganism()
public Organism getFittestOrganism()
public Fitness getAvgFitness()
public void setGA(GeneticAlgorithm ga)
public java.lang.String toString()
public int getRandomPosition(int length)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |