Struct map_model::RoutingParams
source · [−]pub struct RoutingParams {
pub unprotected_turn_penalty: Duration,
pub bike_lane_penalty: f64,
pub bus_lane_penalty: f64,
pub driving_lane_penalty: f64,
pub avoid_steep_incline_penalty: f64,
pub avoid_high_stress: f64,
pub main_road_penalty: f64,
pub avoid_roads: BTreeSet<RoadID>,
pub avoid_movements_between: BTreeSet<(RoadID, RoadID)>,
}
Expand description
Tuneable parameters for all types of routing.
Fields
unprotected_turn_penalty: Duration
bike_lane_penalty: f64
bus_lane_penalty: f64
driving_lane_penalty: f64
avoid_steep_incline_penalty: f64
avoid_high_stress: f64
main_road_penalty: f64
When crossing an arterial or highway road, multiply the base cost by this penalty. When greater than 1, this will encourage routes to use local roads more.
avoid_roads: BTreeSet<RoadID>
Don’t allow crossing these roads at all. Only affects vehicle routing, not pedestrian.
TODO The route may cross one of these roads if it’s the start or end!
avoid_movements_between: BTreeSet<(RoadID, RoadID)>
Don’t allow movements between these roads at all. Only affects vehicle routing, not pedestrian.
Trait Implementations
sourceimpl Clone for RoutingParams
impl Clone for RoutingParams
sourcefn clone(&self) -> RoutingParams
fn clone(&self) -> RoutingParams
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RoutingParams
impl Debug for RoutingParams
sourceimpl Default for RoutingParams
impl Default for RoutingParams
sourceimpl<'de> Deserialize<'de> for RoutingParams
impl<'de> Deserialize<'de> for RoutingParams
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<RoutingParams> for RoutingParams
impl PartialEq<RoutingParams> for RoutingParams
sourcefn eq(&self, other: &RoutingParams) -> bool
fn eq(&self, other: &RoutingParams) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RoutingParams) -> bool
fn ne(&self, other: &RoutingParams) -> bool
This method tests for !=
.
sourceimpl Serialize for RoutingParams
impl Serialize for RoutingParams
impl StructuralPartialEq for RoutingParams
Auto Trait Implementations
impl RefUnwindSafe for RoutingParams
impl Send for RoutingParams
impl Sync for RoutingParams
impl Unpin for RoutingParams
impl UnwindSafe for RoutingParams
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more