org.jscience.architecture.traffic.algorithms.tlc
Class RandomTLC

java.lang.Object
  extended by org.jscience.architecture.traffic.algorithms.tlc.TLController
      extended by org.jscience.architecture.traffic.algorithms.tlc.RandomTLC
All Implemented Interfaces:
TwoStageLoader, XMLSerializable

public class RandomTLC
extends TLController

This controller will switch TrafficLights at random.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jscience.architecture.traffic.algorithms.tlc.TLController
TLController.TLCDialog, TLController.TLCSettings
 
Field Summary
protected  int num_nodes
          DOCUMENT ME!
protected  java.util.Random seed
          DOCUMENT ME!
protected static java.lang.String shortXMLName
          DOCUMENT ME!
 
Fields inherited from class org.jscience.architecture.traffic.algorithms.tlc.TLController
infra, num_tls, tld, trackNode
 
Constructor Summary
RandomTLC(Infrastructure infra)
          Creates a new RandomTLC object.
RandomTLC(Infrastructure i, java.util.Random _seed)
          Creates a new RandomTLC object.
 
Method Summary
 TLDecision[][] decideTLs()
          Calculates how every traffic light should be switched
 java.lang.String getXMLName()
          DOCUMENT ME!
 XMLElement saveSelf()
          DOCUMENT ME!
 void setInfrastructure(Infrastructure i)
          DOCUMENT ME!
 void updateRoaduserMove(Roaduser _ru, Drivelane _prevlane, Sign _prevsign, int _prevpos, Drivelane _dlanenow, Sign _signnow, 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, load, loadSecondStage, reset, saveChilds, setParentName, showSettings, trackNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shortXMLName

protected static final java.lang.String shortXMLName
DOCUMENT ME!

See Also:
Constant Field Values

num_nodes

protected int num_nodes
DOCUMENT ME!


seed

protected java.util.Random seed
DOCUMENT ME!

Constructor Detail

RandomTLC

public RandomTLC(Infrastructure i,
                 java.util.Random _seed)
Creates a new RandomTLC object.

Parameters:
i - DOCUMENT ME!
_seed - DOCUMENT ME!

RandomTLC

public RandomTLC(Infrastructure infra)
Creates a new RandomTLC object.

Parameters:
infra - DOCUMENT ME!
Method Detail

setInfrastructure

public void setInfrastructure(Infrastructure i)
DOCUMENT ME!

Overrides:
setInfrastructure in class TLController
Parameters:
i - DOCUMENT ME!

decideTLs

public TLDecision[][] decideTLs()
Calculates how every traffic light should be switched

Specified by:
decideTLs in class TLController
Returns:
DOCUMENT ME!
See Also:
gld.algo.tlc.TLDecision

updateRoaduserMove

public void updateRoaduserMove(Roaduser _ru,
                               Drivelane _prevlane,
                               Sign _prevsign,
                               int _prevpos,
                               Drivelane _dlanenow,
                               Sign _signnow,
                               int _posnow,
                               PosMov[] posMovs,
                               Drivelane desired)
DOCUMENT ME!

Specified by:
updateRoaduserMove in class TLController
Parameters:
_ru - DOCUMENT ME!
_prevlane - DOCUMENT ME!
_prevsign - DOCUMENT ME!
_prevpos - DOCUMENT ME!
_dlanenow - DOCUMENT ME!
_signnow - DOCUMENT ME!
_posnow - DOCUMENT ME!
posMovs - DOCUMENT ME!
desired - DOCUMENT ME!

saveSelf

public XMLElement saveSelf()
                    throws XMLCannotSaveException
DOCUMENT ME!

Specified by:
saveSelf in interface XMLSerializable
Overrides:
saveSelf in class TLController
Returns:
DOCUMENT ME!
Throws:
XMLCannotSaveException - DOCUMENT ME!

getXMLName

public java.lang.String getXMLName()
DOCUMENT ME!

Returns:
DOCUMENT ME!