pub enum Objective {
Show 16 variants
MinimizeCost,
MinimizeDistance,
MinimizeDuration,
MinimizeTours,
MaximizeTours,
MaximizeValue {
breaks: Option<Float>,
},
MinimizeUnassigned {
breaks: Option<Float>,
},
MinimizeArrivalTime,
BalanceMaxLoad,
BalanceActivities,
BalanceDistance,
BalanceDuration,
CompactTour {
job_radius: usize,
},
TourOrder,
FastService,
MultiObjective {
strategy: MultiStrategy,
objectives: Vec<Objective>,
},
}Expand description
Specifies objective function types.
Variants§
MinimizeCost
An objective to minimize total cost as a linear combination of total time and distance.
MinimizeDistance
An objective to minimize total distance.
MinimizeDuration
An objective to minimize total duration.
MinimizeTours
An objective to minimize total tour amount.
MaximizeTours
An objective to maximize total tour amount.
MaximizeValue
An objective to maximize value of served jobs.
MinimizeUnassigned
An objective to minimize number of unassigned jobs.
Fields
MinimizeArrivalTime
An objective to minimize sum of arrival times from all routes.
BalanceMaxLoad
An objective to balance max load across all tours.
BalanceActivities
An objective to balance activities across all tours.
BalanceDistance
An objective to balance distance across all tours.
BalanceDuration
An objective to balance duration across all tours.
CompactTour
An objective to control how tours are built.
TourOrder
An objective to control order of job activities in the tour.
FastService
An objective to prefer jobs to be served as soon as possible.
MultiObjective
A multi objective allows to define multiple competitive objectives at the same layer of hierarchy.
Fields
strategy: MultiStrategyAn objective composition type.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Objective
impl<'de> Deserialize<'de> for Objective
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Objective
impl RefUnwindSafe for Objective
impl Send for Objective
impl Sync for Objective
impl Unpin for Objective
impl UnsafeUnpin for Objective
impl UnwindSafe for Objective
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more