k-shortest path function

1 Ansicht (letzte 30 Tage)
ahmed-wali
ahmed-wali am 6 Mai 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 Kommentar
Image Analyst
Image Analyst am 7 Mai 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.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Image Analyst
Image Analyst am 7 Mai 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 am 11 Mai 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

Kategorien

Mehr zu Downloads finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by