pub struct Solution {
pub routes: Vec<Route>,
pub total_distance: f64,
pub total_time: f64,
pub feasible: bool,
pub unassigned: Vec<Unassigned>,
}Expand description
A complete assignment of stops to routes, plus rolled-up totals and the stops the solver could not place.
Fields§
§routes: Vec<Route>§total_distance: f64§total_time: f64§feasible: boolTrue iff every hard constraint (capacity, time windows) holds and
every stop was assigned to a route. A solution carrying
unassigned stops is never feasible, even though
the routes it did build are each individually valid.
unassigned: Vec<Unassigned>Stops the solver could not place, each with an indicative reason. Empty on a fully-solved instance.
Trait Implementations§
impl StructuralPartialEq for Solution
Auto Trait Implementations§
impl Freeze for Solution
impl RefUnwindSafe for Solution
impl Send for Solution
impl Sync for Solution
impl Unpin for Solution
impl UnsafeUnpin for Solution
impl UnwindSafe for Solution
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