Skip to content
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

Take live traffic conditions into account #32

Closed
quintona opened this issue Apr 15, 2013 · 6 comments
Closed

Take live traffic conditions into account #32

quintona opened this issue Apr 15, 2013 · 6 comments

Comments

@quintona
Copy link

Add the capability to calculate routes based on a current understanding of road speeds based on live traffic conditions. This would need to include the capability to initialize the graph with known speeds (attained via some data source or via estimate) and then update it later based on changing conditions. The key intentions being that when major conditions exist and the road speeds drop to near zero, that different routes are selected, and in all cases that realistic time estimates are provided for the route based current conditions.

@quintona quintona reopened this Apr 15, 2013
@karussell
Copy link
Member

Using live traffic for the normal graph is easy: just apply the different speed conditions to the edge:

someEdgeIterator.flags(carFlagEncoder.flags(speed, direction))

For a contraction hierarchies algorithm (the faster one) this is not possible.

@quintona
Copy link
Author

When you say it isn't possible, you mean it isn't implemented or it simply isn't possible? You will excuse the ignorance on the contraction hierarchies.

@karussell
Copy link
Member

IMO it is not possible for CH: http://algo2.iti.kit.edu/download/dtch.pdf

So, you can rebuild the hierarchy after a change. If this rebuilding is fast enough then of course it is possible in practise. (BTW: for mobile devices this CH rebuild stage is NOT possible at all due to the heavy resource utilization!).

Besides all this, the CH preparation in graphhopper is very slow at the moment and could need some improvements like parallelization etc. And there are other fast algorithms where a custom metric is better recognized, see http://research.microsoft.com/apps/pubs/default.aspx?id=145688

@quintona
Copy link
Author

quintona commented May 6, 2013

I would prefer to go the route of the rebuild. How/where should I set the speed for a given OSM way when doing the graph build?

@karussell
Copy link
Member

See e.g. CarFlagEncoder.SPEED

@karussell
Copy link
Member

I do not expect open or free sources for traffic conditions, so we won't be able to create any specifics for this. Reopen if you have an idea what could be improved.

tumluliu referenced this issue in GIScience/graphhopper Sep 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants