#[non_exhaustive]pub struct InjectedSolutionConstraint {
pub routes: Vec<ShipmentRoute>,
pub skipped_shipments: Vec<SkippedShipment>,
pub constraint_relaxations: Vec<ConstraintRelaxation>,
/* private fields */
}Expand description
Solution injected in the request including information about which visits must be constrained and how they must be constrained.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.routes: Vec<ShipmentRoute>Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes.
skipped_shipments: Vec<SkippedShipment>Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes field.
constraint_relaxations: Vec<ConstraintRelaxation>For zero or more groups of vehicles, specifies when and how much to relax constraints. If this field is empty, all non-empty vehicle routes are fully constrained.
Implementations§
Source§impl InjectedSolutionConstraint
impl InjectedSolutionConstraint
pub fn new() -> Self
Sourcepub fn set_routes<T, V>(self, v: T) -> Self
pub fn set_routes<T, V>(self, v: T) -> Self
Sets the value of routes.
Sourcepub fn set_skipped_shipments<T, V>(self, v: T) -> Self
pub fn set_skipped_shipments<T, V>(self, v: T) -> Self
Sets the value of skipped_shipments.
Sourcepub fn set_constraint_relaxations<T, V>(self, v: T) -> Self
pub fn set_constraint_relaxations<T, V>(self, v: T) -> Self
Sets the value of constraint_relaxations.
Trait Implementations§
Source§impl Clone for InjectedSolutionConstraint
impl Clone for InjectedSolutionConstraint
Source§fn clone(&self) -> InjectedSolutionConstraint
fn clone(&self) -> InjectedSolutionConstraint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InjectedSolutionConstraint
impl Debug for InjectedSolutionConstraint
Source§impl Default for InjectedSolutionConstraint
impl Default for InjectedSolutionConstraint
Source§fn default() -> InjectedSolutionConstraint
fn default() -> InjectedSolutionConstraint
Returns the “default value” for a type. Read more
Source§impl Message for InjectedSolutionConstraint
impl Message for InjectedSolutionConstraint
impl StructuralPartialEq for InjectedSolutionConstraint
Auto Trait Implementations§
impl Freeze for InjectedSolutionConstraint
impl RefUnwindSafe for InjectedSolutionConstraint
impl Send for InjectedSolutionConstraint
impl Sync for InjectedSolutionConstraint
impl Unpin for InjectedSolutionConstraint
impl UnwindSafe for InjectedSolutionConstraint
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