|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.architecture.traffic.algorithms.tlc.ACGJ4.Population
protected class ACGJ4.Population
DOCUMENT ME!
| Field Summary | |
|---|---|
protected ACGJ4.Individual[] |
inds
The Individuals in this population |
protected int |
this_gen
a counter for the current generation of Individuals |
protected int |
this_ind
the ID of the current Individual that's showing off it's coolness |
| Constructor Summary | |
|---|---|
protected |
ACGJ4.Population()
Creates a new Population object. |
protected |
ACGJ4.Population(Infrastructure infra)
Creates a new population of Individuals |
| Method Summary | |
|---|---|
protected float |
calcFitness(ACGJ4.Individual ind)
Calculates the fitness of this Individual |
protected void |
evolve()
Evolves the current generation of Individuals in the Population into a new one. |
protected int |
getCurrentGenerationNum()
DOCUMENT ME! |
protected ACGJ4.Individual |
getIndividual()
DOCUMENT ME! |
protected ACGJ4.Individual |
getNextIndividual(int wait,
int move)
DOCUMENT ME! |
java.lang.String |
getXMLName()
DOCUMENT ME! |
void |
load(XMLElement myElement,
XMLLoader loader)
DOCUMENT ME! |
protected ACGJ4.Individual[] |
mate(ACGJ4.Individual ma,
ACGJ4.Individual pa)
Mates two Individuals creating two new Individuals |
void |
saveChilds(XMLSaver saver)
DOCUMENT ME! |
XMLElement |
saveSelf()
DOCUMENT ME! |
void |
setParentName(java.lang.String parentName_)
DOCUMENT ME! |
protected ACGJ4.Individual[] |
sortIndsArr(ACGJ4.Individual[] 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 int this_ind
protected int this_gen
protected ACGJ4.Individual[] inds
| Constructor Detail |
|---|
protected ACGJ4.Population(Infrastructure infra)
infra - The Infrastructure the population will run onprotected ACGJ4.Population()
| Method Detail |
|---|
protected int getCurrentGenerationNum()
protected ACGJ4.Individual getIndividual()
protected ACGJ4.Individual getNextIndividual(int wait,
int move)
wait - The performance of the current Individualmove - DOCUMENT ME!
protected ACGJ4.Individual[] sortIndsArr(ACGJ4.Individual[] ar)
ar - the array to be sorted
protected float calcFitness(ACGJ4.Individual ind)
ind - the individual of which the fitness has to be calculated
protected ACGJ4.Individual[] mate(ACGJ4.Individual ma,
ACGJ4.Individual pa)
ma - The mamma-Individualpa - The pappa-Individual
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 | ||||||||