Skip to content
v2.0 · ALNS + BRKGA · ISC license

Route optimization,
reimagined for
real fleets.

FleetPilot is a two-stage metaheuristic (ALNS + BRKGA) solver for resource-constrained pickup-and-delivery — built for the chaos of Indian logistics, tuned for the discipline of production systems. Time windows, multi-depot, traffic-aware, fully deterministic.

≥ 30k
Population / solve
BRKGA parallel islands
500
ALNS iterations
adaptive destroy / repair
< 1 ms
Incremental checks
O(1) RouteLoad decoder
Solve preview20 customers · 3 vehicles · 2 routes shown
Vehicle 01Vehicle 02
D0DPDPDPDP
iter 1,247 / 500 · best 453.15moptimizing
Feasible
Customers20
Runtime185 ms
synthetic-20c · makespan 453.15m · feasiblelive render

— Capabilities

Engineered for the parts of
routing that don’t fit on a slide.

Every feature is in the public API — no flag-flipping, no proprietary modules, no “enterprise edition”. The same solver that ships on npm is what your CI runs.

01

Resource-constrained pickup-and-delivery

Each customer has a delivery node, a pickup node, and a processing window. Pickup cannot start until delivery completes — even across vehicles.

public apiready
02

Time windows

Earliest / latest delivery and pickup per customer. Soft penalties keep the search honest; feasibility flags surface violations.

public apiready
03

Multi-depot

Vehicles may start and end at different depots. Auto-detected from your problem JSON — no flag-flipping required.

public apiready
04

Traffic-aware routing

Time-dependent travel times via a pluggable traffic model. Tune rush-hour multipliers per segment, simulate realistic congestion.

public apiready
05

Inter-vehicle transfers

Exchange resources at hub nodes. Concurrency limits, directional permissions, transfer durations — all configurable.

public apiready
06

Multi-objective

Pareto-optimal fronts across makespan, distance, cost, and CO₂. Compare solutions with `SolutionComparator`.

public apiready
07

Parallel solvers

Run ALNS and BRKGA concurrently via `worker_threads`. For evolutionary scale, enable island-model BRKGA with elite migration.

public apiready
08

Analytics & GIS export

Vehicle utilization, wait times, load profiles. GeoJSON, KML, and CSV — drop into QGIS, Google Earth, or Excel.

public apiready
09

Deterministic by default

Seeded mulberry32 RNG. Same problem, same solution — across runs, machines, and CI.

public apiready

— Workflow

From a map full of pins
to a dispatch-ready plan
in three moves.

The web console lives at frontend/ — but the solver behind it is the same npm package you can call from a backend in a single line.

  1. step 01

    Define the problem

    Drop depots and customer stops on a map. Add customers with delivery + pickup nodes, processing times, optional time windows. Configure vehicles with capacity, cost, and CO₂ per km.

  2. step 02

    Solve with the metaheuristic

    Call `solve()` once. ALNS adapts destroy / repair operators across the search; BRKGA evolves a 4n-gene chromosome, warm-started from the ALNS solution. Parallel islands via worker threads.

  3. step 03

    Simulate and ship

    Replay the solved routes on a map. Watch vehicles move, ETAs tick, deliveries flow into pickups. Export to GeoJSON, KML, or CSV — drop straight into QGIS or Google Earth.

— Under the hood

Two stages, one winner.

FleetPilot pairs Adaptive Large Neighborhood Search with a Biased Random-Key Genetic Algorithm — each stage sharpening the other.

Stage 01
ALNS

Adaptive Large Neighborhood Search

Destroy / repair metaheuristic. Six destroy operators (Shaw, random, worst, route, proximity, string) and four repair operators (greedy, regret-2, regret-3, sequential). Operator weights adapt every segment via reinforcement learning.

  • Simulated annealingWorsening moves accepted with exp(Δ/T); T decays geometrically.
  • Multi-restartUp to 3 restarts on stagnation; temperature halved, weights zeroed.
  • Adaptive sizingRemoval fraction grows 10% → 45% as stagnation deepens.
Stage 02
BRKGA

Biased Random-Key Genetic Algorithm

Evolutionary search over a 4n-gene chromosome (priorities, assignments, dependencies, transfers). Each child inherits each gene from the elite parent with probability 0.7.

  • Warm-startALNS seeds 15% of the BRKGA initial population.
  • Island modelMulti-population parallel BRKGA with elite migration via worker_threads.
  • Stagnation resistanceElite mutation, adaptive mutant injection, immigrant replacement.
ALNS acceptance
P = exp((c − c′) / T)
Simulated annealing
ALNS weights
wᵢ ← (1−λ)wᵢ + λ·(sᵢ/uᵢ)
λ = 0.1, segment size 50
BRKGA crossover
child[i] = elite[i] w.p. 0.7
Biased toward elite
Decoder
O(1) RouteLoad
Incremental capacity check

— Performance

Numbers from a real
CI smoke run.

Reduced config (alns 50 · pop 100 · gen 50) keeps the smoke under 30 seconds. Production defaults run 30k × 20k and converge deeper.

8
Benchmark families
350+
Tests · 85% coverage
< 10s
50-cust synthetic
100%
Smoke feasibility
benchmarks/results/smoke-results.json
8 rows
FamilyInstanceCustomersVehiclesMakespanRuntimeFeasible
syntheticsynth-10c-small.json102379.24m41 msfeasible
syntheticsynth-20c-medium.json203453.15m185 msfeasible
cordeaumdvrp-2d-16c.json164153.99m105 msfeasible
cordeaumdvrp-3d-24c.json246233.93m274 msfeasible
cordeaumdvrp-3d-48c.json486497.79m1.36 sfeasible
darpdarp-12req-4veh.json124250.64m68 msfeasible
salhi-nagyvrpb-30c.json303357.25m864 msfeasible
lilimlc1_2_1.txt10650631.22m8.89 sfeasible
Reproduce locally with npm run test:coverage — full suite in benchmarks/.

— API

One solver.
Three surfaces.

Call it from TypeScript, run it from the CLI, or feed it a JSON file. Same engine, deterministic seed, predictable behavior across Node and the browser.

  • Node.jsPrimary runtime. worker_threads for parallelism.
  • BrowserWeb Worker bundle at fleetpilot/worker.
  • CLIfleetpilot binary in PATH after global install.
Full reference
typescript
~23 lines
var(--accent)]">import {
  FleetPilotSolver,
  Problem,
  LocationNode,
  Customer,
  Vehicle,
} var(--accent)]">from var(--accent)]">class="text-[var(--accent)]">var(--color-amber-glow)]">'fleetpilot';

var(--accent)]">const nodes = {
  var(--color-iris)]">0: var(--accent)]">new LocationNode(var(--color-iris)]">0, var(--color-iris)]">28.61, var(--color-iris)]">77.23, var(--accent)]">class="text-[var(--accent)]">var(--color-amber-glow)]">'Delhi Depot'),
  var(--color-iris)]">1: var(--accent)]">new LocationNode(var(--color-iris)]">1, var(--color-iris)]">28.54, var(--color-iris)]">77.20, var(--accent)]">class="text-[var(--accent)]">var(--color-amber-glow)]">'Customer A · Drop'),
  var(--color-iris)]">2: var(--accent)]">new LocationNode(var(--color-iris)]">2, var(--color-iris)]">28.56, var(--color-iris)]">77.25, var(--accent)]">class="text-[var(--accent)]">var(--color-amber-glow)]">'Customer A · Pick'),
};

var(--accent)]">const customers = [var(--accent)]">new Customer(var(--color-iris)]">1, var(--color-iris)]">1, var(--color-iris)]">2, var(--color-iris)]">50)];
var(--accent)]">const vehicles = [var(--accent)]">new Vehicle(var(--color-iris)]">1, var(--color-iris)]">5)];

var(--accent)]">const problem = var(--accent)]">new Problem(nodes, customers, vehicles, var(--color-iris)]">0);
var(--accent)]">const solver = var(--accent)]">new FleetPilotSolver(problem);

var(--accent)]">const solution = var(--accent)]">await solver.var(--color-aurora)]">solve({ maxTimeMs: var(--color-iris)]">30_000 });
console.var(--color-aurora)]">log(var(--accent)]">class="text-[var(--accent)]">var(--color-amber-glow)]">`Best makespan: ${solution.var(--color-aurora)]">makespan.var(--color-aurora)]">toFixed(var(--color-iris)]">2)} min`);
console.var(--color-aurora)]">log(var(--accent)]">class="text-[var(--accent)]">var(--color-amber-glow)]">`Feasible: ${solution.var(--color-aurora)]">isFeasible()}`);

— Ship it

Stop guessing routes.
Start solving them.

One npm install puts a production-grade metaheuristic in your backend. Bring your problem JSON, get a feasible plan back in seconds — with full GIS export and analytics out of the box.