Skip to main content

vrp_gpu/local_search/
mod.rs

1//! Local search operators (CPU reference and GPU orchestration).
2
3pub mod cpu;
4
5/// An improving reversal of the inclusive segment `i..=j`.
6///
7/// Selection uses the smallest finite negative delta, then the lexicographically
8/// smallest `(i, j)` on exact ties. Zero, infinities, and NaNs are not candidates.
9#[derive(Debug, Clone, Copy, PartialEq)]
10pub struct TwoOptMove {
11    /// Start of the reversed route segment, inclusive.
12    pub i: usize,
13    /// End of the reversed route segment, inclusive.
14    pub j: usize,
15    /// Change in route distance; improving moves have a negative value.
16    pub delta: f32,
17}
18
19#[cfg(feature = "gpu")]
20pub mod gpu;