API Reference ExVrp v#0.7.0

Copy Markdown View Source

Modules

Elixir bindings for PyVRP, a state-of-the-art Vehicle Routing Problem (VRP) solver.

Compares two benchmark results maps (baseline ref vs candidate ref) and decides whether the candidate regressed solution quality.

Declares the A/B benchmark corpus: each instance's id, variant, how to load it, and its file path. BKS values are resolved separately via bks/1.

Loads a corpus entry into an ExVrp.Model. VRPLIB entries go through ExVrp.Read; ETF entries are base64-decoded, deserialized, and migrated so fields added after capture get default values.

Solves the corpus on the current checkout and returns a results map matching the documented JSON shape. Seeds run in parallel across cores. A solve that errors, times out, or an instance that fails to load is recorded as infeasible rather than omitted, so the A/B comparison never loses an instance.

Always-on quality smoke check. Runs a small fast subset single-ref (no A/B baseline) and flags violations: any infeasible instance, or any instance whose gap to its best-known objective exceeds a generous ceiling. Catches gross quality regressions and crashes on every CI run; the on-demand A/B job remains the precise quality gate.

Represents a client (customer) location in a VRP.

Represents a group of clients with mutual constraints.

Represents a depot (distribution center) in a VRP.

Duration segments for tracking route timing during optimization.

A dynamic bitset for fast membership checks on integers.

Iterated Local Search with Late Acceptance Hill-Climbing.

Parameters for Iterated Local Search.

Result of running ILS.

Load segments for tracking capacity during optimization.

Fleet minimisation for VRP instances.

High-level builder for constructing VRP problems.

Low-level NIF bindings to PyVRP C++ core.

Computes granular neighbourhood for local search.

Configuration for calculating a granular neighbourhood.

Raised when a NIF function is not yet implemented.

Manages and dynamically adjusts penalty weights for constraint violations.

Parameters for penalty management.

Manages perturbation during local search.

Random Number Generator (xoshiro128++) for deterministic, reproducible search.

Reads VRPLIB format instance files.

A fixed-size circular buffer for tracking recently inserted values.

Represents a single route in a VRP solution.

A group of clients that must be served by the same vehicle.

Represents a scheduled visit in a route.

Represents a solution to a VRP.

Raised when the solver fails to find a solution.

Main solver interface for VRP problems.

Statistics about the search progress.

Stopping criteria for controlling when the solver terminates.

Represents a trip within a route.

Raised when model validation fails.

Represents a vehicle type in a VRP.

Mix Tasks

Compares a baseline results JSON against a candidate results JSON.

Runs the A/B benchmark corpus and writes a results JSON.

Runs a small, fast subset of the corpus single-ref and fails if any instance is infeasible or exceeds a generous gap-to-BKS ceiling. Intended to run on every CI push as a cheap quality guard; the labeled-PR A/B job is the precise gate.