NW-Extension icon indicating copy to clipboard operation
NW-Extension copied to clipboard

There should be a way to get all the shortest paths of equal length

Open nicolaspayette opened this issue 13 years ago • 3 comments

Currently, all the "path-to" primitives return the first path that Jung's implementation of Dijktra's algorithm finds.

Maybe there should even be a way to get all the acyclic paths from A to B. (You could then order them by length if you want to.)

nicolaspayette avatar Jul 10 '12 18:07 nicolaspayette

This would be super helpful. By being able to randomly choose between 'reasonably short' paths, we can model imperfect information in networks. I guess it'd be sort of network stochasticity.

arthurhjorth avatar Apr 24 '13 15:04 arthurhjorth

Maybe use http://jgrapht.org/javadoc/org/jgrapht/alg/KShortestPaths.html

nicolaspayette avatar May 10 '13 00:05 nicolaspayette

I'm running into this limitation right now. Is there any way to force nw to report all shortest paths?

jlambvo avatar Feb 06 '24 07:02 jlambvo