-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Range analysis plugin #2189
Comments
Hey hey, dropping a few related resources: @danpat's @TheMarex has an experimental osrm isochrone project here: @emilymdubois can probably tell you more about isochrones: |
@roroettg Take a look at the Unfortunately, you can't perform a simple Dijkstra search on a Contraction Hierarchy - the graph structure is optimized for 1:1 routing, not 1:N. The |
Thank you very much. I will keep this updated, once i have some results to show. :-) |
Hello, I was able to create a first implementation of an Isochrone-Plugin based on danpats's code for the current version of osrm. As @danpat mentioned the memory increase is significant. Is there a way to reduce the memory or is there any possibility to perform these searches on the contracted graph? Another issue for me is the testing infrastructure. As far as I understand the tests use the shared memory function of osrm, but right now I am only able the to load the uncontracted graph from a file. Is the uncontracted graph also stored in the shared memory? If so, how can i access it? As I am new to opensource projects is this a thing I should make a pull request for once i got some tests running? |
@roroettg The uncontracted graph is not loaded into memory during normal runtime. The datafiles that my isochrone work loaded were temporary files created during processing, but they're not loaded by
|
@danpat Yes, I implemented it as a Plugin and load the graph into RAM.Would a separate service be the better solution? I think the memory usage does more than double, but i can take a look at that. |
@roroettg no, that seems like a sensible approach, but we should definitely make it optional - it's a big bump in memory usage, and not everyone is going to want it. You should:
Would you like to start a pull request with your changes? It would be great to see how you've approached this and discuss the impact of the code changes. This would be a great feature to have in the mainline. |
Right now I am using the code below to get the weight of the edges for the dijkstra, but I am still confused about what the weight really is. The weight depends on the profile I am using, so I am guessing the value is not a distance. Is it a time value or does it have no unit? Since the plugin should be able to have a time and/or distance break condition, is there a way to use the weight for that? const auto data = graph->GetEdgeData(current_edge);
if (data.real)
{
int to_distance = distance + data.weight;
if (to_distance > MAX_DISTANCE)
{..}
}``` |
@roroettg currently, If you wan to do distance-based routing on the node-based graph, you'll need to fetch the underlying coordinates for the edge, and re-calculate its length on-the-fly. Note that @TheMarex is working on #77 at the moment, which is going to make this even more complex, as we will store the duration separately from the weight, so that you can route on the weight, but still get accurate ETA values from the duration. |
I'm closing this here as not actionable for us. Give https://github.com/Project-OSRM/osrm-backend/pull/2399a try for arbitrary edge weights! |
Hello,
I am currently working on a plugin, which should be giving me all ways from a starting point within a given distance. I have worked my way through the code and read about Contraction Hierarchies, but I have still no clue if or how i can implement it.
As far as I know every algorithm already implemented to solve the shortest path problem uses a bidirectional Dijkstra. In my case I think the best way to solve the problem is a normal Dijkstra, but i could not find any information if Contration Hierarchies are able to be used that way.
Any hints or ideas where to start are greatly appreciated.
The text was updated successfully, but these errors were encountered: