k-shortest path function

2 visualizaciones (últimos 30 días)
ahmed-wali
ahmed-wali el 6 de Mayo de 2013
just downloaded k-shortest path function and would like to see an example (3 to 4 nodes) showing how this function is used. many thanks
  1 comentario
Image Analyst
Image Analyst el 7 de Mayo de 2013
I don't know what that is. You didn't list a toolbox, so is it something you found in the File Exchange? I don't know all the files in there - neither does anyone else.

Iniciar sesión para comentar.

Respuestas (2)

Image Analyst
Image Analyst el 7 de Mayo de 2013
Steve has a nice blog series about shortest paths: http://blogs.mathworks.com/steve/2011/11/01/exploring-shortest-paths-part-1/

ahmed-wali
ahmed-wali el 11 de Mayo de 2013
yes i have downloaded this function from the file exchange and its called "kShortestPath_Yen's algorithm". i have used this function to find the 2-shortest paths between 2 nodes. here is the distance matrix i'm using
M =
Inf 20 30 Inf Inf Inf
20 Inf Inf 10 15 Inf
30 Inf Inf 12 Inf 60
Inf 10 12 Inf 25 Inf
Inf 15 Inf 25 Inf 70
Inf Inf 60 Inf 70 Inf
example for 2-shortest path between node 1 and 6, matlab is giving me the result below ans =
[1x3 double] [1x5 double]
and i can't make sense of it. i'm looking for a function that can calculate the weights of the shortest paths. many thanks

Categorías

Más información sobre Downloads en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by