|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.architecture.traffic.algorithms.tlc.ACGJ3.ACGJ3Population
protected class ACGJ3.ACGJ3Population
DOCUMENT ME!
| Field Summary | |
|---|---|
protected float |
crossover
the chance that crossover occurs at evolving. |
protected ACGJ3.ACGJ3Individual[] |
inds
DOCUMENT ME! |
protected float |
mutate
the chance that mutation occurs when evolving. |
protected int |
num_gen
the total amount of generations this population should evolve over |
protected int |
num_ind
the current number of individuals in this population |
protected int |
this_gen
a counter for the current generation of Individuals |
protected int |
this_ind
the current Individual that's showing off it's coolness |
| Constructor Summary | |
|---|---|
protected |
ACGJ3.ACGJ3Population()
Creates a new ACGJ3Population object. |
protected |
ACGJ3.ACGJ3Population(Infrastructure infra,
int _num_ind,
int _num_gen,
float cross,
float mut)
Creates a new population of ACGJ3Individuals |
| Method Summary | |
|---|---|
protected float |
calcFitness(ACGJ3.ACGJ3Individual ind)
Calculates the fitness of this Individual |
protected void |
evolve()
Evolves the current generation of ACGJ3Individuals in the ACGJ3Population into a new one. |
protected int |
getCurrentGenerationNum()
DOCUMENT ME! |
protected ACGJ3.ACGJ3Individual |
getIndividual()
DOCUMENT ME! |
protected ACGJ3.ACGJ3Individual |
getNextIndividual(int wait,
int move)
DOCUMENT ME! |
java.lang.String |
getXMLName()
DOCUMENT ME! |
void |
load(XMLElement myElement,
XMLLoader loader)
DOCUMENT ME! |
protected ACGJ3.ACGJ3Individual[] |
mate(ACGJ3.ACGJ3Individual ma,
ACGJ3.ACGJ3Individual pa)
Mates two ACGJ3Individuals creating two new ACGJ3Individuals |
void |
saveChilds(XMLSaver saver)
DOCUMENT ME! |
XMLElement |
saveSelf()
DOCUMENT ME! |
void |
setParentName(java.lang.String parentName_)
DOCUMENT ME! |
protected ACGJ3.ACGJ3Individual[] |
sortIndsArr(ACGJ3.ACGJ3Individual[] ar)
BubbleSorts an array of ACGJ3Individuals on the parameter of performance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected float mutate
protected float crossover
protected int num_ind
protected int num_gen
protected int this_ind
protected int this_gen
protected ACGJ3.ACGJ3Individual[] inds
| Constructor Detail |
|---|
protected ACGJ3.ACGJ3Population(Infrastructure infra,
int _num_ind,
int _num_gen,
float cross,
float mut)
infra - The Infrastructure the population will run on_num_ind - the number of individuals in the population_num_gen - the number of generations there should be evolved
overcross - the chance that crossover occurs at reproductionmut - the chance that mutation occurs at reproductionprotected ACGJ3.ACGJ3Population()
| Method Detail |
|---|
protected int getCurrentGenerationNum()
protected ACGJ3.ACGJ3Individual getIndividual()
protected ACGJ3.ACGJ3Individual getNextIndividual(int wait,
int move)
wait - The performance of the current Individualmove - DOCUMENT ME!
protected ACGJ3.ACGJ3Individual[] sortIndsArr(ACGJ3.ACGJ3Individual[] ar)
ar - the array to be sorted
protected float calcFitness(ACGJ3.ACGJ3Individual ind)
ind - the individual of which the fitness has to be calculated
protected ACGJ3.ACGJ3Individual[] mate(ACGJ3.ACGJ3Individual ma,
ACGJ3.ACGJ3Individual pa)
ma - The mamma-ACGJ3Individualpa - The pappa-ACGJ3Individual
protected void evolve()
public void load(XMLElement myElement,
XMLLoader loader)
throws XMLTreeException,
java.io.IOException,
XMLInvalidInputException
load in interface XMLSerializablemyElement - DOCUMENT ME!loader - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!
java.io.IOException - DOCUMENT ME!
XMLInvalidInputException - DOCUMENT ME!
public XMLElement saveSelf()
throws XMLCannotSaveException
saveSelf in interface XMLSerializableXMLCannotSaveException - DOCUMENT ME!
public void saveChilds(XMLSaver saver)
throws XMLTreeException,
java.io.IOException,
XMLCannotSaveException
saveChilds in interface XMLSerializablesaver - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!
java.io.IOException - DOCUMENT ME!
XMLCannotSaveException - DOCUMENT ME!public java.lang.String getXMLName()
getXMLName in interface XMLSerializable
public void setParentName(java.lang.String parentName_)
throws XMLTreeException
setParentName in interface XMLSerializableparentName_ - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||