Open tux2000 opened 8 years ago
Hi Pascal. Because we don't know which is the correct direction, OSRM does not include oneway=reversible
at all. They are completely removed from routing. We figured it's better to send someone via another route than potentially tell them to go the wrong way up a one-way road.
OSRM currently has no ability to handle time-dependent properties, so we can't make it change behaviour depending on the time the route is requested.
Here's one of the ways in question: https://www.openstreetmap.org/way/23145516 tagged oneway=reversible
.
It looks like there is no conditional restriction on it, otherwise you could probably parse that in the profiles and allow routing over reversible oneways when their direction flips frequently (every n minutes with n < threshold), removing the oneway flag so to speak.
@daniel-j-h that's a good idea actually. I think oneway=reversible
for roads that flip 1x per day (example: http://www.openstreetmap.org/way/436339937, this road heads south in the afternoons and north in the morning) we probably should avoid by default, but things like @tux2000 that <1x per hour we could route on, and ad a 30 minute penalty to (0.5x the 1/flip frequency).
Looking around, I unfortunately don't see a lot of these tagged with timing information :-(
@danpat I would even do the daily ones. As long as you add half a day penalty and warn the user about it (e.g. check your timetables please), you would not separate the graph into components but prefer roads that are not using these ways.
Here's another example of alternating oneways:
@tux2000 currently there are no conditional reversible restrictions based on frequencies instead of fixed times in OSM (as in reverses every x minutes). Here are all reversible oneways, you can sample them and see how they're tagged.
Here are a few oneway:alternating:interval
tags:
And this is a different use-case, with a similar idea:
What we already could do is parse the Conditional Restriction and route over reversible oneway that change at specific times.
But then again, take a look at the tagging. As long as almost all oneway=reversible
are on their own without restriction or interval, there is not much we can do.
So what would be required to be able to route through it?
As I understand it, currently, if there is the oneway=reversible
tag included on a path its not used at all resulting in long detours. Is there any tag that could be used instead and that is accepted by OSRM already now?
For this particular path I can of course also add additional tags describing the mode of reversion, however there I am not sure about the tags either... Its not strictly time based but based on sensors. If there are cars on one side but not the other the traffic lights for that direction will be green and if there are cars arriving from the other side it is inversed. If a pedestrian wants to pass the bridge there is a button to press and he/she will get a longer green period to be able to path safely. So something like oneway:alternating=onrequest
would be good but I didnt find any tag like this that seems to be in use already... Any suggestions?
Is there any tag that could be used instead and that is accepted by OSRM already now?
There is no consensus, widespread usage or strong favor for a particular tag in OSM at the time it seems. Maybe you can ask on the tagging mailinglist for guidance on how to tag reversible oneways with a frequency instead of just specific time points.
Conditional Restrictions already solve the problem for the use-case when the direction changes at specific times (e.g. in the morning and then in the evening again), but not for the use case of frequent direction changes.
For frequently changing reversible oneways the next step for you would be to adapt the profile here: instead of discarding reversible oneways you can then check the tagging for their interval (e.g. every 10 min), and add a penalty to the way speed.
To fully support reversible oneways we would need to adapt the guidance code a bit to issue warnings to the user. But for your use case I think the steps outlined above should be a good start.
A good first step might simply be to halve the speed - this would cater for anything with a 50% duty cycle, which I assume would be the common case for short-duration reversible (i.e. every 10 minutes).
I think highway=motorway
and oneway=reversible
is probably still problematic though - these types of roads only tend to change once or twice a day to manage peak flow directions - I'm not sure if a 50% penalty would be appropriate here as we might end up suggesting a route for half a day when it's not allowed.
Proposal:
oneway=reversible
for everything but highway=motorway
, and apply a 0.5x factor to the way speed.Anyone want to do a spot check of a bunch of tagged locations and describe how that might turn out?
There are reversible ways in our city, that are opened in one direction at working day, and in opposite direction at night. There are some timetable for each road.
It seems, osrm should take into account estimated time (based on current real time) when user reaches such roads.
So, when timetable is not given, OSRM should expect that this way switches, say, every 10 minutes, so it should take into account initial delay of 5 minutes on entering such roads.And it should not reduce maximal speed on such segments.
There's now a way to distinguish between high frequency alternating oneways and low frequency reversible oneways:
cc @joto
Thanks everyone! I already changed the example in my initial report to "alternating" so this one is fixed :)
Re-opening here since this ticket initially tracked oneway=reversible
which OSRM still does not handle.
Could you please check if this can be fixed as well?
Hej,
OSRM seems not to route through a oneway=reversible path, which was used (in my opinion) correctly at a construction site where traffic from either direction is passing through the construction area as oneway, while the other direction is stopped by traffic light. The example i found is here: https://www.openstreetmap.org/directions?engine=osrm_car&route=59.78790%2C17.66058%3B59.78684%2C17.66430#map=13/59.8161/17.6707 (the bridge in the middle can be used but one direction at a time, changing every ~5 minutes). Mapzen is routing the direct way...
Im not sure if this is the right issue tracker for a (probably) routing profile related bug. If not please point me to the right one...
Cheers, Pascal