Expand description
§pdp_lns
Adaptive Large Neighbourhood Search (ALNS) solver for the Pickup and Delivery Problem with Time Windows (PDPTW).
The solver combines several metaheuristic techniques:
- Multi-start ensemble initialization — four constructive heuristics run in parallel, seeding elite and route pools with diverse solutions.
- LNS with adaptive operator selection — destroy/repair operators weighted by recent performance (ALNS).
- Guided Ejection Search (GES) — vehicle-count minimization via ejection chains with squeeze and perturbation.
- Set Covering (SC) — MIP-based route recombination from a route pool.
- Crossover operators — CREX and SREX for elite pool exploitation.
§Quick start
use pdp_lns::algorithm;
use pdp_lns::instance::Instance;
use std::path::Path;
use std::time::Duration;
let inst = Instance::from_file(Path::new("instance.txt"));
let solution = algorithm::solve(&inst, Duration::from_secs(60), 42);
println!("Vehicles: {}, Distance: {:.2}",
solution.num_vehicles(), solution.total_distance(&inst));Modules§
- algorithm
- Top-level solver entry points and configuration.
- instance
- Problem instance representation and I/O.
- solution
- Solution representation, feasibility checks, and route utilities.
Functions§
- solve_
data_ core - Solve a PDPTW instance from raw arrays. Returns the instance and best solution found.
- solve_
instance_ core - Solve a PDPTW instance from a file path. Returns the instance and best solution found.