Project: Simulating Different Rules For a Four-Way Intersection
The project I will work on will be primarily determining various rules for a four-way intersection and determining the level of efficiency each provides to various types of traffic flow. The project will involve creating a simulation where vehicles interact with each other in the intersection. Each rule will be simulated for efficiency by various intervals in which they arrive in an intersection. The primary goal of this project is to find a set of the most efficient rules for all of the different types of traffic flow on average.
Summary of Results
When starting with this project, I initially considered dynamically figuring out every single position of each car and comparing them to figure out how each car should behave. I successfully created an algorithm to stop at the intersection. The problem I encountered when working with this way was when two cars couldn't be in the intersection at the same time. I moved on from this approach because I figured that having loops to compare the positions of each car would be very inefficient and unnecessary. Moving from this approach, I made all computations based on the cars in the intersection and the cars at the stop sign. The cars in the initial positions were randomly created by a function. I made another variation of traffic flow that sends cars at set and random intervals.
There are many steps that could be taken to further this project. In the future, I want to experiment with more types of intersections. Since I only concentrated on four-way intersections, I think it would be very interesting to look into intersections such as roundabouts and various n-way intersections. Also, although I am aware that it would be very hard, I want to figure out how the traffic would be with acceleration.