Struct map_model::pathfind::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 only_use_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!
only_use_roads: BTreeSet<RoadID>
Related to avoid_roads
, but used as an optimization in map construction
avoid_movements_between: BTreeSet<(RoadID, RoadID)>
Don’t allow movements between these roads at all. Only affects vehicle routing, not pedestrian.
Trait Implementations§
source§impl Clone for RoutingParams
impl Clone for RoutingParams
source§fn clone(&self) -> RoutingParams
fn clone(&self) -> RoutingParams
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RoutingParams
impl Debug for RoutingParams
source§impl Default for RoutingParams
impl Default for RoutingParams
source§impl<'de> Deserialize<'de> for RoutingParams
impl<'de> Deserialize<'de> for RoutingParams
source§fn 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
source§impl PartialEq for RoutingParams
impl PartialEq for RoutingParams
source§fn 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 ==
.source§impl Serialize for RoutingParams
impl Serialize for RoutingParams
impl StructuralPartialEq for RoutingParams
Auto Trait Implementations§
impl Freeze for RoutingParams
impl RefUnwindSafe for RoutingParams
impl Send for RoutingParams
impl Sync for RoutingParams
impl Unpin for RoutingParams
impl UnwindSafe for RoutingParams
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