Skip to content

Repository files navigation

C++ Concurrent Traffic Simulation

This is the project for the fourth course in the Udacity C++ Nanodegree Program: Concurrency.

It implements traffic lights into a traffic simulation of vehicles driving on streets and turning on intersections. The first car arriving at an intersection will be allowed to enter it and advance, but only if the traffic light is green. If it is not, the car has to wait for the event to happen.

Threads and synchronization mechanisms of C++11 are used to accomplish this task in a concurrent way.

The schematic of the program looks like this:

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.

About

Traffic simulation using multithreading for the C++ Nanodegree

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages