Dijkstra algoritm coding on multileg itineraries
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Davide Spano
el 27 de Nov. de 2021
Editada: Davide Spano
el 29 de Nov. de 2021
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 comentarios
Respuesta aceptada
Yongjian Feng
el 27 de Nov. de 2021
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 comentarios
Yongjian Feng
el 27 de Nov. de 2021
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.
Davide Spano
el 29 de Nov. de 2021
Editada: Davide Spano
el 29 de Nov. de 2021
Más respuestas (0)
Ver también
Categorías
Más información sobre Dijkstra algorithm en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!