#[non_exhaustive]pub struct ConstraintRelaxation {
pub relaxations: Vec<Relaxation>,
pub vehicle_indices: Vec<i32>,
/* private fields */
}Expand description
For a group of vehicles, specifies at what threshold(s) constraints on
visits will be relaxed and to which level. Shipments listed in
the skipped_shipment field are constrained to be skipped; i.e., they
cannot be performed.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.relaxations: Vec<Relaxation>All the visit constraint relaxations that will apply to visits on
routes with vehicles in vehicle_indices.
vehicle_indices: Vec<i32>Specifies the vehicle indices to which the visit constraint
relaxations apply. If empty, this is considered the default and the
relaxations apply to all vehicles that are not specified in other
constraint_relaxations. There can be at most one default, i.e., at
most one constraint relaxation field is allowed empty
vehicle_indices. A vehicle index can only be listed once, even within
several constraint_relaxations.
A vehicle index is mapped the same as
ShipmentRoute.vehicle_index,
if interpret_injected_solutions_using_labels is true (see fields
comment).
Implementations§
Source§impl ConstraintRelaxation
impl ConstraintRelaxation
pub fn new() -> Self
Sourcepub fn set_relaxations<T, V>(self, v: T) -> Self
pub fn set_relaxations<T, V>(self, v: T) -> Self
Sets the value of relaxations.
Sourcepub fn set_vehicle_indices<T, V>(self, v: T) -> Self
pub fn set_vehicle_indices<T, V>(self, v: T) -> Self
Sets the value of vehicle_indices.
Trait Implementations§
Source§impl Clone for ConstraintRelaxation
impl Clone for ConstraintRelaxation
Source§fn clone(&self) -> ConstraintRelaxation
fn clone(&self) -> ConstraintRelaxation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more