|
|||||||||
| 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
org.jscience.architecture.traffic.algorithms.tlc.LocalHillTLC
public class LocalHillTLC
This controller will decide it's Q values for the traffic lights according to the traffic situation on / the lane connected to the TrafficLight. It will learn how to alter it's outcome by reinforcement learning.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jscience.architecture.traffic.algorithms.tlc.TLController |
|---|
TLController.TLCDialog, TLController.TLCSettings |
| Field Summary | |
|---|---|
protected Node[] |
allnodes
DOCUMENT ME! |
protected Infrastructure |
infrastructure
DOCUMENT ME! |
protected int |
iteration_length
DOCUMENT ME! |
protected int |
num_nodes
DOCUMENT ME! |
protected int |
numSigns
DOCUMENT ME! |
protected java.util.Random |
seed
DOCUMENT ME! |
protected static java.lang.String |
shortXMLName
DOCUMENT ME! |
protected java.util.Vector |
tld_backup
DOCUMENT ME! |
protected int[] |
v_table
DOCUMENT ME! |
| Fields inherited from class org.jscience.architecture.traffic.algorithms.tlc.TLController |
|---|
infra, num_tls, tld, trackNode |
| Constructor Summary | |
|---|---|
LocalHillTLC(Infrastructure infra)
The constructor for TL controllers |
|
| Method Summary | |
|---|---|
protected void |
changeTLD(Node thisnode,
Sign[] config)
DOCUMENT ME! |
protected int |
computePoints(TLDecision[][] tld)
DOCUMENT ME! |
TLDecision[][] |
decideTLs()
Calculates how every traffic light should be switched Per node, per sign the waiting roadusers are passed and per each roaduser the gain is calculated. |
float |
getColearnValue(Sign now,
Sign sign,
Node des,
int pos)
DOCUMENT ME! |
java.lang.String |
getXMLName()
DOCUMENT ME! |
protected boolean |
isRed(TLDecision[] tld_node,
int sign_id)
DOCUMENT ME! |
void |
load(XMLElement myElement,
XMLLoader loader)
DOCUMENT ME! |
void |
loadSecondStage(java.util.Dictionary dictionaries)
DOCUMENT ME! |
protected void |
reset_v_table()
DOCUMENT ME! |
protected void |
restoreTLD(Node thisnode)
DOCUMENT ME! |
void |
saveChilds(XMLSaver saver)
DOCUMENT ME! |
XMLElement |
saveSelf()
DOCUMENT ME! |
void |
setInfrastructure(Infrastructure infra)
DOCUMENT ME! |
void |
showSettings(Controller c)
DOCUMENT ME! |
void |
updateRoaduserMove(Roaduser ru,
Drivelane currentlane,
Sign currentsign,
int prevpos,
Drivelane nextlane,
Sign nextsign,
int posnow,
PosMov[] posMovs,
Drivelane desired)
DOCUMENT ME! |
| Methods inherited from class org.jscience.architecture.traffic.algorithms.tlc.TLController |
|---|
applyGainValues, createDecisionArray, doSettingsDialog, getGainValuesFromDecisionArray, getInfrastructure, getNumTLs, reset, setParentName, trackNode |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String shortXMLName
protected Infrastructure infrastructure
protected Node[] allnodes
protected int num_nodes
protected int numSigns
protected java.util.Random seed
protected java.util.Vector tld_backup
protected int[] v_table
protected final int iteration_length
| Constructor Detail |
|---|
public LocalHillTLC(Infrastructure infra)
throws InfraException
infra - model being used.
InfraException - DOCUMENT ME!| Method Detail |
|---|
public void setInfrastructure(Infrastructure infra)
setInfrastructure in class TLControllerinfra - DOCUMENT ME!public TLDecision[][] decideTLs()
decideTLs in class TLControllergld.algo.tlc.TLDecisionprotected void reset_v_table()
protected int computePoints(TLDecision[][] tld)
throws InfraException
tld - DOCUMENT ME!
InfraException - DOCUMENT ME!
public void updateRoaduserMove(Roaduser ru,
Drivelane currentlane,
Sign currentsign,
int prevpos,
Drivelane nextlane,
Sign nextsign,
int posnow,
PosMov[] posMovs,
Drivelane desired)
updateRoaduserMove in class TLControllerru - DOCUMENT ME!currentlane - DOCUMENT ME!currentsign - DOCUMENT ME!prevpos - DOCUMENT ME!nextlane - DOCUMENT ME!nextsign - DOCUMENT ME!posnow - DOCUMENT ME!posMovs - DOCUMENT ME!desired - DOCUMENT ME!
protected boolean isRed(TLDecision[] tld_node,
int sign_id)
tld_node - DOCUMENT ME!sign_id - DOCUMENT ME!
protected void changeTLD(Node thisnode,
Sign[] config)
thisnode - DOCUMENT ME!config - DOCUMENT ME!protected void restoreTLD(Node thisnode)
thisnode - DOCUMENT ME!
public float getColearnValue(Sign now,
Sign sign,
Node des,
int pos)
getColearnValue in interface Colearningnow - DOCUMENT ME!sign - DOCUMENT ME!des - DOCUMENT ME!pos - DOCUMENT ME!
public void load(XMLElement myElement,
XMLLoader loader)
throws XMLTreeException,
java.io.IOException,
XMLInvalidInputException
load in interface XMLSerializableload in class TLControllermyElement - DOCUMENT ME!loader - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!
java.io.IOException - DOCUMENT ME!
XMLInvalidInputException - DOCUMENT ME!
public XMLElement saveSelf()
throws XMLCannotSaveException
saveSelf in interface XMLSerializablesaveSelf in class TLControllerXMLCannotSaveException - DOCUMENT ME!
public void saveChilds(XMLSaver saver)
throws XMLTreeException,
java.io.IOException,
XMLCannotSaveException
saveChilds in interface XMLSerializablesaveChilds in class TLControllersaver - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!
java.io.IOException - DOCUMENT ME!
XMLCannotSaveException - DOCUMENT ME!public java.lang.String getXMLName()
getXMLName in interface XMLSerializable
public void loadSecondStage(java.util.Dictionary dictionaries)
throws XMLInvalidInputException,
XMLTreeException
loadSecondStage in interface TwoStageLoaderloadSecondStage in class TLControllerdictionaries - DOCUMENT ME!
XMLInvalidInputException - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!public void showSettings(Controller c)
showSettings in class TLControllerc - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||