I have a python script that plans walking routes between attractions at a large-ish festival that pre-calculates shortest paths by brute forcing dijkstra's algorithm between every pair of ~200 "intersections" in a minute or two on my laptop. (The app can then just look up the route by start/end location and draw it on a map)
Travelling salesman is hard, but even O(n!) is trivial on machines today where n is small. And there are simplifications and approximations that get something like within 1% of the theoretical shortest path in something like O(n log(n)) time (with significant startup/preprocessing time, but where N is between a few thousand and a few million these work).
https://en.wikipedia.org/wiki/Travelling_salesman_problem
It's a classic NP-Hard problem. And depending on the size of the sample we can have pretty much the best route available, but we still don't have a way to solve this 100% accurately (particularly for large sample size)