Our own product · In development
SmartFlow Twin: a digital twin for traffic signals
A digital twin of four intersections: signal plans are tested in simulation and need a second person’s approval.
What is SmartFlow Twin?
SmartFlow Twin is a digital twin for traffic signal control that Datafalke is developing as its own product. Four intersections are rebuilt from OpenStreetMap lane geometry and checked against official German cadastral data (ALKIS). The SUMO traffic simulation runs signal plans there before a second person approves a plan. SmartFlow Twin doesn’t control any real traffic light.
- Simulation: SUMO simulates traffic at four intersections. Demand is synthetic and uses a fixed seed, so every run can be repeated.
- Two-person approval: A signal plan only applies once a second person approves it. Whoever proposed it can’t approve it themselves.
- Control room: The control room has three roles and four operating modes; a log records every change with person and time.
- REST endpoints
- 33
- WebSocket streams for live data
- 3
- test cases in the code, counted statically
- 642
- documented architecture decisions
- 99
Counted in the source code on November 23, 2026, code as of July 18, 2026.
What does SmartFlow Twin look like?
Six chapters show SmartFlow Twin: control room, plan approval, a live intersection, the green wave, bus and ambulance priority, and scenarios and metrics. All views come from a local installation with invented test accounts, captured on November 23, 2026. Everything is simulated with synthetic demand, with no commission from or collaboration with any city or public authority.
Control room with roles and modes
The control room has four modes: observe, advise, control and fallback. Only a supervisor can switch to control, where the twin acts on its signals.
Manual override, sensor-failure drill with fallback to fixed-time control, time-of-day schedule
Control room · operating mode and plan
- Only a supervisor can switch to control; observe and advise leave the twin’s signals untouched.
- Only a plan that a second person has approved can be rolled out.
- Each approach shows its signal head in the state the simulation currently sets.
Four-eyes plan approval
An operator proposes a signal plan and the twin tests it against the current one. Only a second person, a supervisor, can approve or reject it.
Only open proposals can be decided; every decision goes into the approval log with person and time
Plan approval · proposals and log
View with test data, captured on Nov 23, 2026 Live intersection with signal phases
SUMO simulates every vehicle on lane geometry from OpenStreetMap. The live map shows the vehicles and each approach’s signal head as it changes.
Tests in the code check the simulation: cars stop at red, nothing collides, the same seed gives the same paths
Live map · intersection K01
View with test data, captured on Nov 23, 2026. Map data © OpenStreetMap contributors (ODbL) Green wave across two intersections
An operator switches two intersections in a row between a fixed green wave, adaptive mode and uncoordinated signals. The twin measures platoon delay.
Emissions per run from an emissions model; reports cover corridors of up to four intersections
Corridor · green wave K01 and K02
View with test data, captured on Nov 23, 2026. Map data © OpenStreetMap contributors (ODbL) Priority for buses and ambulances
When a bus or an ambulance is waiting, the controller brings its green forward within the permitted phase order and also holds it for ambulances.
No jump from red to green; every report also shows the extra delay for cross traffic
Report · bus priority
View with test data, captured on Nov 23, 2026 Report · ambulance preemption
View with test data, captured on Nov 23, 2026 Scenarios and metrics
Studies run in the twin and store their results in JSON files, which 60 report pages and a dashboard read. The dashboard exports CSV and JSON.
Load scenarios from low to high, incident drills, comparison with Webster’s formula
Report · load scenarios
View with test data, captured on Nov 23, 2026 Dashboard · metrics
View with test data, captured on Nov 23, 2026
How do the parts fit together?
The control room, plan approval and live maps talk to one API that takes commands over REST and streams live data over WebSocket. Behind the API, the control logic requests phases from a signal adapter while SUMO simulates the traffic. Proposals, roles and logs are stored in files. The reports read only the JSON results of simulation runs.
- Control room: Roles and modes
- Plan approval: Four-eyes principle
- Live maps: Intersection and corridor
- Reports: Metrics and export
- API: 33 REST endpoints
- Control logic: Plans and fallback
- Simulation: Traffic in SUMO
- File store: Proposals and audit logs
- Sensors: Simulated detectors
- Signal adapter: Mock, no real signal
- Network and map from OpenStreetMap
- Report data: JSON per report
Decisions
- Phase rules in the adapter The control logic only requests phases. The adapter accepts only the next permitted phase, keeps minimum green and intergreen times and rejects any other request.
- Simulate first, then approve Every plan proposal comes with a cross-check from the twin: one run with the current plan and one with the new plan, both with the same seed. The second person decides based on that comparison.
- Sensors behind one layer The control logic only sees readings. A swappable layer decides whether they come from simulated detectors, from real sensors over the MQTT messaging protocol or from several sources combined.
- Fallback to fixed time If readings are missing for several steps in a row, the control logic falls back to the fixed-time program. A drill in the control room triggers this case on purpose.
What can’t SmartFlow Twin do yet?
SmartFlow Twin isn’t a pilot project yet and doesn’t control any traffic light on a real street. It’s a simulation with synthetic traffic demand, and the signal timings are estimated from the road network. No city or public authority has commissioned SmartFlow Twin, and there is no contract or agreed collaboration with any city or authority.
- Signals: The signal adapter is a stand-in (a mock). It checks requests the way a traffic controller would but switches no real signal.
- Data: Traffic counts, turning movements and public transport data from a real route are missing; demand comes from a fixed seed.
- Sensors: The detectors are simulated. Receiving readings over the MQTT messaging protocol is in the code, and no sensor is connected at any intersection.
- Priority: The twin recognizes buses and ambulances by their vehicle type; there is no detection by radio or positioning.
- AI: No model computes signal timings from live data. The code only prepares the point where one would plug in.
- Operations: SmartFlow Twin runs locally. Single sign-on and encrypted connections (TLS) are planned but not built.
- Effect: Every percentage in the views comes from simulation runs and says nothing about wait times at a real intersection.
How is the system built and tested?
SmartFlow Twin is built in Python with the FastAPI framework and drives the SUMO traffic simulation through its TraCI interface. The user interfaces are HTML pages with no build step, and the deck.gl and MapLibre libraries draw the maps. Four JSON schemas generate the data models for Python and TypeScript, and the code holds 642 test cases, counted statically.
Layers
- User interfaces
- Control room and live maps with deck.gl and MapLibre
- Plan approval and device editor
- Report pages and metrics dashboard
- Core
- FastAPI service for REST and WebSocket
- SUMO traffic simulation, driven through TraCI
- Control methods from fixed time to max pressure
- Data
- Road network from OpenStreetMap, checked against ALKIS
- Files for proposals, roles and logs
- PostgreSQL with PostGIS and TimescaleDB, set up in the code
- Operations
- Local installation, no production use
- Docker Compose for databases, Redis and MQTT, set up in the code
Properties
- Roles
- Viewer, operator and supervisor; checked in the user interface and in the API
- Approval
- Four-eyes principle: whoever proposes a plan can’t approve it
- Audit log
- Every change recorded with person and time
- Sign-in
- One token per person, stored only as a SHA-256 hash
- Phase rules
- Only the next permitted phase, with minimum green and intergreen times
- Schema source
- Four JSON schemas generate data models for Python (Pydantic) and TypeScript (Zod)
Quality
- 642 test cases in the code, counted in the source on November 23, 2026: 628 test functions in Python and 14 test cases in TypeScript.
- Tests check in the simulation that vehicles stop at red, that nothing collides and that two runs with the same seed produce the same vehicle paths.
What can be verified?
What’s documented is SmartFlow Twin’s code and its behavior in a local installation. There is no evidence of an effect on real traffic, because the twin doesn’t run at any intersection. On November 23, 2026, we used three test accounts to check that the API refuses unauthorized steps; the figures in the reports come from simulation runs.
Measured · Script against a local installation, three test accounts, five unauthorized requests
The API refused all five requests:
- An operator approves a proposal: refused, the role isn’t high enough.
- A viewer proposes a plan: refused.
- An operator switches to control mode: refused, only a supervisor may do that.
- A supervisor approves their own proposal: refused under the four-eyes principle.
- A supervisor approves a proposal that was already rejected: refused, only open proposals can be decided.
The twin’s reports show a direction: with priority, buses and ambulances wait less while cross traffic waits somewhat longer. These values apply only to the simulation, with synthetic demand and estimated signal timings.
If you’re planning a product of your own, such as a specialist application with roles, approvals and an audit log, we’ll work out together what its first version needs to do.
Your product, built with the same care
You’ll talk to the engineer who will build your project.
Project facts
- Product
- SmartFlow Twin, a digital twin for traffic signal control
- Client
- None; Datafalke’s own product
- Timeframe
- Since June 2026; code as of July 18, 2026
- Role
- Product concept, architecture, development, simulation and testing
- Services
- SaaS development for our own product, software development
- Technology
- Python with FastAPI, SUMO traffic simulation, maps with deck.gl and MapLibre
- Status
- In development; simulation with synthetic demand, no pilot, no real traffic light controlled
Editorial note
Researched and drafted with AI assistance. Mohammad Alboush has not yet checked the sources, figures and claims.
Content not yet reviewed
Changes to this report
| Date | Type | Change |
|---|---|---|
| First publication | Published the SmartFlow Twin product page: control room, plan approval, simulation, architecture, technology and the limits of our own product |
Spotted a mistake? Email us at kontakt@datafalke.de. We’ll fix it and log the change.