You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if you think about it, the mechanism for these restrictions is the same as the turn restrictions and road class restrictions. we could just absorb them here:
then we generalize VehicleParameter to RestrictionParameter. A RoadClass restriction parameter is a RoadClass(HashSet(u8)) or whatever deserialized off the query. it would tidy things up since they all have the same logic
The text was updated successfully, but these errors were encountered:
note: wrote this, then talked myself out of it, leaving it here for posterity.
had a thought about this. still thinking that the right path is an enum. wondering if there's a smart way to do this more generally, since we are proposing this work in the base repo. could we reduce the above into:
#[derive(Serialize, Deserialize)]
pub enum VehicleRestriction {
EdgeWeightRestriction(???),
EdgeDistanceRestriction(???),
// ... other units
NumericClassRestriction(u8),
TrajectoryRestriction(Vec<EdgeId>)
}
downstream, a user could compose these as a CombinedFrontierModel.
thing is, that stuff in the ??? would need to be open enough in it's design to handle things like "expect a number on the query at the key axles, then multiply that by a key weight, and then do a <= operation."
eh, that's writing a whole nuther DSL, and it sounds awesome, but maybe that's future work to revisit later.
PR #204 introduced the concept of the VehicleRestriction.
@robfitzgerald points out that:
The text was updated successfully, but these errors were encountered: