-
Notifications
You must be signed in to change notification settings - Fork 160
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
Limit max path length for Yens path finding algorithm #334
Comments
Hi @lvijnck, We will have a look at your request, but I am not sure if we will be able on it directly unfortunately due to other tasks having higher priority currently. Might I ask the value of If the paths are sufficiently large, allocating more cores could potentially help as the work in spur nodes is divided among cores. Best regards, |
Let's say the max. path length I want to consider is 3, then finding paths of length 5 takes waaay to long due to graph size (5+M nodes and 20+M edges). We're currently running concurrency 4 due to Neo4J licensing |
Hi again @lvijnck , Thank you for your input! As I said we will put it on the backlog, but I cannot guarantee yet when or whether it will be picked up. Since 3 is relatively small, have you tried tackling it with cypher? I would look into this document for suggestions, namely the quantified patterns section, or shortest. Best, |
Also, perhaps you could try some some heuristics, if you can think about pre-processing your graph and replacing the weight of all edges, as follows: Of course this has the effect that it will probably find all length-1 paths first, then all length-2, then all length-3, so you might need a larger |
Is your feature request related to a problem? Please describe.
Yes, we're aiming to compute x shortest paths in a huge graph. Yens' algorithm seems to run quite long for our use-case and produces paths that are "too long" in certain cases too.
Describe the solution you would like
It would be nice to be able to cap the max length of the algorithm, and not return any paths if the shortest path exceeds more than x hops.
Describe alternatives you have considered
Neo4Js ExpandConfig statement, but this crashes our Neo4J instance.
The text was updated successfully, but these errors were encountered: