MPEE

Offline routing and vehicle-routing optimization in one Rust engine

Image 1 of 2: Browser demo with a multi-vehicle plan over the San Francisco peninsula and the stop list beside it

A contraction-hierarchy router over an OpenStreetMap extract and a VRP solver whose whole local search runs as one GPU megakernel, in one process that streams the distance matrix instead of materialising it, with geocoding, PySpell constraints, lossless matrix compression and a WebAssembly build.

  • 27 s, 453 MB50k × 50k matrix
  • ≈20 µsPoint-to-point query
  • 4 s (OSRM ~37 s)CH preprocessing
  • 7–10×Matrix compression

Trade-offs

  • Routing and optimization share one process that streams the matrix through a memory budget instead of materialising it, which is where the OSRM plus VROOM split runs out of RAM.
  • One downloaded area per cache with no global tiling, by design: within the area one cache is simpler and faster, and a whole country costs gigabytes.
  • Constraints and costs are code: PySpell expressions compiled to a sandboxed native AST that runs in the solver's hot loop.

Q&A3

Same harness, 10 s, on the 19 Solomon R2/RC2 instances: mean −0.14 %, at or below PyVRP on 15 of 19; at 1,000 customers it wins 17 of 20 seeds. All self-reported on one M3 Pro, with the harness in the repo to re-run.

Reviews

Loading reviews

    More in Maps

    See all 9 →
    • Charted RootsGenealogy and worldbuilding inside an Obsidian vault, from GEDCOM to maps
    • TerentoInstalls OpenStreetMap maps on Garmin watches from a Mac or the browser
    • sortir.inMap of local events gathered from many sources into one view
    • gnss_gpuGPU GNSS positioning for urban canyons with particle filters and ray-traced NLOS
    • ttymapScriptable globe for the terminal, in Braille, with a Lua plugin runtime
    • HipparchusDesktop vector cartography from live OpenStreetMap data, exported as layered SVG

    More in Rust

    See all 146 →
    • PaganelData migration engine that verifies the destination down to the row
    • FeOxDBEmbedded key-value store in Rust with write-behind durability
    • AudioRouterVisual audio router for Windows 11: route, process and record on a canvas
    • ai-memoryPersistent memory for MCP clients in one Rust binary over SQLite
    • AntirionAI gateway in one Rust binary, with the admin console built in
    • jc-rsjc rewritten as one static binary that turns command output into JSON

    More in WebAssembly

    See all 16 →
    • dbxliteBrowser SQL workbench on DuckDB for local files, BigQuery and Snowflake
    • ExtrudoParametric CAD for 3D printing that runs offline in a browser tab
    • trynixBoots any package from 13 years of nixpkgs in a browser tab
    • kube32Kubernetes-compatible control plane for ESP32 microcontrollers
    • Ely GPUI ComponentComponent library for GPUI, Zed's Rust UI framework, in light and dark
    • DuckDB TerminalSQL terminal for DuckDB that runs entirely in the browser