Integrating SUMO with Real-World Data: From Sensors to Scenario Testing

Integrating SUMO with Real-World Data: From Sensors to Scenario Testing

Overview

SUMO (Simulation of Urban MObility) is an open-source, microscopic traffic simulator. Integrating real-world data lets you create realistic scenarios, validate models, and run what-if analyses for traffic management, infrastructure planning, or research.

Typical data sources

  • Traffic loop detectors / induction loops
  • Camera-derived counts and trajectories (computer vision)
  • Floating car data / GPS traces (taxis, fleets, smartphones)
  • Bluetooth/Wi-Fi probe data
  • CCTV / automated plate recognition (ANPR) counts
  • Traffic signal timing plans / intersection geometry
  • Road network maps (OpenStreetMap)
  • Public transit schedules (GTFS)

Workflow (high-level steps)

  1. Collect & preprocess
    • Clean timestamps, remove outliers, convert coordinate systems (to WGS84 or local projection).
    • Aggregate counts to compatible time steps (e.g., 1-min or 5-min).
  2. Build or import network
    • Import OSM and refine geometry (lanes, speed limits, turn restrictions).
    • Use NETCONVERT or netedit to adjust links, nodes, and traffic light logic.
  3. Derive demand
    • From counts: use traffic assignment or matrix estimation to create origin–destination (OD) matrices.
    • From GPS/trajectory data: map-match and convert to trip files (routes or flows).
    • From GTFS: convert transit schedules to SUMO routes.
  4. Generate routes
    • Use DUAROUTER, OD2TRIPS, or trajectory-to-route conversion tools.
    • Calibrate route choice parameters (rerouting, person types).
  5. Incorporate signals & controls
    • Import or define traffic light programs (TLLogic) and detector placements.
    • Add actuated or adaptive controllers as needed.
  6. Simulate & validate
    • Run SUMO, compare simulated counts/velocities with observed data.
    • Use TraCI to extract time-series for validation.
  7. Calibrate
    • Adjust demand, driver behavior models (car-following, lane-changing), and route choice.
    • Use automated calibration (e.g., XGBoost/Genetic Algorithms, or tools like sumo-calibrator).
  8. Scenario testing
    • Modify infrastructure, signal timing, demand levels, or introduce incidents.
    • Run counterfactuals and evaluate KPIs (travel time, emissions, throughput).
  9. Postprocess & visualize
    • Use SUMO tools (netanim, sumo-gui) or export to GIS for maps and dashboards.
    • Compute emissions (EMIT) or convert outputs to formats for analysis.

Tools & utilities commonly used

  • NETCONVERT, NETEDIT, DUAROUTER, DUAROUTER’s OD2TRIPS, TraCI API (Python), sumo-gui/netanim, OSMnx (preprocessing), map-matching libraries (e.g., movingpandas or valhalla), GTFS tools, sumo-tools repository scripts, sumo-calibrator.

Practical tips

  • Start small: validate a single corridor before scaling citywide.
  • Time alignment: ensure sensor timestamps and simulation time step match.
  • Map-matching quality: low-quality matching causes unrealistic routes—filter noisy GPS.
  • Use detectors in-sim: place virtual detectors where real sensors are to compare apples-to-apples.
  • Version control: keep network, demand, and config files in a repo for reproducibility.
  • Automate calibration: manual tuning is slow; use optimization tools where possible.

Common challenges

  • Incomplete or noisy sensor data
  • Scaling from sample GPS to population-level demand
  • Computational cost for large networks
  • Matching driver behavior parameters to local conditions

Quick example — GPS to SUMO trips (conceptual)

  1. Map-match GPS traces to network.
  2. Split traces into trips (start/end when stopped > threshold).
  3. Convert trips to SUMO route XML with departure times and vehicle types.
  4. Run DUAROUTER or use routes directly with rerouting enabled.

If you want, I can provide a short sample pipeline (commands and scripts) for converting OSM + GPS traces into a SUMO scenario for a 5 km corridor.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *