I'm working on a personal project which basically boils down to a typical Traveling Salesman problem (frequently have to go to ~20 different locations ensuring I go to all of them in the shortest driving time possible). I figured I would write some quick code to find the optimal route using Dijkstra and QuickGraph since the graph will be very small, it comes down to where should I start and what route should I follow.
I have a good start going (plan is to use ShortestPathsDijkstra to get the optimal route starting from each node and between them choose the best starting point), but I'm struggling on utilizing the results of the ShortestPathsDijkstra function. I know it returns another function which I can use to query the optimal route to specific locations, but I'm not looking for that, I'm looking for the optimal route, which if I inspect in Visual Studio the function I can see is under Target.predecessors, however that's not accessible to retrieve.
Am I missing something or is there no way of getting that optimal route that hits all nodes and you can only ask for specific end nodes? (Seems way too inefficient if the optimal graph is already calculated).
Tried accessing the Target variable but didn't find any way to get the full IEnumerable of the optimal route.