/Concurrent_Traffic_Simulation

A multithreaded traffic simulator using a real urban map (Paris). Each vehicle will be implemented on different thread. The intersections to facilitate traffic should be managed to avoid collisions.

Primary LanguageC++

Project: a Concurrent Traffic Simulation

This project will develop a traffic simulation in which vehicles are moving along streets and are crossing intersections. However, with increasing traffic in the city, traffic lights are needed for road safety. Each intersection will therefore be equipped with a traffic light. So you need to build a suitable and thread-safe communication protocol between vehicles and intersections to complete the simulation. Note: concurrent programming will be used here (such as mutexes, locks and message queues) to implement the traffic lights and integrate them properly in the code base.

Dependencies for Running Locally

Basic Build Instructions

  1. Clone this repo.
  2. Make a build directory in the top level directory: mkdir build && cd build
  3. Compile: cmake .. && make
  4. Run it: ./traffic_simulation.