pub struct LoopConstraints {Show 19 fields
pub min_distance_m: f64,
pub max_distance_m: f64,
pub min_lower_limb_load_km: f64,
pub max_lower_limb_load_km: f64,
pub target_lower_limb_load_km: Option<f64>,
pub min_moving_time_s: f64,
pub max_moving_time_s: f64,
pub min_ascent_m: f64,
pub max_ascent_m: f64,
pub min_descent_m: f64,
pub max_descent_m: f64,
pub max_road_fraction: f64,
pub max_low_confidence_fraction: f64,
pub max_restricted_access_fraction: f64,
pub max_repeated_edge_fraction: f64,
pub allowed_shapes: Vec<RouteShape>,
pub forbidden_terrain: Vec<Terrain>,
pub min_terrain_fraction: BTreeMap<Terrain, f64>,
pub max_terrain_fraction: BTreeMap<Terrain, f64>,
}Fields§
§min_distance_m: f64§max_distance_m: f64§min_lower_limb_load_km: f64§max_lower_limb_load_km: f64§target_lower_limb_load_km: Option<f64>Preferred flat-gravel joint-work-equivalent load inside the lawful load window. This guides ranking; it is not another constraint.
min_moving_time_s: f64§max_moving_time_s: f64§min_ascent_m: f64§max_ascent_m: f64§min_descent_m: f64§max_descent_m: f64§max_road_fraction: f64§max_low_confidence_fraction: f64§max_restricted_access_fraction: f64§max_repeated_edge_fraction: f64§allowed_shapes: Vec<RouteShape>§forbidden_terrain: Vec<Terrain>§min_terrain_fraction: BTreeMap<Terrain, f64>§max_terrain_fraction: BTreeMap<Terrain, f64>Implementations§
Source§impl LoopConstraints
impl LoopConstraints
pub fn judge(&self, metrics: &RouteMetrics) -> ConstraintVerdict
pub fn audit(&self, metrics: &RouteMetrics) -> Vec<ConstraintAudit>
pub fn allows_shape(&self, shape: RouteShape) -> bool
pub fn penalty(&self, m: &RouteMetrics) -> f64
Trait Implementations§
Source§impl Clone for LoopConstraints
impl Clone for LoopConstraints
Source§fn clone(&self) -> LoopConstraints
fn clone(&self) -> LoopConstraints
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LoopConstraints
impl Debug for LoopConstraints
Source§impl Default for LoopConstraints
impl Default for LoopConstraints
Source§impl<'de> Deserialize<'de> for LoopConstraints
impl<'de> Deserialize<'de> for LoopConstraints
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 LoopConstraints
impl PartialEq for LoopConstraints
Source§impl Serialize for LoopConstraints
impl Serialize for LoopConstraints
impl StructuralPartialEq for LoopConstraints
Auto Trait Implementations§
impl Freeze for LoopConstraints
impl RefUnwindSafe for LoopConstraints
impl Send for LoopConstraints
impl Sync for LoopConstraints
impl Unpin for LoopConstraints
impl UnsafeUnpin for LoopConstraints
impl UnwindSafe for LoopConstraints
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