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.
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.
— Capabilities
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.
Each customer has a delivery node, a pickup node, and a processing window. Pickup cannot start until delivery completes — even across vehicles.
Earliest / latest delivery and pickup per customer. Soft penalties keep the search honest; feasibility flags surface violations.
Vehicles may start and end at different depots. Auto-detected from your problem JSON — no flag-flipping required.
Time-dependent travel times via a pluggable traffic model. Tune rush-hour multipliers per segment, simulate realistic congestion.
Exchange resources at hub nodes. Concurrency limits, directional permissions, transfer durations — all configurable.
Pareto-optimal fronts across makespan, distance, cost, and CO₂. Compare solutions with `SolutionComparator`.
Run ALNS and BRKGA concurrently via `worker_threads`. For evolutionary scale, enable island-model BRKGA with elite migration.
Vehicle utilization, wait times, load profiles. GeoJSON, KML, and CSV — drop into QGIS, Google Earth, or Excel.
Seeded mulberry32 RNG. Same problem, same solution — across runs, machines, and CI.
— Workflow
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.
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.
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.
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
FleetPilot pairs Adaptive Large Neighborhood Search with a Biased Random-Key Genetic Algorithm — each stage sharpening the other.
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.
Evolutionary search over a 4n-gene chromosome (priorities, assignments, dependencies, transfers). Each child inherits each gene from the elite parent with probability 0.7.
— Performance
Reduced config (alns 50 · pop 100 · gen 50) keeps the smoke under 30 seconds. Production defaults run 30k × 20k and converge deeper.
| Family | Instance | Customers | Vehicles | Makespan | Runtime | Feasible |
|---|---|---|---|---|---|---|
| synthetic | synth-10c-small.json | 10 | 2 | 379.24m | 41 ms | feasible |
| synthetic | synth-20c-medium.json | 20 | 3 | 453.15m | 185 ms | feasible |
| cordeau | mdvrp-2d-16c.json | 16 | 4 | 153.99m | 105 ms | feasible |
| cordeau | mdvrp-3d-24c.json | 24 | 6 | 233.93m | 274 ms | feasible |
| cordeau | mdvrp-3d-48c.json | 48 | 6 | 497.79m | 1.36 s | feasible |
| darp | darp-12req-4veh.json | 12 | 4 | 250.64m | 68 ms | feasible |
| salhi-nagy | vrpb-30c.json | 30 | 3 | 357.25m | 864 ms | feasible |
| lilim | lc1_2_1.txt | 106 | 50 | 631.22m | 8.89 s | feasible |
npm run test:coverage — full suite in benchmarks/.— API
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.
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
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.