Appendix A
Source Code
In this chapter are some parts of code given which are discussed in chapter 4
(Coding process). The complete source code is available at the sourceforge site
for the project moreV T S [mor].
A.1 control on switching lights
For the proposed traffic light controllers it was needed to have control of when
traffic lights should switch. The use of a few flags will make it able to do this.
keepSwitchControl is used to specify which traffic light controllers need to con-
trol the switching itself. keepT LDF lag is used to fixate a specific traffic light
configuration.
if ( tlcontroller . getKeepSwitchControl ()) {
if (!( node.getKeepTLDDFlag()))
switchTrafficLights (( Junction )node, decisions [ i ]);
else
switchTrafficLights (( Jucntion )node, decisions [ i ]);
75