Trait vrp_core::models::problem::TransportCost
source · pub trait TransportCost {
fn duration_approx(
&self,
profile: &Profile,
from: Location,
to: Location
) -> Duration;
fn distance_approx(
&self,
profile: &Profile,
from: Location,
to: Location
) -> Distance;
fn duration(
&self,
route: &Route,
from: Location,
to: Location,
travel_time: TravelTime
) -> Duration;
fn distance(
&self,
route: &Route,
from: Location,
to: Location,
travel_time: TravelTime
) -> Distance;
fn cost(
&self,
route: &Route,
from: Location,
to: Location,
travel_time: TravelTime
) -> Cost { ... }
}Expand description
Provides the way to get routing information for specific locations and actor.
Required Methods§
sourcefn 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.
sourcefn 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.