Inspiration
Traffic congestion is usually treated as a city-scale problem, but many delays come from a few repeated bottlenecks: toll gates, highway exits, junctions, ramps, parking entrances, and arterial merge points.
FlowTwin was built around a simpler idea: instead of trying to “solve traffic,” simulate one bottleneck at a time, test possible interventions, and generate a concrete action plan that operators can try quickly.
The project is inspired by mobility operators like Tasco/VETC, which already sit close to tolling, vehicle services, charging, payments, and transport infrastructure. That kind of operator has useful corridor-level data and a practical reason to reduce congestion.
What it does
FlowTwin is an agentic traffic digital twin for bottleneck analysis.
A user selects a road segment or bottleneck, provides available traffic inputs, and asks the system to diagnose congestion. The AI agent then:
- Builds a simplified traffic model of the bottleneck.
- Estimates demand, throughput, queue growth, and delay.
- Runs intervention scenarios such as:
- signal timing changes
- lane reallocation
- ramp metering
- toll-gate flow changes
- parking or charging station placement
- turn restrictions
- incident rerouting
- Compares each scenario.
- Produces a short recommendation with expected impact, tradeoffs, and implementation difficulty.
The goal is not to replace city planners. The goal is to give operators and public agencies a faster way to test ideas before spending money or changing real infrastructure.
How we built it
We built FlowTwin as a lightweight agentic workflow:
- A data ingestion layer accepts traffic counts, road geometry, GPS-like traces, toll-gate volumes, or synthetic sample data.
- A simulation layer models vehicle flow through a bottleneck.
- An AI planning agent generates possible interventions.
- An evaluation agent scores each intervention based on estimated delay reduction, queue reduction, cost, and implementation risk.
- A dashboard shows the bottleneck, simulation result, and recommended action plan.
The prototype focuses on corridor-level traffic, which makes it a good fit for toll roads, highway exits, logistics routes, EV charging hubs, and parking-heavy destinations.
Challenges
The hardest part was keeping the model useful without pretending we had perfect citywide data. Google Maps and Grab have dense live mobility data. A tolling or infrastructure operator usually has narrower but cleaner corridor data.
So we designed FlowTwin to work with partial data. It can start from estimates, simulate uncertainty, and improve as more data becomes available.
Another challenge was making the AI agent practical. We did not want it to output vague policy advice. Every recommendation needed to be specific enough to test.
What we learned
We learned that traffic simulation is most useful when scoped tightly. A full-city digital twin is expensive and slow. A bottleneck digital twin can be built faster, validated faster, and tied to real operational decisions.
We also learned that agentic AI works best here as an orchestration layer: choosing scenarios, running simulations, comparing tradeoffs, and explaining results.
What's next
Next, we want to connect FlowTwin to real traffic APIs, camera-derived counts, tolling data, and GIS layers. We also want to support before/after measurement so the system can learn which interventions actually worked in the real world.
Built With
- docker
- fastapi
- mapbox
- next.js
- openai-api
- postgis
- postgresql
- python
- react
- sumo-traffic-simulator
- typescript
Log in or sign up for Devpost to join the conversation.