Skip to content
DeutschBook an intro call

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.

Jump to the modules

since June 2026Simulation, no pilot

Flow shown with test data; steps based on the source code, as of Jul 18, 2026. In the twin, a signal plan applies only after a second person with the supervisor role approves it; before that, the simulation tests it against the current plan.

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.

  1. 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
    Control room in the twin with control mode active (test data)
    1. Only a supervisor can switch to control; observe and advise leave the twin’s signals untouched.
    2. Only a plan that a second person has approved can be rolled out.
    3. Each approach shows its signal head in the state the simulation currently sets.
    View with test data, captured on Nov 23, 2026. Map data © OpenStreetMap contributors (ODbL)
  2. 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
    Approved signal plan proposal with request and decision (test data)
    View with test data, captured on Nov 23, 2026
  3. 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
    Twin intersection: one approach on green, cars waiting at red (test data)
    View with test data, captured on Nov 23, 2026. Map data © OpenStreetMap contributors (ODbL)
  4. 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
    Two intersections of a corridor with signal heads and vehicles (test data)
    View with test data, captured on Nov 23, 2026. Map data © OpenStreetMap contributors (ODbL)
  5. 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

    Priority for buses and ambulances
    Report · bus priority
    Report: bus wait time without and with priority in the twin (test data)
    View with test data, captured on Nov 23, 2026
    Report · ambulance preemption
    Report: ambulance wait without and with preemption in the twin (test data)
    View with test data, captured on Nov 23, 2026
  6. 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

    Scenarios and metrics
    Report · load scenarios
    Load scenario report: best simulated timing versus Webster (test data)
    View with test data, captured on Nov 23, 2026
    Dashboard · metrics
    Dashboard with control room status and report metrics (test data)
    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.

  1. Control room: Roles and modes
  2. Plan approval: Four-eyes principle
  3. Live maps: Intersection and corridor
  4. Reports: Metrics and export
  5. API: 33 REST endpoints
  6. Control logic: Plans and fallback
  7. Simulation: Traffic in SUMO
  8. File store: Proposals and audit logs
  9. Sensors: Simulated detectors
  10. Signal adapter: Mock, no real signal
  11. Network and map from OpenStreetMap
  12. Report data: JSON per report
Architecture based on the source code, as of Jul 18, 2026; simplified, without credentials or host names.

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

DateTypeChange
First publicationPublished 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.

Your next step

Planning a SaaS product?

Tell us who it’s for and what it must do. In the intro call, we’ll work out what a sensible MVP looks like.

Menu

Book an intro callDeutsch