← Projects

storm-path

Chișinău · trolleybus · bus · on foot

The city moves.You know when.

storm-path shows you how to get anywhere in Chișinău by trolleybus and bus: with live vehicles, step-by-step guidance, and even offline.

Coming to Android and the webSee how it works ↓

All of it, in one app.

storm-path on Android: the city with its live vehicles on the map, door-to-door routes, and a guide that takes you all the way. In Romanian and Russian.

  1. 01Where to?Type a stop, an address or a place, or pick Home or Work.
  2. 02Options, on the mapThe recommended one first; changes that are too tight, flagged.
  3. 03Step by stepWhere to get on, where to get off and how far to walk, stop by stop.
  4. 04Live guidance“Leave now”, the minutes to spare and the vehicle on its way. Even with the screen off.
  5. 05Live departuresWhat comes to a stop, in how many minutes, with the vehicle’s number.
  6. 06How far from hereEvery stop you can reach in 15, 30 and 45 minutes.
  7. 07My linesYour lines, with their vehicles on the map, and a home-screen widget.
  1. Where to?: Type a stop, an address or a place, or pick Home or Work.
  2. Options, on the map: The recommended one first; changes that are too tight, flagged.
  3. Step by step: Where to get on, where to get off and how far to walk, stop by stop.
  4. Live guidance: “Leave now”, the minutes to spare and the vehicle on its way. Even with the screen off.
  5. Live departures: What comes to a stop, in how many minutes, with the vehicle’s number.
  6. How far from here: Every stop you can reach in 15, 30 and 45 minutes.
  7. My lines: Your lines, with their vehicles on the map, and a home-screen widget.

Real screens of the app, with real saved data.

The whole city, in one pass.

RAPTOR, the algorithm behind storm-path, works in rounds: first everything you reach without changing, then with one change, then two. From Gara Feroviară at 08:00, it finds how far you can get in a few milliseconds.

45min

  • 15 min
  • 30 min
  • 45 min

574 stops within 45 minutes

The isochrone: around each stop, the circle you can still walk in the time left.

It walks you there.

Pick a route, and the phone tells you when to leave, whether you still have time, which side of the street the stop is on, and when to get off. Even with the screen off.

Gara Feroviară → Ciocana

08:02 → 08:29 · 27 min

🚎 1→🚌 5+ 08:18

  1. 08:02
    🚎 troleibuz 1Gara Feroviara → str. Armenească · 3 stops
  2. 08:04
    🚶 walk 1 minstr. Armenească
  3. 08:05
    🚌 autobuz 5str. Armenească → Pretura sectorului Ciocana · 11 stops
  4. 08:29
    📍 Pretura sectorului Ciocana

It works offline.

The same OCaml code runs on the server, in the browser and on the phone. The whole engine fits in 68 KB of compressed WebAssembly, and the timetable downloads once.

  • native4.0
  • WebAssembly4.2
  • JavaScript8.8

ms, median for one route

✓ 0 differences from an oracle, over 8,000 queries

A timetable, learned from the city.

Tranzy gives vehicle positions every 20 seconds, but no timetable. storm-path learns one from what actually happened: which segment, at what time, how long it takes.

  • learned, with the day’s rhythm22 s
  • old timetable + delay65 s
  • the 2023 timetable378 s

s, median error for an arrival 5–10 min away, in a simulated city

187,279 stop passings recorded

In numbers

95
lines today: 64 buses, 31 trolleybuses
1,277
stops in today’s network
280,491
walking nodes from OpenStreetMap
93%
of routes with a tight change get a safe alternative (McRAPTOR)

Under the hood

  • OCaml 5, built in 13 stages

    A learning project: from reading GTFS to a server, the browser, live data and a phone.

  • A pure core

    No files, network or clock: that is why the same code compiles natively, to JS and to WebAssembly.

  • A server on Eio

    OCaml 5 effects: keep-alive, clean shutdown, RAPTOR on several cores.

  • Live data

    Hand-written MQTT and tranzy.ai: the vehicle, the delay, detours found on their own.

  • Walking on real streets

    The OSM walking graph, A* in 0.2 ms, stops within 800 m in 0.5 ms.

  • Checked

    RAPTOR gives the same answers as a second algorithm (CSA) over 8,000 queries; McRAPTOR, the same as brute force.

Leave on time.

Coming to Android and the web

storm-path · A project by Alexandru Toloacă