Skip to content

Traffic simulation using SUMO and TraCI with Python for vehicle monitoring and traffic metrics extraction

Notifications You must be signed in to change notification settings

olatideenoch/sumo-traffic-simulation-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🚦 SUMO Traffic Simulation with TraCI (Python)

This project demonstrates a basic traffic simulation using SUMO, TraCI, and Python for vehicle monitoring and traffic data extraction.


🎯 Project Objectives

  • Run SUMO simulations from Python using TraCI
  • Monitor vehicle speed and position in real time
  • Compute vehicle distance traveled
  • Extract edge-level traffic metrics (e.g., average speed)
  • Build a foundation for traffic analytics and ML-ready datasets

πŸ“Œ Features

  • πŸš— Vehicle speed tracking per simulation step
  • πŸ“ Vehicle position monitoring
  • πŸ“ Distance traveled calculation
  • 🧠 Edge average speed computation
  • πŸ”„ Real-time simulation control via TraCI
  • πŸ›£ Custom SUMO network and route configuration

πŸ›  Tech Stack

  • Python
  • SUMO (Simulation of Urban Mobility)
  • TraCI (Traffic Control Interface)
  • sumolib

πŸ“‚ Project Structure

  • traci_sumo.py β€” main simulation runner
  • Traci.net.xml β€” network file
  • Traci.rou.xml β€” routes file
  • Traci.sumocfg β€” simulation config

▢️ How to Run

  1. Install SUMO
  2. Install Python packages
pip install sumolib traci

Run

python traci_sumo.py

πŸ‘€ Author

Olatide Enoch

  • Transport Technology Student
  • Python Developer β€” Traffic Simulation & Analytics

About

Traffic simulation using SUMO and TraCI with Python for vehicle monitoring and traffic metrics extraction

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages