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.2.0 ships an anytime time-dependent Ant Colony Optimization heuristic with a time-dependent local-search layer (LCA-BST move evaluation, Blauth et al. 2024) on an exact non-decreasing continuous piecewise-linear (NDCPWLF) arrival-time engine, benchmarked on all four MAMUT TD families — it produced the large majority of the store's current best-known solutions. 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; v0.2.0): tree-ranked relocate/swap/2-opt* moves, every accepted move repriced by the checker-identical fold; on by default (Params.local_search)
  • Later: ACO re-tuning under local search; 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.2.0.tar.gz (36.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.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (200.3 kB view details)

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

kayros-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (200.3 kB view details)

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

kayros-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (199.3 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.2.0.tar.gz.

File metadata

  • Download URL: kayros-0.2.0.tar.gz
  • Upload date:
  • Size: 36.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.2.0.tar.gz
Algorithm Hash digest
SHA256 5053d777d9be10184bbcead2c8924cf2a55701aa0a9f81c79959c1051289607d
MD5 c0dad3e46cc497599ee38a85b3c71c17
BLAKE2b-256 5ccb9f6befab3694bd80db179ed4735418dbea3fafc42fb168a225642cf2cba0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kayros-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d26c1af4f0e798df4f9b005471f0d521fdbe4649ad8a617ca8becede182ef9e6
MD5 d0d80c349a083f43627f3b5276facf1d
BLAKE2b-256 87b7f2101517f9660c26807a8cc0db2c68c4d497c02acea095bcecae6ae23966

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kayros-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cc834596b7b2c509f72c72a810ab11ff98df2fd4f2ec2e5bd3c9bcc36806cdf3
MD5 eba40a6a54dcb4be4d3c4bd48c8356fb
BLAKE2b-256 17d6579118b3bb5c23c16bc7b6ae175cf2ff5f91a271783b0e8166eaf69e54c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kayros-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 58addc16c505c322ccb50e5a002fddb93933c9928da11853ae0d0ddaf5cebea5
MD5 29525cacda240e17245b322e249b202f
BLAKE2b-256 82ee41aa119ab96feaa914f2f0198b600de856b53ab2a530cf14d6888e28f1c2

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