Skip to content

Latest commit

 

History

History
68 lines (46 loc) · 1.33 KB

File metadata and controls

68 lines (46 loc) · 1.33 KB

🚦 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