How peerappa14/v2i-based-traffic-congestion-prediction-and-route-optimization works
This repository is a SUMO-based V2I traffic monitoring and route-optimization prototype. Its main user workflow is to launch the GUI, run a SUMO simulation through TraCI, collect vehicle and edge state, detect congestion, reroute affected vehicles, and view network and rerouting statistics. Separate scripts generate RSU detector placements and demonstrate RSU-triggered vehicle speed changes. The README also describes LSTM forecasting and CSV storage, but the sampled GUI labels AI integration a placeholder; those capabilities are not represented as active runtime stages. Edges are limited to relationships shown in excerpts or README statements.
Main entry points: interface.py GUI simulation control · generate_rsu.py RSU placement generator · run_sumo.py RSU-aware simulation · osm.add.xml RSU detector configuration
Components 16
Traffic simulation
- GUI simulation control
interface.py - SUMO scenario configuration
osm.sumocfg - Road network and routes
osm.net.xml
Monitoring and routing
- Traffic state collection
interface.py - Congestion detection
interface.py - Dynamic rerouting
interface.py - Alternate route helper
reroute.py
Dashboard and visualization
- Vehicle and status tables
interface.py - Live network canvas
interface.py - Traffic trend charts
interface.py
RSU tooling
- RSU placement generator
generate_rsu.py - RSU detector configuration
osm.add.xml - RSU-aware simulation
run_sumo.py - Detector output
detector_output.xml
Other components
- Operator
- SUMO simulator
Connections 21
- Operator → GUI simulation control: starts
README.md - GUI simulation control → SUMO simulator: starts simulation
interface.py - SUMO simulator → Traffic state collection: supplies live state
interface.py - Traffic state collection → Congestion detection: provides edge data
interface.py - Congestion detection → Dynamic rerouting: triggers rerouting
interface.py - Traffic state collection → Vehicle and status tables: updates tables
interface.py - Congestion detection → Vehicle and status tables: updates status
interface.py - Dynamic rerouting → Vehicle and status tables: updates route table
interface.py - Traffic state collection → Live network canvas: drives display
interface.py - Congestion detection → Traffic trend charts: plots counts
interface.py - Dynamic rerouting → Traffic trend charts: plots reroutes
interface.py - GUI simulation control → SUMO scenario configuration: loads scenario
interface.py - GUI simulation control → Road network and routes: parses network
interface.py - Operator → RSU placement generator: runs generator
- RSU placement generator → SUMO simulator: queries junctions
generate_rsu.py - RSU placement generator → RSU detector configuration: writes detectors
generate_rsu.py - RSU placement generator → Detector output: configures output
generate_rsu.py - RSU-aware simulation → RSU detector configuration: reads positions
run_sumo.py - RSU-aware simulation → SUMO simulator: runs simulation
run_sumo.py - RSU-aware simulation → Detector output: may emit logs
- Alternate route helper → SUMO simulator: checks and changes routes
reroute.py