Skip to main content

KAYROS — exact & anytime solver for duration-minimization time-dependent vehicle routing (TDVRPTW / TDVRP)

Project description

KAYROS

KAYROS is an exact & anytime solver for duration-minimization time-dependent vehicle routing problems — TDVRPTW (with time windows) and TDVRP — benchmarked on the canonical MAMUT-routing TD instance families.

Status: alpha. v0.1.0 ships an anytime time-dependent Ant Colony Optimization heuristic on an exact non-decreasing continuous piecewise-linear (NDCPWLF) arrival-time engine, benchmarked on all four MAMUT TD families (it seeded the store's initial best-known solutions at scale). The time-dependent local-search layer is next. See the roadmap below.

Design principles

  • One command install, no proprietary dependency. The default build is pure open source (C++23 + pybind11). The optional exact branch-price-and-cut component of Lera-Romero et al. (requires CPLEX) is strictly opt-in (-DKAYROS_WITH_LERA=ON, source build only) and never ships in wheels.
  • Exact arithmetic, checker-refereed. Route durations are computed on NDCPWLF arrival-time functions with exact doubles — no epsilon comparisons. Every solution kayros reports is priced by the reference checker of mamut-routing-lib; the checker's value is the value.
  • POD core. The C++ core is plain structs, flat arrays and free functions — optimization-kernel style, no framework.

Install

pip install kayros

This pulls everything, including the benchmark loaders and the reference checker (mamut-routing-lib). For development:

git clone https://github.com/0nyr/kayros && cd kayros
pip install -e . --group dev    # pip >= 25.1 (or: uv pip install -e . --group dev)

Requirements: Python ≥ 3.11; building from source (sdist or checkout) additionally needs a C++23 compiler and CMake ≥ 3.26 (fetched automatically by the build backend when missing).

Usage

import kayros

# Any MAMUT-routing TD instance (.vrp.json with its .atf.json sidecar next to it)
instance_path = "benchmarks/TDVRPTW/Dabia2013/n=25/C101.vrp.json"
solution = kayros.solve(instance_path, time_limit=10.0, seed=42)
print(solution.duration, solution.num_routes, solution.status)

# Anytime: react to every new incumbent while the solve keeps running
def on_incumbent(incumbent, routes):
    print(f"[{incumbent.seconds:7.2f}s] {incumbent.value:.6f} ({incumbent.origin})")

solution = kayros.solve(instance_path, time_limit=60.0, on_incumbent=on_incumbent)

# Feed the MAMUT BKS pipeline: solution.to_benchmark_solution() returns the
# artifact accepted by mamut_routing_lib.td.bks.save_td_solution_as_bks_if_improved.

solution.duration is always the value computed by the reference checker (mamut_routing_lib.td.check_td_solution) — never an internal approximation.

Roadmap (stage 1)

  • M3.0 — package scaffold, CI, PyPI wiring
  • M3.1 — NDCPWLF composition engine + POD instance/route core
  • M3.2 — exact equivalence gate against the reference checker (Dabia2013): 513 tests, 336 instances, zero divergences
  • M3.3 — kayros.solve(): greedy construction + TD-ACO
  • M3.4 — all four MAMUT TD families × {TDVRPTW, TDVRP}
  • M3.5 — large-scale runs on Grid'5000: seeded the initial best-known solutions for all 1352 MAMUT TD instances
  • M3.6 — anytime API (on_incumbent, time budgets) + v0.1.0 on PyPI
  • M3.7 — time-dependent local search layer (LCA-BST move evaluation, Blauth et al. 2024)
  • Later: optional exact BPC (kayros[lera])

Provenance

KAYROS is developed by Florian Rascoussier (Onyr) as part of a PhD in operations research (IMT Atlantique / INSA Lyon), under the supervision of Romain Billot, Christine Solnon and Lina Fahed. The NDCPWLF composition engine follows Visser & Spliet (2020)'s move-evaluation theorems; the TD-ACO is a rewrite of the author's heuristic layer originally built on the TDVRPTW solver of Lera-Romero, Rönnqvist & Ljungqvist (2020, MIT-licensed). MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kayros-0.1.0.tar.gz (25.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

kayros-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (172.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

kayros-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (172.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

kayros-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (170.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file kayros-0.1.0.tar.gz.

File metadata

  • Download URL: kayros-0.1.0.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for kayros-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fad673266293c1eda664035c57d1574814828f218fb4e2672c67562c5a4d1c46
MD5 a7ae1c4196d0abf0132ba7fdd7ff68a2
BLAKE2b-256 78fdc44e390a0236780550563ec9c8ef228d3461b73c9ec3765c3fe8c9b6da57

See more details on using hashes here.

File details

Details for the file kayros-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kayros-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1955c2535d019d4a352bab745c3307377e0a82d829d1b0c53d56f7fe32478244
MD5 42d8417d7cb8dfffda7181ef7274e2ca
BLAKE2b-256 16c5fcb2ce0dd1e67ba22ecab7802c03d0ccb4d2c3be01867a73c5c67261310f

See more details on using hashes here.

File details

Details for the file kayros-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kayros-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9e632883f027388b2efd3024bdc44db4cdc7104a8f154c7ace3b6ea7ba780fda
MD5 922f73349c6dcd29889c52acaf644f4f
BLAKE2b-256 d9726081549e9e7e8de572a7274bad38ddb0e9b559f6b379219a2f8f132ecd76

See more details on using hashes here.

File details

Details for the file kayros-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kayros-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8a3ca69783cd35973fa8412f5af6ec45b118b344be9027b1ba5961c91866e2c4
MD5 1abcddf79b8494677929978b2ce89dc1
BLAKE2b-256 6874cdfb56171d2179f38c47cd85c493136940b63f98a79ba61f7a35207d8bf5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page