|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.architecture.traffic.algorithms.tlc.TLController
public abstract class TLController
This is the abstract class for Traffic light algorithms. It is informed about every movement made by road users. In this way not every road user has to be iterated. By using this information it provides a table containing Q-values(reward values) for each trafficlight in it's 'Green' setting.
| Nested Class Summary | |
|---|---|
protected class |
TLController.TLCDialog
The dialog used to set TLController properties. |
protected class |
TLController.TLCSettings
Class used in combination with TLCDialog to modify TLC-specific settings. |
| Field Summary | |
|---|---|
protected Infrastructure |
infra
DOCUMENT ME! |
protected int |
num_tls
DOCUMENT ME! |
protected TLDecision[][] |
tld
DOCUMENT ME! |
int |
trackNode
DOCUMENT ME! |
| Method Summary | |
|---|---|
protected void |
applyGainValues(TLDecision[][] array,
float[][] value)
Apply an array of Gain-values to an array of TLDecisions Assumes that the dimensions of the two arrays are equal. |
TLDecision[][] |
createDecisionArray(Infrastructure infra)
Creates a TLDecision[][] for the given infrastructure. |
abstract TLDecision[][] |
decideTLs()
Calculates how every traffic light should be switched |
protected TLController.TLCSettings |
doSettingsDialog(Controller c,
TLController.TLCSettings settings)
Shows the TLC settings dialog for the given TLCSettings. |
protected float[][] |
getGainValuesFromDecisionArray(TLDecision[][] array)
Extracts the Gain-values of a decision array for load/save |
Infrastructure |
getInfrastructure()
DOCUMENT ME! |
int |
getNumTLs()
Returns the number of TrafficLights in this Infrastructure |
void |
load(XMLElement myElement,
XMLLoader loader)
DOCUMENT ME! |
void |
loadSecondStage(java.util.Dictionary dictionaries)
DOCUMENT ME! |
void |
reset()
Resets the Algorithm |
void |
saveChilds(XMLSaver saver)
DOCUMENT ME! |
XMLElement |
saveSelf()
DOCUMENT ME! |
void |
setInfrastructure(Infrastructure i)
DOCUMENT ME! |
void |
setParentName(java.lang.String parentName)
DOCUMENT ME! |
void |
showSettings(Controller c)
To be overridden by subclasses if TLC settings are to be modified. |
void |
trackNode(int i)
Sets the Node that can be tracked during excecution of a TLC |
abstract void |
updateRoaduserMove(Roaduser _ru,
Drivelane _prevlane,
Sign _prevsign,
int _prevpos,
Drivelane _dlanenow,
Sign _signnow,
int _posnow,
PosMov[] posMovs,
Drivelane _desiredLane)
DOCUMENT ME! |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jscience.architecture.traffic.xml.XMLSerializable |
|---|
getXMLName |
| Field Detail |
|---|
protected Infrastructure infra
protected TLDecision[][] tld
public int trackNode
protected int num_tls
| Method Detail |
|---|
public Infrastructure getInfrastructure()
public void setInfrastructure(Infrastructure i)
i - DOCUMENT ME!public abstract TLDecision[][] decideTLs()
gld.algo.tlc.TLDecisionpublic TLDecision[][] createDecisionArray(Infrastructure infra)
infra - DOCUMENT ME!
protected float[][] getGainValuesFromDecisionArray(TLDecision[][] array)
array - DOCUMENT ME!
protected void applyGainValues(TLDecision[][] array,
float[][] value)
array - DOCUMENT ME!value - DOCUMENT ME!public void reset()
public void trackNode(int i)
i - DOCUMENT ME!public int getNumTLs()
public abstract void updateRoaduserMove(Roaduser _ru,
Drivelane _prevlane,
Sign _prevsign,
int _prevpos,
Drivelane _dlanenow,
Sign _signnow,
int _posnow,
PosMov[] posMovs,
Drivelane _desiredLane)
_ru - DOCUMENT ME!_prevlane - DOCUMENT ME!_prevsign - DOCUMENT ME!_prevpos - DOCUMENT ME!_dlanenow - DOCUMENT ME!_signnow - DOCUMENT ME!_posnow - DOCUMENT ME!posMovs - DOCUMENT ME!_desiredLane - DOCUMENT ME!
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 void setParentName(java.lang.String parentName)
throws XMLTreeException
setParentName in interface XMLSerializableparentName - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!
public void loadSecondStage(java.util.Dictionary dictionaries)
throws XMLInvalidInputException,
XMLTreeException
loadSecondStage in interface TwoStageLoaderdictionaries - DOCUMENT ME!
XMLInvalidInputException - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!public void showSettings(Controller c)
c - DOCUMENT ME!
protected TLController.TLCSettings doSettingsDialog(Controller c,
TLController.TLCSettings settings)
c - DOCUMENT ME!settings - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||