-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More fine-grained penalization of ascents and descents #617
Comments
Yes, there is currently no way to directly relate the cost factor to the (internally calculated) slope of a way segment.
Correct, but they can at least vary for different types of ways, see: Allow hill cost and hill cutoff in way context |
It would be very useful to simply expose the slope in a named variable for use in scripts. For instance, the energy spent when walking/hiking is nonlinear vs the slope, so calculating energy-based costs is impossible. Maybe there is some hack or workaround I am missing? Should I make a new issue on this repo to request this specifically so it can be labeled and tracked? |
@lukasmericle, I don't think there is an easy way to achieve this, as the slope along the way segments (up to several kilometers long) on which the profile script operates is generally not constant. |
Is it possible to infer the slope of a way segment from the two nodes at its endpoints? Do we have access to lat/lon/elevation of those nodes? If not, are there other routing engines you're aware of that do expose this kind of information? Thanks |
Yes, but then you get the "plain ascend" of this segment and neither the maximum nor the minimum slope.
I don't know, sorry. But you can already soft limit the max slope in BRouter like this: brouter/misc/profiles2/gravel.brf Lines 35 to 38 in 93b13be
|
Two examples with penalties on a scale of 1–10. The bike should be assumed to be a moderately loaded trekking bike.
Example 1:
highway=secondary
withsurface=asphalt
andsmoothness=good
:highway=secondary
Example 2:
highway=track
withtracktype=grade2
,surface=compacted
andsmoothness=bad
:Current state of BRouter
AFAIK it's currently impossible to express cost functions of this shape in BRouter.
downhillcost
,downhillcutoff
,uphillcost
anduphillcutoff
are all constants. Thereforedownhillcostfactor
anduphillcostfactor
can't vary for different inclines.Motivation
I think that fine-grained penalization of inclines would help cyclists to use the road network more effectively and safely. Someone with narrow road tires may prefer taking a moderate ascent on a
grade2
track rather than on a primary highway. Most cyclists would probably prefer to avoid steep descents (say -15% and steeper) entirely.I don't know how this feature should be designed or implemented, but I think it would be a great improvement! :)
(Related / background: poutnikl/Brouter-profiles#29, related earlier issue: #22)
The text was updated successfully, but these errors were encountered: