Struct vrp_core::models::problem::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, String>
pub fn new(
reserved_times_index: ReservedTimesIndex,
inner: Arc<dyn TransportCost + Send + Sync>
) -> Result<Self, String>
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.