|
|||||||||
| 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.ACGJ3Individual
protected class ACGJ3.ACGJ3Individual
DOCUMENT ME!
| Field Summary | |
|---|---|
protected byte[] |
bytema
The Chromosomes as gotten from mama |
protected byte[] |
bytepa
DOCUMENT ME! |
protected float |
fitness
DOCUMENT ME! |
protected float[][][] |
me
The array of float values that describe this ACGJ3Individual. |
protected int |
move
DOCUMENT ME! |
protected java.lang.String |
myParentName
DOCUMENT ME! |
protected int |
wait
DOCUMENT ME! |
| Constructor Summary | |
|---|---|
protected |
ACGJ3.ACGJ3Individual()
Constructor for loading |
protected |
ACGJ3.ACGJ3Individual(byte[] ma,
byte[] pa)
Creates a new ACGJ3Individual, providing the reproduction genes from daddy and mummy |
protected |
ACGJ3.ACGJ3Individual(Infrastructure infra)
Creates a new ACGJ3Individual, providing the Infrastructure it should run on |
| Method Summary | |
|---|---|
protected void |
createMe()
DOCUMENT ME! |
protected float |
getFitness()
Returns the fitness of the current Individual, as was set at iterating through this generation |
protected byte[][] |
getGenes()
Returns the genes of this ACGJ3Individual |
protected int |
getMove()
Returns the amount of Roadusers that did move during this Individuals lifespan |
protected float |
getQValue(int node,
int tl)
Calculates the current gain of the given TrafficLight |
protected byte[] |
getReproGenes(float cross,
float mutate)
Returns some reproduction genes from this ACGJ3Individual. |
protected int |
getWait()
returns the number of Roadusers this Individual caused to wait |
java.lang.String |
getXMLName()
DOCUMENT ME! |
void |
load(XMLElement myElement,
XMLLoader loader)
DOCUMENT ME! |
protected void |
relaxBucket(int node,
TrafficLight tl)
Empties the 'gain-value' bucket partly, which is being filled when Roadusers are waiting/voting for their TrafficLight to be set to green. |
protected void |
reset()
Resets the buckets and waiting values for this Individual |
void |
saveChilds(XMLSaver saver)
DOCUMENT ME! |
XMLElement |
saveSelf()
DOCUMENT ME! |
protected void |
setFitness(float fit)
Sets the fitness of this Individual |
protected void |
setMove(int _move)
Sets the amount of Roadusers that did move during this Individual's lifespan |
void |
setParentName(java.lang.String parentName)
DOCUMENT ME! |
protected void |
setWait(int _wait)
Sets the number of cars that this Individual caused to wait |
protected void |
siphonToOtherBucket(TrafficLight here,
TrafficLight there)
When a Roaduser may drive according to it's Sign, but cant as the desired Drivelane is full, (some/all) of the current gain-bucket of it's current TrafficLight is siphoned over to the desired Drivelane, making it more probable that that lane will move, making it possible for this Drivelane to move. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected byte[] bytema
protected byte[] bytepa
protected float[][][] me
protected int wait
protected int move
protected float fitness
protected java.lang.String myParentName
| Constructor Detail |
|---|
protected ACGJ3.ACGJ3Individual(Infrastructure infra)
infra - DOCUMENT ME!
protected ACGJ3.ACGJ3Individual(byte[] ma,
byte[] pa)
ma - DOCUMENT ME!pa - DOCUMENT ME!protected ACGJ3.ACGJ3Individual()
| Method Detail |
|---|
protected void createMe()
protected void reset()
protected byte[][] getGenes()
protected byte[] getReproGenes(float cross,
float mutate)
cross - DOCUMENT ME!mutate - DOCUMENT ME!
protected float getFitness()
protected void setFitness(float fit)
fit - protected void setWait(int _wait)
_wait - protected int getWait()
protected void setMove(int _move)
_move - protected int getMove()
protected float getQValue(int node,
int tl)
node - the Id of the Node this TrafficLight belongs totl - The position of the TrafficLight in the TLDecision[][]
protected void relaxBucket(int node,
TrafficLight tl)
node - The Id of the Node of which a bucket has to be emptied a
bittl - The TrafficLight of which a bucket has to be partly
emptied in the TLDecision[][]
protected void siphonToOtherBucket(TrafficLight here,
TrafficLight there)
here - the Id of the Node at which the Roaduser is waitingthere - The TrafficLight the Roaduser is waiting for
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 | ||||||||