The purpose of this report is to improve the flow of trafficin intersections through the use of a dynamic algorithm.People spend on average more than six weeks commuting towork in Stockholm every year. A large part of the time thatis spent in traffic is due to the time delay in intersections.In this report, sensors that measure speed and distanceto the vehicle are used instead of detectors that only knowif a car is there or not. There are existing solutions that canoptimise the flow for autonomous cars but since the trafficmay consist of a mix of autonomous and human drivenvehicles during the upcoming 40 years those solutions arenot usable for some time.In this work, a system that can handle both autonomousand human driven vehicles is creat...