Skip to content

mamut-routing (mamut-routing-lib)

The command-line interface of mamut-routing-lib: list local benchmark instances, download and verify release archives, solve with PyVRP and propose best-known solutions, and export static instances to the classic CVRPLIB .vrp format. Install it with the cli extra:

pip install "mamut-routing-lib[cli]"      # or: uv add "mamut-routing-lib[cli]"
mamut-routing --help

The reference below is generated from the Typer application at build time.

mamut-routing

CLI for the MAMUT-routing benchmark library: list and solve local benchmark instances.

Usage:

mamut-routing [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--version, -V boolean Show the mamut-routing-lib version and exit. None
--benchmarks-dir path Local benchmark directory. Defaults to $MAMUT_ROUTING_BENCHMARKS_ROOT or $MAMUT_ROUTING_ROOT/benchmarks or ./benchmarks. None
--help boolean Show this message and exit. False

Subcommands

  • export: Export local benchmark instances to classic solver formats (CVRPLIB .vrp, Solomon .txt).
  • list: List local benchmark instances available to solve.
  • remote: Commands for remote benchmark archives published as GitHub release assets.
  • solve: Solve one or more benchmark instances with custom PyVRP's HGS-based solver variants.

mamut-routing export

Export local benchmark instances to classic solver formats (CVRPLIB .vrp, Solomon .txt).

Usage:

mamut-routing export [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False

Subcommands

  • vrp: Export benchmark instances to the classic CVRPLIB .vrp format (or Solomon .txt).

mamut-routing export vrp

Export benchmark instances to the classic CVRPLIB .vrp format (or Solomon .txt).

Selection mirrors list and solve: positional INSTANCE_PATHS or a recursive scan of --benchmarks-dir filtered by --problem-type / --benchmark-name / --metric-variant / --instance-id / --instance-name. Slim collection instances (Poryos2026, Mamut2026) hydrate their matrix from the sha-pinned distances sidecar. Time-dependent instances have no static matrix: explicit TD paths are an error, scanned ones are skipped with a warning.

mamut-routing --benchmarks-dir ./benchmarks export vrp \
    --problem-type CVRP --benchmark-name Mamut2026 --output-dir ./vrp-out

Usage:

mamut-routing export vrp [OPTIONS] [INSTANCE_PATHS]...

Options:

Name Type Description Default
--problem-type choice (CVRP | VRPTW | TDVRPTW | TDVRP) Filter by CVRP or VRPTW. None
--benchmark-name choice (Sintef2008 | Dimacs2021 | Poryos2026 | Mamut2026 | Ortec2022 | Dabia2013 | Ari2018 | Vu2020 | Rifki2020 | Lera2026 | Blauth2024) Filter by benchmark family. None
--metric-variant choice (fastest | shortest | euclidean) Filter by metric variant. None
--instance-id text Filter by exact path-derived aggregate instance ID. None
--instance-name text Filter by exact stored instance name. None
--output-dir path Write outputs under this directory, mirroring each path relative to --benchmarks-dir (flat for files outside it). Default: next to each source .vrp.json. None
--format text 'vrp' (CVRPLIB/TSPLIB .vrp; CVRP or CVRPTW sections) or 'solomon' (Solomon/Gehring-Homberger .txt, VRPTW with euclidean metric only). vrp
--edge-weight-type text 'EXPLICIT' writes the full cost matrix (faithful to the published costs). 'EUC_2D' writes coordinates only for euclidean-metric instances; classic readers then use TSPLIB nint distances, which differ from the published 3-decimal costs. EXPLICIT
--comment text Override the COMMENT line (default: reconstructed from the instance). None
--force / --no-force boolean Overwrite existing outputs (default: report them as 'exists'). False
--collection-root path Collection root (directory holding mamut-collection.json) for slim instances copied out of their collection tree. None
--jobs integer range (1 and above) Parallel workers for batches. Defaults to max(1, CPU count - 2). None
--quiet / --no-quiet boolean Only print errors and the summary. False
--help boolean Show this message and exit. False

mamut-routing list

List local benchmark instances available to solve.

Mirrors the selection model of solve: positional INSTANCE_PATHS or a recursive scan of --benchmarks-dir filtered by --problem-type / --benchmark-name / --metric-variant / --instance-id / --instance-name. Use --paths-only to pipe into solve, e.g.

mamut-routing list --problem-type CVRP --paths-only \
    | xargs -r mamut-routing solve --time-limit-s 30

Usage:

mamut-routing list [OPTIONS] [INSTANCE_PATHS]...

Options:

Name Type Description Default
--problem-type choice (CVRP | VRPTW | TDVRPTW | TDVRP) Filter by CVRP or VRPTW. None
--benchmark-name choice (Sintef2008 | Dimacs2021 | Poryos2026 | Mamut2026 | Ortec2022 | Dabia2013 | Ari2018 | Vu2020 | Rifki2020 | Lera2026 | Blauth2024) Filter by benchmark family. None
--metric-variant choice (fastest | shortest | euclidean) Filter by metric variant. None
--instance-id text Filter by exact path-derived aggregate instance ID. None
--instance-name text Filter by exact stored instance name. Note that instance names have no uniqueness guaranty. None
--paths-only / --no-paths-only boolean Print only matching file paths (one per line). False
--show-path / --no-show-path boolean Include each matching file path in the table. False
--summary / --no-summary boolean Append a recap with counts per problem / benchmark / metric / size. True
--help boolean Show this message and exit. False

mamut-routing remote

Commands for remote benchmark archives published as GitHub release assets.

Usage:

mamut-routing remote [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--repo text GitHub repo (owner/name). Defaults to $MAMUT_ROUTING_RELEASE_REPO or 'ANR-MAMUT/MAMUT-routing'. None
--token text GitHub token. Defaults to $MAMUT_ROUTING_GITHUB_TOKEN. Unnecessary for public releases with sufficient rate limits. None
--tag text Release tag (e.g. snapshot-2026-05-22-28f9199). Defaults to the latest release. None
--help boolean Show this message and exit. False

Subcommands

  • fetch: Download (and optionally extract) one or more benchmark archives.
  • list: List benchmark archives available in the remote release manifest.
  • manifest: Print the parsed release manifest as JSON.
  • verify: Verify sha256 of locally downloaded archives against the remote manifest.

mamut-routing remote fetch

Download (and optionally extract) one or more benchmark archives.

Usage:

mamut-routing remote fetch [OPTIONS] [FILENAMES]...

Options:

Name Type Description Default
--problem-type choice (CVRP | VRPTW | TDVRPTW | TDVRP) N/A None
--benchmark-name choice (Sintef2008 | Dimacs2021 | Poryos2026 | Mamut2026 | Ortec2022 | Dabia2013 | Ari2018 | Vu2020 | Rifki2020 | Lera2026 | Blauth2024) N/A None
--all boolean Download every asset in the manifest. False
--extract / --no-extract boolean Extract zip archives after download. True
--help boolean Show this message and exit. False

mamut-routing remote list

List benchmark archives available in the remote release manifest.

Usage:

mamut-routing remote list [OPTIONS]

Options:

Name Type Description Default
--problem-type choice (CVRP | VRPTW | TDVRPTW | TDVRP) N/A None
--benchmark-name choice (Sintef2008 | Dimacs2021 | Poryos2026 | Mamut2026 | Ortec2022 | Dabia2013 | Ari2018 | Vu2020 | Rifki2020 | Lera2026 | Blauth2024) N/A None
--help boolean Show this message and exit. False

mamut-routing remote manifest

Print the parsed release manifest as JSON.

Usage:

mamut-routing remote manifest [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

mamut-routing remote verify

Verify sha256 of locally downloaded archives against the remote manifest.

Usage:

mamut-routing remote verify [OPTIONS]

Options:

Name Type Description Default
--problem-type choice (CVRP | VRPTW | TDVRPTW | TDVRP) N/A None
--benchmark-name choice (Sintef2008 | Dimacs2021 | Poryos2026 | Mamut2026 | Ortec2022 | Dabia2013 | Ari2018 | Vu2020 | Rifki2020 | Lera2026 | Blauth2024) N/A None
--help boolean Show this message and exit. False

mamut-routing solve

Solve one or more benchmark instances with custom PyVRP's HGS-based solver variants.

Requires the 'pyvrp' optional dependency: pip install "mamut-routing-lib[pyvrp]"

Usage:

mamut-routing solve [OPTIONS] [INSTANCE_PATHS]...

Options:

Name Type Description Default
--problem-type choice (CVRP | VRPTW | TDVRPTW | TDVRP) Filter by CVRP or VRPTW. None
--benchmark-name choice (Sintef2008 | Dimacs2021 | Poryos2026 | Mamut2026 | Ortec2022 | Dabia2013 | Ari2018 | Vu2020 | Rifki2020 | Lera2026 | Blauth2024) Filter by benchmark family. None
--metric-variant choice (fastest | shortest | euclidean) Filter by metric variant. None
--instance-id text Filter by exact derived aggregate instance ID. None
--instance-name text Filter by exact stored instance name. None
--objective choice (HierarchicalVehicleCost | MonoCost | Duration | FleetCostDuration) VRPTW objective. CVRP forces MonoCost regardless. ObjectiveFunction.MONO_COST
--time-limit-s integer range (1 and above) Wall-clock budget per instance, in seconds. 15
--seed integer Solver random seed. 42
--save-bks / --no-save-bks boolean Write a BKS file next to the instance if improved. True
--display / --no-display boolean Forward PyVRP's per-iteration display to stdout. False
--jobs integer range (1 and above) Parallel solve workers for multi-instance selections. Defaults to max(1, CPU count - 2). Single-instance solves keep the time progress bar. None
--help boolean Show this message and exit. False