Skip to content

Make normal algorithms work on graph prepared for CH #116

Closed

Description

@karussell

It could be useful to prepare the graph for CAR but still have FOOT and BIKE vehicles or just CAR with other weighting available. I.e. it would be nice to have the possibility to run CH and normal algorithms (e.g. via setting edge filters)

The work in the branch shows that if we use the filter then CH-queries and preparation are 20% slower compared to disconnecting shortcuts and edges. Unsurprisingly the number of normal edges going in the wrong direction (downwards) is also 20%, i.e. iterating/loading them is waste of time.

This issue will allow us:

  • to improve turn instructions if CH is enabled and for this it is necessary to iterate over original edges only (very important, no space efficient workaround to my knowledge)
  • to support turn costs for CH it could be necessary to run normal algorithm while path extraction (important, but there exists a workaround via storing 'loops' at via point elsewhere)
  • running normal algorithms on a prepared graph (minor importance)

To make this issue complete we do in a separate branch:

  • removed LocationIndexTreeSC
  • graph.getOriginalGraph (make sure no confusion with QueryGraph exists) or another technique to avoid a special edge filter e.g. to use LocationIndexTree with a graph containing shortcuts
  • QueryGraph needs a getOriginalGraph method too (e.g. in Path but also in normal algorithms)
  • make enabling multiple vehicles possible even if CH is enabled. But define which single vehicle should be used for CH -> done via new defaultVehicle which is also used if no vehicle was specified
  • see if we can fix Bug in LevelEdgeFilter #288
  • an efficient StopEdgeFilter which knows that original edges come before shortcuts and allow an efficient way to iterate over original edges. Does not help much as this is not often the case that there are 0 normal edges
  • later think about reverse approach: always use base graph except level graph uses special 'graph for algorithm' in algo and path
  • Remove the necessity to do the CH preparation before the index creation. The location index had to be created AFTER the preparation but sometimes we need to change edges based on an location index BEFORE preparation.
  • improve performance, moved to Improve query time for CH #240

Activity

  1. added this to the 0.4 milestone on Jul 28, 2014
  2. Svantulden commented on Jan 8, 2015

    @Svantulden

    Do you have any idea when this issue will get some progress? I need roundabout instructions (#185) for my use case and would like to use Graphhopper for routing. I am willing to contribute as much as I can, though I don't have much experience with graphs and routing algorithms so maybe I can help out in another area.

  3. martinsauvage commented on Jan 10, 2015

    @martinsauvage

    Hi Peter,

    Same thing for me, any update about this issue to support later #185 ? I know you don't provide timeframe but are you close to release 0.4, is it matter of months?

    Thanks,
    Martin

  4. karussell commented on Jan 10, 2015

    @karussell
    MemberAuthor

    I know progress is very important for an open source project and we'll recover and push more out in the next few weeks/months compared to the last months, but again: we can't give you a time estimate for specific issues as this depends on community contributions and customer requests which can slow down this issue or make it happen in a few days.

  5. martinsauvage commented on Jan 10, 2015

    @martinsauvage

    OK thanks for your reply, so this issue/feature is not abandoned just postponed. It is not easy to be informed about the priority and activity of an open source project, maybe you have a blog or something else to communicate about progress?

  6. karussell commented on Feb 23, 2015

    @karussell
    MemberAuthor

    This issue requires some substantial refactoring: separating a 'base graph' and a 'routing graph' and managing this from one enity e.g. 'GraphStorage'. Currently GraphStorage is too tightly coupled with the Graph interface. The plan is to accept the slow down for now, and make everything working including the roundabout instructions. And in 0.5 to prepare for the refactoring. With #111 this would also then allow for multiple CH profiles in one graph storage.

  7. karussell commented on Feb 25, 2015

    @karussell
    MemberAuthor
  8. karussell commented on Feb 25, 2015

    @karussell
    MemberAuthor

    Closing in favor of #338

  9. added 2 commits that reference this issue on Feb 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions