[GraphHopper] Routing with multi depots and depot priority
Peter K
peathal at yahoo.de
Sun Aug 25 16:00:54 UTC 2013
Hi Florian,
it depends on the many-to-many query. Have a look into DijkstraOneToMany
which basically reuses the shortest path tree of the start. But this
algorithm is waste of memory if you only need a few points (compared to
the total number of nodes in the graph), instead you could develop your
own oneToMany algo based on hash maps instead of arrays.
Furthermore for all bidirectional algorithms and if you have some memory
available to cache the shortest path trees of ALL necessary points you
can further optimize n*n queries and pick two precalculated shortest
path trees, traverse them and find the route. Instead of re-calculating
the shortest path tree everytime from scratch. (E.g. if you use CH you
don't need much memory for one shortest path tree.)
Regards,
Peter.
> Hello,
>
>> you can just do a many to many calculation. Of course this can and will
>> be optimized.
> Could you give me a hint where to start looking for that? The Graphhopper API only knows route and the GHRequest only seems to have one start and one endpoint. Is there something better in the code already then calling route(...) n x n times?
>
> Regards,
>
> Flo
> _______________________________________________
> GraphHopper mailing list
> GraphHopper at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/graphhopper
>
More information about the GraphHopper
mailing list