CHAPTER 4. CODING PROCESS
14
4.2.4 Traffic light controllers
Junction.signconfigs contains all possible combinations of signs which may be
turned green at the same time. It is set by addSCData of (gld.edit) Validation
The method calcSC of (gld.algo.edit) SignConfigCalculator calculates all pos-
sible combinations of green lights.
SignController.switchTrafficLights checks which signconfig has the highest sum
of Q-values. The signconfig with the highest sum is chosen.
TLController is the abstract class for traffic light algorithms. It is informed on
every movement made by road users. In this way not every road user has to be
iterated. By using this information the TLController provides a table containing
Q-values for each trafficlight in its green setting.2
tld is an array in 2 dimensions. tld[i] represents a node i of the infrastructure.
tld[i][j] represents a TLDecision (for trafficlight) j of node i.
The concrete traffic light controllers are created by TLCFactory in the method
getInstanceForLoad which is called by genTLC. genTLC is called by method set-
TLC of SimController.
2info TLController.java