|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.architecture.traffic.algorithms.tlc.SignController
public class SignController
This is the class for the sign controller. Here is decided how each sign should work. Reward values are gathered for each sign, when set on 'Green' asking the applied TLController. Non-TrafficLight signs can also be implemented when a Q-value algorithm is implemented for the appropiate type of sign. After those values are gathered, this class will select the most rewarding trafficlightconfiguration for each Node and will set the Signs accordingly.
gld.infra.Sign| Field Summary | |
|---|---|
static boolean |
CrossNodesSafely
Indicates if trafficlights must be switched safely or not. |
protected Sign[][] |
currentSC
DOCUMENT ME! |
protected Infrastructure |
infra
DOCUMENT ME! |
protected int |
num_nodes
DOCUMENT ME! |
protected static java.lang.String |
shortXMLName
DOCUMENT ME! |
protected TLController |
tlcontroller
The TLcontroller is used to gather Q-values and use them to set all the TLs |
| Constructor Summary | |
|---|---|
SignController(TLController t,
Infrastructure i)
Creates a new SignController object. |
|
| Method Summary | |
|---|---|
protected Sign[] |
calcOverlap(Sign[] ar1,
Sign[] ar2)
DOCUMENT ME! |
Infrastructure |
getInfrastructure()
DOCUMENT ME! |
TLController |
getTLC()
DOCUMENT ME! |
java.lang.String |
getXMLName()
DOCUMENT ME! |
void |
load(XMLElement myElement,
XMLLoader loader)
DOCUMENT ME! |
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 |
setTLC(TLController t)
DOCUMENT ME! |
void |
switchSigns()
Switch all the signs to their appropiate value. |
void |
switchTrafficLights(Junction node,
TLDecision[] dec)
Switch the the TLsigns to their appropiate value The configuration with highest total gain is chosen |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean CrossNodesSafely
protected static final java.lang.String shortXMLName
protected TLController tlcontroller
protected Infrastructure infra
protected int num_nodes
protected Sign[][] currentSC
| Constructor Detail |
|---|
public SignController(TLController t,
Infrastructure i)
t - DOCUMENT ME!i - DOCUMENT ME!| Method Detail |
|---|
public Infrastructure getInfrastructure()
public void setInfrastructure(Infrastructure i)
i - DOCUMENT ME!public TLController getTLC()
public void setTLC(TLController t)
t - DOCUMENT ME!public void switchSigns()
public void switchTrafficLights(Junction node,
TLDecision[] dec)
node - DOCUMENT ME!dec - The decision array consists of the generated values.
protected Sign[] calcOverlap(Sign[] ar1,
Sign[] ar2)
ar1 - DOCUMENT ME!ar2 - 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 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 | ||||||||