# A Division-of-Labour Approach to Traffic Light Scheduling
## 4 Empirical Procedure  
The developed division-of-labour-based traffic scheduling algorithm was tested against the static, Webster, and max pressure algorithms, as well as the DQN and DDPG-based reinforcement learning algorithms. These algorithms were selected for their applicability to isolated intersections. The static and Webster algorithms were chosen for their ability to handle constant streams of traffic, and the max pressure algorithm was chosen for its ability to handle changing streams of traffic. Furthermore, these three algorithms were also chosen for being established from their frequent use in practice. The DQN and DDPG-based algorithms were chosen for their potential performance gains from the usage of reinforcement learning and neural networks. All simulations simulated six hours of traffic on one of two intersection layouts. The first intersection layout consisted of a three-by-three grid of identical complex four-way intersections, as visualised in Figure 1. An individual intersection in this layout can be visualised in Figure 2. The first phase of the cycle of these intersections consisted of north-to-east and south-to-west moving traffic, and the second phase of the cycle consisted of north-to-south and south-to-north moving traffic. The third phase of the cycle consisted of west-to-north and east-to-south moving traffic, and the fourth phase of the cycle consisted of east-to-west and west-to-east moving traffic. Every road connected to the intersection consisted of three separate lanes. For this intersection layout, the algorithms were evaluated on five scenarios with different traffic characteristics:  
* Scenario One: Low traffic was constant in all directions, with an average of three vehicles entering the simulation every five seconds. This scenario tested the efficiency of an algorithm when controlling low amounts of traffic. * Scenario Two: High traffic was constant in all directions, with an average of three vehicles entering the simulation every second. This scenario tested the ability of an algorithm to handle high amounts of traffic. * Scenario Three: Traffic intensity in all directions was scaled by \(\sin x\), where \(x=\frac{t\pi}{21,600}\) and \(t\) was the elapsed time since the simulation started in seconds. This scenario tested the ability of an algorithm to handle varying levels of traffic that models a \"rush hour\". * Scenario Four: Every incoming lane had a traffic intensity scaled by \(\sin x\), where \(x=\frac{kt\pi}{21,600}\) and \(k\) is unique to every incoming lane and \(k\in\{7,8,9,10,11,12\}\). This scenario tested the ability of an algorithm to handle fluctuating traffic where traffic intensity varies across the grid. * Scenario Five: Traffic was scaled as in Scenario Four, but the roads between traffic lights were half the length. This scenario tested the ability of an algorithm to handle traffic in a smaller network. The second intersection layout was an irregular layout modelled after a section of the road network in the town of Stellenbosch (South Africa), as visualised in Figure 3. Unlike the first intersection layout, the intersections are not identical and have cycles with traffic phases determined by the number of lanes entering either side of the intersection. An example of one of these intersections is visualised in Figure 4. Vehicles were allowed to enter and leave the simulation from the main roads and a cul-de-sac in the centre of the intersection layout. For this intersection, the algorithms were evaluated on three scenarios with different traffic characteristics as follows:  
* Scenario Six: Low traffic was constant from all areas that vehicles could enter from. This evaluated the efficiency of an algorithm when controlling low amounts of traffic in an irregular intersection layout. * Scenario Seven: High traffic was constant from all areas that vehicles could enter from. This evaluated the ability of an algorithm to handle high amounts of traffic in an irregular intersection layout.