The name is absent



APPENDIX A. SOURCE CODE

76


A.2 countRoadUsers for the self organizing traffic

ligths

For updating kappa in the proposed self-organizing traffic light controllers it is
needed to count the vehicles of a specific lane.

public int countRoadusers ( Drivelane lane , int range) {

int cntr = 0;

Roaduser ru ;

boolean stop = false ;

LinkedList queue = lane . getQueue ();

ListIterator li = queue. listIterator ();

while ( li . hasNext () && !stop) {

try

{

ru = ( Roaduser) li . next ();

}

catch (Exception e)

{

// When this exception is thrown you removed the first element

// of the queue, therefore re -create the iterator .

System.out. println ("CME");

li = queue. listIterator ();

continue ;

}

if (ru . getPosition () <= range)

cntr ++;

else

stop = true ;

}

return cntr ;

}



More intriguing information

1. Psychological Aspects of Market Crashes
2. Nonparametric cointegration analysis
3. Outline of a new approach to the nature of mind
4. The WTO and the Cartagena Protocol: International Policy Coordination or Conflict?
5. Methods for the thematic synthesis of qualitative research in systematic reviews
6. Corporate Taxation and Multinational Activity
7. Gender and headship in the twenty-first century
8. Non-causality in Bivariate Binary Panel Data
9. The name is absent
10. The name is absent
11. Has Competition in the Japanese Banking Sector Improved?
12. The name is absent
13. Les freins culturels à l'adoption des IFRS en Europe : une analyse du cas français
14. LABOR POLICY AND THE OVER-ALL ECONOMY
15. Cultural Diversity and Human Rights: a propos of a minority educational reform
16. Nach der Einführung von Arbeitslosengeld II: deutlich mehr Verlierer als Gewinner unter den Hilfeempfängern
17. The name is absent
18. NATURAL RESOURCE SUPPLY CONSTRAINTS AND REGIONAL ECONOMIC ANALYSIS: A COMPUTABLE GENERAL EQUILIBRIUM APPROACH
19. Inflation Targeting and Nonlinear Policy Rules: The Case of Asymmetric Preferences (new title: The Fed's monetary policy rule and U.S. inflation: The case of asymmetric preferences)
20. On Social and Market Sanctions in Deterring non Compliance in Pollution Standards