Struct vrp_core::construction::enablers::DynamicTransportCost
source · pub struct DynamicTransportCost { /* private fields */ }
Expand description
Provides way to calculate transport costs which might contain reserved time.
Implementations§
source§impl DynamicTransportCost
impl DynamicTransportCost
sourcepub fn new(
reserved_times_index: ReservedTimesIndex,
inner: Arc<dyn TransportCost + Send + Sync>,
) -> Result<Self, GenericError>
pub fn new( reserved_times_index: ReservedTimesIndex, inner: Arc<dyn TransportCost + Send + Sync>, ) -> Result<Self, GenericError>
Creates a new instance of DynamicTransportCost
.
Trait Implementations§
source§impl TransportCost for DynamicTransportCost
impl TransportCost for DynamicTransportCost
source§fn duration_approx(
&self,
profile: &Profile,
from: Location,
to: Location,
) -> Duration
fn duration_approx( &self, profile: &Profile, from: Location, to: Location, ) -> Duration
Returns time-independent travel duration between locations specific for given profile.
source§fn distance_approx(
&self,
profile: &Profile,
from: Location,
to: Location,
) -> Distance
fn distance_approx( &self, profile: &Profile, from: Location, to: Location, ) -> Distance
Returns time-independent travel distance between locations specific for given profile.
source§fn duration(
&self,
route: &Route,
from: Location,
to: Location,
travel_time: TravelTime,
) -> Duration
fn duration( &self, route: &Route, from: Location, to: Location, travel_time: TravelTime, ) -> Duration
Returns time-dependent travel duration between locations specific for given actor.
Auto Trait Implementations§
impl Freeze for DynamicTransportCost
impl !RefUnwindSafe for DynamicTransportCost
impl Send for DynamicTransportCost
impl Sync for DynamicTransportCost
impl Unpin for DynamicTransportCost
impl !UnwindSafe for DynamicTransportCost
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
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>
Converts
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>
Converts
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