Skip to content

AkenRoberts/traffic

Repository files navigation

Traffic Intersection Simulation

Traffic Intersection Simulator Screenshot

This is a React-based intersection that simulates traffic signals.

It uses a state machine to control the signals, with input from external events.

It is currently configured to stay green on North + South until traffic or pedestrians trigger a change.

Running the Simulator

Requirements (used during dev; may support other versions):

  • NPM 10
  • Node 20

Within the project's root directory:

$ npm install
$ npm run dev

Navigate to the localhost URL provided by Vite in the console.

Interacting with the Simulator

Use the control panel buttons to trigger events such as traffic waiting at a light or a pedestrian pushing a Walk button to cross a street.

Current Shortcomings

  • Not all signal states are fully implemented; some pauses between changes and walk states may not trigger as expected

Project Notes

My notes and thoughts during the project: NOTES.md

About

A traffic signal intersection simulation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors