I have written a few lines of code that solves the problem would be easy to extend to solve for the shortest time rather than shortest distance, I could just use a TAS and wind to get an average groundspeed for each track. The code solves the shortest distance matrix, it does not know what the weights are in the matrix, they can be time or distance, or fuel.
...
Since solving the actual routing of the TSP is performed in several hundred lines of imported code, you could have at least mentioned attribution.