Struct vrp_core::solver::objectives::WorkBalance
source · [−]pub struct WorkBalance {}Expand description
A type which provides functionality needed to balance work across all routes.
Implementations
sourceimpl WorkBalance
impl WorkBalance
sourcepub fn new_load_balanced<T: LoadOps>(
threshold: Option<f64>,
load_func: Arc<dyn Fn(&T, &T) -> f64 + Send + Sync>
) -> (TargetConstraint, TargetObjective)
pub fn new_load_balanced<T: LoadOps>(
threshold: Option<f64>,
load_func: Arc<dyn Fn(&T, &T) -> f64 + Send + Sync>
) -> (TargetConstraint, TargetObjective)
Creates (constraint, objective) type pair which balances max load across all tours.
sourcepub fn new_activity_balanced(
threshold: Option<f64>
) -> (TargetConstraint, TargetObjective)
pub fn new_activity_balanced(
threshold: Option<f64>
) -> (TargetConstraint, TargetObjective)
Creates (constraint, objective) type pair which balances activities across all tours.
sourcepub fn new_distance_balanced(
threshold: Option<f64>
) -> (TargetConstraint, TargetObjective)
pub fn new_distance_balanced(
threshold: Option<f64>
) -> (TargetConstraint, TargetObjective)
Creates (constraint, objective) type pair which balances travelled distances across all tours.
sourcepub fn new_duration_balanced(
threshold: Option<f64>
) -> (TargetConstraint, TargetObjective)
pub fn new_duration_balanced(
threshold: Option<f64>
) -> (TargetConstraint, TargetObjective)
Creates (constraint, objective) type pair which balances travelled durations across all tours.
Auto Trait Implementations
impl RefUnwindSafe for WorkBalance
impl Send for WorkBalance
impl Sync for WorkBalance
impl Unpin for WorkBalance
impl UnwindSafe for WorkBalance
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more