Skip to content

Cero72/Trafficient

Repository files navigation

Trafficient

An intelligent traffic control system using Deep Q-Learning to optimize traffic signal timing. This project achieved a 50% reduction in average wait times and a 34.9% increase in traffic flow speed.

Overview

Trafficient uses reinforcement learning to dynamically control traffic signals, adapting to real-time traffic conditions. The system is built on SUMO (Simulation of Urban MObility) and PyTorch, implementing a Deep Q-Network (DQN) for intelligent decision-making.

Key Features

  • Real-time traffic signal optimization
  • Predictive queue management
  • Dynamic phase timing
  • Multi-intersection support
  • Performance metrics tracking

Requirements

  • Python 3.8+
  • SUMO (Simulation of Urban MObility)
  • PyTorch
  • NumPy
  • Matplotlib

Installation

  1. Install SUMO:
# Set SUMO_HOME environment variable
export SUMO_HOME="path/to/sumo"
  1. Install Python dependencies:
pip install torch numpy matplotlib
  1. Clone the repository:
git clone [repository-url]
cd trafficient

Usage

  1. Run the reinforcement learning model:
python rl_traffic_control.py
  1. Compare with traditional methods:
python compare_methods.py
  1. Generate random traffic patterns:
python random_trips.py

Project Structure

trafficient/
├── rl_traffic_control.py     # Main RL implementation
├── traditional_traffic.net.xml    # Network configuration
├── traditional_traffic.sumo.cfg   # SUMO configuration
├── random_trips.py           # Traffic generation
├── traditional_traffic_control.py # Traditional Traffic control
├── random_traffic.rou.xml # Traditional Traffic control
└── compare_methods.py        # Performance comparison


Results

  • Average wait time reduction: 50%
  • Traffic flow speed increase: 34.9%
  • Improved throughput across 8+ traffic approaches

Acknowledgments

  • SUMO Traffic Simulation
  • PyTorch Team
  • Traffic Control Research Community

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages