Learning Traffic Light Simulation This project is meant to simulate a busy traffic light and create a way of changing the ligth that is as efficient as possible. The program uses previous information from the intersection to make informed guesses about when to change the light. There are many varibles that the program takes into account including traffic desnity, queue length, etc. Student: Lynn Jepsen Title: Learning Traffic Light Simulation Background: Traffic lights can cause problems with traffic flow if they are not timed well. If the light has no information about the intersection it is controlling, then you can sit at a red light for what seems hours. Even worse is when the light is much too short and you have to wait through lots of cycles. We have all experienced this. There has been a lot of research done to try and automate cars, using GPS, so that they all pass through the intersection harmlessly. However, this technology can be expensive, and it would take a long time to install it into all cars in order for the project to work. I think a much cheaper solution would be to fix existing traffic lights with more efficient algorithms. In order to see if this algorithm is working, and gather lots of data very quickly, I designed a simulation of a traffic intersection to test the algorithm on. This way I can test pictorially, the aerial view of the intersection, but also graph certain parameters such as queue length and wait time to see general trends. Description: The program is divided into 2 parts, the simulation and the light algorithm. The simulation is the visual component that shows the intersection. Cars are programmed to move with realistic speeds and acceleration. The cars stop behind each other, accelerate at reasonable speeds and obey other “rules of the road”. I set each intersection at a set traffic density that can be changed at the beginning of each experiment. Traffic density is the number of cars then drive onto the road in a minute. The traffic densities are still slightly random in that the average number of cars is close to the traffic density. I later added multiple lanes, so I could test my algorithm on intersections made up of complex traffic densities and multiple lanes. The second component is the light algorithm. The light algorithm is what decides when to change the lights from red to green in all four directions. It depends on six seperate variables. Two of the variables are our independent variables that the light changes, and so therefore must be found. These are cycle length and ratio. Cycle length is how long it takes the intersection to go through an entire cycle with both sides having their chance to be green. Ratio is the ratio of green light time in the north/south direction compared to the east/west direction. The algorithm finds the correct value for both variables at each instant in the intersection that will maximize efficiency. I defined efficiency with three other variables. They are queue length, wait time, and green light usage. These are the dependent variables that change based on cycle length and ratio. The last variable is the only one not dependent on the light algorithm. Each instant on the intersection the traffic density can change. This is a non-dependent variabels that is random, but has to be taken into account when deciding on values for the light algorithm. So if we consider cycle length and ratio to be our independent variables, efficiency variables are our dependent variables, and traffic density a non-dependent variable, the experiment is to change the cycle length and ratio in order to optimize efficiency. The trick is getting all three efficiency variables optimized at once. The light algorithm uses previous information to try and find which combination best optimizes all three efficiency variables. The intersection continues to compromise and eventually begins to use similar cycle lengths and ratios, approaching an optimization after enough time. Considering that an intersection receives tons of data every day, I feel like an algorithm that needs lots of information is appropriate for this situation. There is also another visual component to the program that allows you to graph all three efficiency variables. This way you can see if the algorithm is optimizing the intersection. The graph is made up of a north/south line and an east/west line. The closer the two lines are to each other and the lower they are, the better the optimization.