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. National curriculum assessment: how to make it better2. The name is absent
3. The WTO and the Cartagena Protocol: International Policy Coordination or Conflict?
4. The name is absent
5. 03-01 "Read My Lips: More New Tax Cuts - The Distributional Impacts of Repealing Dividend Taxation"
6. Graphical Data Representation in Bankruptcy Analysis
7. The Impact of Optimal Tariffs and Taxes on Agglomeration
8. The Role of Trait Emotional Intelligence (El) in the Workplace.
9. El impacto espacial de las economías de aglomeración y su efecto sobre la estructura urbana.El caso de la industria en Barcelona, 1986-1996
10. Learning and Endogenous Business Cycles in a Standard Growth Model