Struct map_model::pathfind::RoutingParams [−][src]
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
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self