pub struct Problem {
pub depot: Coord,
pub stops: Vec<Stop>,
pub vehicles: Vec<Vehicle>,
pub depot_window: Option<TimeWindow>,
}Expand description
A capacitated VRP instance: one depot, a set of stops, a fleet.
Fields§
§depot: Coord§stops: Vec<Stop>§vehicles: Vec<Vehicle>§depot_window: Option<TimeWindow>Optional depot operating window. Its end is the latest time a vehicle
may return to the depot; start is when vehicles may leave. None
means the depot imposes no temporal bound (pure CVRP behaviour).
Implementations§
Source§impl Problem
impl Problem
Sourcepub fn location_count(&self) -> usize
pub fn location_count(&self) -> usize
Number of locations including the depot (stops.len() + 1).
Sourcepub fn coords(&self) -> Vec<Coord>
pub fn coords(&self) -> Vec<Coord>
All coordinates indexed by LocationId: depot first, then stops.
Sourcepub fn depot_open(&self) -> f64
pub fn depot_open(&self) -> f64
Earliest time a vehicle may leave the depot (0 if unconstrained).
Trait Implementations§
impl StructuralPartialEq for Problem
Auto Trait Implementations§
impl Freeze for Problem
impl RefUnwindSafe for Problem
impl Send for Problem
impl Sync for Problem
impl Unpin for Problem
impl UnsafeUnpin for Problem
impl UnwindSafe for Problem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more