K-Shortest Path- Yen's algorithm

Version 1.0.0.0 (11,6 KB) von Meral Sh.
Based on Yen’s algorithm, returns the K shortest paths between a source and a destination.
3,8K Downloads
Aktualisiert 12. Aug 2011

Lizenz anzeigen

This function is based on Yen's k-Shortest Path algorithm:
J. Y. Yen, "Finding the K shortest loopless paths in a network", Management Science 17:712–716, 1971.

It returns:
1) [shortestPaths]: the list of K shortest paths (in cell array 1xK)
2) [totalCosts] : costs of the K shortest paths (in array 1xK)
Yen's algorithm prevents loops.

This function calls a slightly modified/simplified function dijkstra() (submitted by Xiaodong Wang, 2004)

The Network/Graph of N nodes is fed in the form of a NXN netCostMatrix which must have positive weights/costs.

IMPORTANT: see 'TestKShortestPath.m' and 'Test graph (case 1).pdf' for netCostMatrix format.

Zitieren als

Meral Sh. (2026). K-Shortest Path- Yen's algorithm (https://de.mathworks.com/matlabcentral/fileexchange/32513-k-shortest-path-yen-s-algorithm), MATLAB Central File Exchange. Abgerufen.

Kompatibilität der MATLAB-Version
Erstellt mit R2009a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Dijkstra algorithm finden Sie in Help Center und MATLAB Answers
Version Veröffentlicht Versionshinweise
1.0.0.0