Dijkstra algoritm coding on multileg itineraries
1 次查看(过去 30 天)
显示 更早的评论
Hi to everybody, I'm a fresh newby in this forum and actually to Matlab too.
I'm looking for a solution to a problem I heard would be resolvable with the Dijkstra algoritm, but I am not really sure if it would be the real solution.
My problem is the following:
- I got a list of 764 ocurrencies (Variables: Code, County_name, Lon, Lat);
- an another matrix with the distances between pairwise of 32 nodes
- The geodesic distance between pairwise of any singular origin/destination (764) and the nodes
I need to perform the calculation tha allow me to find the minimum distance between all the pairwise of the 764 ocurrencies passing by the two of the 32 nearest nodes
I'm working on it for a very lasting time, and also if I can conceptualise that in my mind, I'm looking to a good solution that could allow to me to manage all the new 500k+ and I think the Dijkstra algoritm would be a good solution, but I can't find right way to code it.
Hope someone could help, thanks
0 个评论
采纳的回答
Yongjian Feng
2021-11-27
Dijkstra algorithm actually gives you the seudo-code of the implementation. Just need to translate that seudo-code into matlab. What do you mean "the right way" then?
3 个评论
Yongjian Feng
2021-11-27
My understanding is that Dijkstra's algorithm doesn't need node values. The nodes need indices to identify them, but no values needed.
But I think Dijkstra's algorithm uses fixed source node. Or say it gives you only the shortest pathes between the selected source node and another node.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dijkstra algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!