Skip to content

Developed DL & ML models for handling Real-Time Traffic for controlling Indian Roadways and achieved a 30% reduction in co2 emissions. Features included Density Controlled Traffic Lights, Emergency Vehicle Prioritization and Congestion simulation using TraCI & SUMO Traffic model of New Delhi.

Notifications You must be signed in to change notification settings

Intelligent-Adaptive-Traffic-Signals/Traffic-Simulation-using-RNN-Varients

Repository files navigation

🚦 Traffic Simulation using RNN Variants

An intelligent, adaptive traffic signal control system powered by deep learning and time-series forecasting to reduce congestion, waiting times, and environmental impact — all simulated using SUMO and Python.


📌 Project Overview

This project implements an adaptive traffic signal control system that predicts traffic volume using classical and deep learning models. The predictions are then used to dynamically adjust traffic light timings in a simulated intersection using SUMO (Simulation of Urban Mobility) and TraCI (Traffic Control Interface).

✨ Key Features

  • Real-time simulation of traffic using SUMO.
  • Prediction of upcoming traffic volume using:
    • ARIMA
    • LSTM
    • BiLSTM
    • GRU
    • BiGRU
  • Dynamic traffic light control based on prediction.
  • Performance analysis via average waiting time, queue length, travel time, and CO₂ emission estimation.
  • Visualizations of traffic trends and model accuracy.

🗂️ Repository Structure

Traffic-Simulation-using-RNN-Variants/
│
├── Generated Visualizations/           # Output plots generated by simulations
├── Good Visualizations/                # Finalized, polished graphs
├── Model Data/                         # Preprocessed or raw data files used for model training
├── Other Sumo Files/                   # Additional SUMO config or helper files
├── __pycache__/                        # Python cache files
│
├── osm.net.xml                         # SUMO network topology (roads and lanes)
├── osm.netcfg                          # Network configuration file
├── osm.passenger.trips.xml             # Simulated pedestrian/public transport trips
├── osm.poly.xml.gz                     # Polygon shape file for visual features (compressed)
├── osm.sumocfg                         # Main SUMO configuration file
├── osm.view.xml                        # SUMO visualization view settings
│
├── simulation_run.py                   # Main Python script to run and control simulation
│
├── Intelligent Adaptive Traffic Control A Comparative Study of RNN Variants.pdf                   # Research Paper


🛠️ Tools & Technologies Used

  • SUMO – Traffic simulation engine
  • TraCI – Interface to control SUMO using Python
  • Python 3.11+ – Core programming language
  • TensorFlow / Keras – For RNN models (LSTM, BiLSTM, GRU, BiGRU)
  • statsmodels – For ARIMA forecasting
  • scikit-learn – For normalization and metrics
  • matplotlib – For data visualizations

📈 Models Implemented

Model Description
ARIMA Classical time-series forecasting (baseline)
LSTM Long Short-Term Memory model
BiLSTM Bidirectional LSTM for enhanced context awareness
GRU Gated Recurrent Unit with fewer parameters
BiGRU Bidirectional GRU for improved prediction accuracy

🧪 Metrics Evaluated

  • Average Waiting Time
  • Queue Length
  • Total Travel Time
  • Prediction Accuracy (MSE)
  • Estimated CO₂ Emissions

🚦 How the System Works

  1. SUMO simulates real traffic conditions at an actual intersection (Barakhamba-Tolstoy Road, Delhi).
  2. TraCI retrieves traffic metrics like vehicle count, queue length, and waiting time in real time.
  3. The selected forecasting model predicts the traffic volume for upcoming steps.
  4. Based on these predictions, the system adjusts green signal durations dynamically.
  5. Simulation metrics and model performance are logged and visualized.

▶️ How to Run

  1. Install requirements

    pip install -r requirements.txt
  2. Install SUMO:

  3. Run the Simulation:

    python simulation_run.py
  4. Modify the model used: In simulation_run.py, update:

    model_type = 'lstm'  # options: 'arima', 'lstm', 'bilstm', 'gru', 'bigru'

📊 Sample Results

Model Waiting Time ↓ Queue Length ↓ Travel Time ↓ CO₂ Reduction (%)
ARIMA 37.8% 35.7% 17.7% 31.3%
LSTM 9.8% 14.3% 6.1% 9.4%
BiLSTM 40.1% 43.3% 17.9% 33.3%
GRU 9.8% 14.3% 6.1% 9.4%
BiGRU 26.4% 15.4% 13.8% 21.6%

BiLSTM emerged as the best performer in balancing traffic efficiency and environmental sustainability.


🧠 Future Scope

  • Real-world data integration (via sensors, cameras, or IoT counters)
  • Multi-intersection coordination
  • Emergency vehicle prioritization
  • Deployment on edge devices (Raspberry Pi, Jetson Nano)
  • Advanced models: Transformers, Attention-based RNNs

👨‍💻 Contributors

  • Shashwat Gupta
  • Anika Aggarwal
  • Harshita Manocha

Supervisors:

  • Dr. Khushboo
  • Ms. Vidushi

Affiliation:
B.Tech – Artificial Intelligence and Data Science, VIPS-TC, GGSIP University, Delhi


📄 License

This project is open for academic and research use. Please contact the authors if you'd like to use it for commercial deployment or contribute.


🔗 References

Please refer to the Intelligent Adaptive Traffic Control A Comparative Study of RNN Variants.pdf, the References section for cited works.


About

Developed DL & ML models for handling Real-Time Traffic for controlling Indian Roadways and achieved a 30% reduction in co2 emissions. Features included Density Controlled Traffic Lights, Emergency Vehicle Prioritization and Congestion simulation using TraCI & SUMO Traffic model of New Delhi.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages