APPENDIX A. SOURCE CODE
80
public TLDecision [][] decideTLs() {
TLDecision currentDec ;
Drivelane curLane;
// System.out . println ("#### TLDATA-"+this.getCurCycle()+" ####");
// adjust data after last cycle
updateTLDs();
for ( int i = 0; i < tld . length ; i++) { // for all nodes
Node currentNode = null ;
for ( int j = 0; j < tld [i ]. length ; j++)
if (currentNode == null ) currentNode= tld [ i ][ j ]. getTL (). getNode ();
if (currentNode != null && currentNode.getKeepTLDFlag()) {
currentNode. decrPhaseMinimal ();
}
for (int j = 0; j < tld [i ]. length; j++) { // for all inbound lanes in node
currentDec = tld [ i ][ j ];
curLane = tld [i ][j ]. getTL (). getLane ();
int cntr = countRoadusers(curLane,VISIBLE);
if (! tld [ i ][j ]. getTL (). getState ())
currentDec . addKappa(cntr );
if (currentNode. getPhaseMinimal() <= 0
&& !currentNode. isPlatoonCrossing ()
&& currentDec.getKappa() >= TETA) {
currentDec . setQValue(currentDec . getKappa ());
currentNode . setKeepTLDFlag(false);
// curDec.setQValue (1);
}
else
More intriguing information
1. The effect of classroom diversity on tolerance and participation in England, Sweden and Germany2. Work Rich, Time Poor? Time-Use of Women and Men in Ireland
3. Structural Breakpoints in Volatility in International Markets
4. Climate change, mitigation and adaptation: the case of the Murray–Darling Basin in Australia
5. Luce Irigaray and divine matter
6. The name is absent
7. An alternative way to model merit good arguments
8. Confusion and Reinforcement Learning in Experimental Public Goods Games
9. Why unwinding preferences is not the same as liberalisation: the case of sugar
10. Dual Inflation Under the Currency Board: The Challenges of Bulgarian EU Accession