Trait vrp_core::models::common::Load

source ·
pub trait Load: Add + Sub + PartialOrd + Copy + Default + Debug + Send + Sync {
    // Required methods
    fn is_not_empty(&self) -> bool;
    fn max_load(self, other: Self) -> Self;
    fn can_fit(&self, other: &Self) -> bool;
    fn ratio(&self, other: &Self) -> f64;
}
Expand description

Represents a load type used to represent customer’s demand or vehicle’s load.

Required Methods§

source

fn is_not_empty(&self) -> bool

Returns true if it represents an empty load.

source

fn max_load(self, other: Self) -> Self

Returns max load value.

source

fn can_fit(&self, other: &Self) -> bool

Returns true if other can be loaded into existing capacity.

source

fn ratio(&self, other: &Self) -> f64

Returns ratio.

Object Safety§

This trait is not object safe.

Implementors§