I'm trying to get my head around using the following data to create the shortest route between 2 places in a map using VBA in either excel or access.
So if my start location was Location3, how would I plan a route to get to location1
I expect it would be better to have the data in the following format:
ID, Connection
1, 2
2, 3
2, 4
3, 2
4, 2
4, 5
5, 3
5, 5
The result in this instance would have to be 3->2, 2>1
But how do I get that result.
In the real data there is over 300 locations, some with up to 20 connections each.
Anyone have any suggestions on where to start?
ID | Name | Connection 1 | Connection 2 |
1 | Location1 | 2 | |
2 | Location2 | 3 | 4 |
3 | Location3 | 2 | |
4 | Location4 | 2 | 5 |
5 | Location5 | 3 | 5 |
So if my start location was Location3, how would I plan a route to get to location1
I expect it would be better to have the data in the following format:
ID, Connection
1, 2
2, 3
2, 4
3, 2
4, 2
4, 5
5, 3
5, 5
The result in this instance would have to be 3->2, 2>1
But how do I get that result.
In the real data there is over 300 locations, some with up to 20 connections each.
Anyone have any suggestions on where to start?