Skip to content

checkDev/Concurrent-Traffic-Light-Controls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Concurrent Traffic Simulation

This is a Concurrency Problem Solving , which tries Traffic Light simulation.

The Problem:

The 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. This project emphasises a suitable and thread-safe communication protocol between vehicles and intersections to complete the simulation. This problem builds a concurrent programming approach (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.

Project Tests

The traffic simulation would run with red lights controlling traffic, just as in the .gif file above.

About

This Program Solves the Concurrency Problem using modern C++17 approaches

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published