Expand description
CVRP domain helpers for SolverForge.
Provides ProblemData, MatrixDistanceMeter, MatrixIntraDistanceMeter,
the VrpSolution trait, and a suite of free functions for Clarke-Wright
and k-opt construction phases.
Structs§
- Matrix
Distance Meter - Cross-entity distance meter backed by the solution’s distance matrix.
- Matrix
Intra Distance Meter - Intra-entity distance meter backed by the solution’s distance matrix.
- Problem
Data - Immutable problem data shared by all vehicles.
Traits§
- VrpSolution
- Trait implemented by a planning solution that holds a fleet of vehicles,
each carrying a
*const ProblemDatapointer and a list of visited stops.
Functions§
- assign_
route - Assigns a constructed route to the given vehicle.
- capacity
- Returns the vehicle capacity.
- depot_
for_ cw - Returns the depot index for Clarke-Wright (plan-level, not per-entity).
- depot_
for_ entity - Returns the depot index (same for all vehicles).
- distance
- Distance between two element indices using the first vehicle’s data pointer.
- element_
load - Returns the demand (load) for a single customer element.
- get_
route - Returns the current route for entity
entity_idx. - is_
kopt_ feasible - K-opt feasibility gate: returns
trueif the route satisfies all time-window constraints. Theentity_idxparameter is ignored — time windows are uniform across vehicles. - is_
time_ feasible - Returns
trueif the route satisfies all time-window constraints. - set_
route - Replaces the current route for entity
entity_idx.