In reply to Somerset swede basher:
Other's have done a good job of explaining why this sounds like a TSP problem and why TSP is a computationally expensive problem to solve. Nothing further to add.
This however, "flatest way to link them", caught my eye and no one appears to have addressed it.
Given this is UKC .. presumably you are planning a round of some sorts.
This reads like a job for either: Naismith's rule or Scarf's equivalence between distance and climb.
https://en.wikipedia.org/wiki/Naismith%27s_rule
Naismith's rule: allow 1 hour for every 3 miles (approximately 5 kilometers) of distance, plus an additional hour for every 2,000 feet (approximately 600 meters) of ascent.
Scarf's equivalence: a more nuanced version of Naismith's that allows for personalization to the individual by introducing a personal pace variable.
However - both of these have known assumptions/variables that need consideration before being put into use.
- Assumes typical terrain (not scrambling)
- Normal conditions (not winter)
- Does not account for breaks/delays
- Does not account for loads carried
- etc ..
If you truly wanted the "flatest" path between nodes i.e. the true elevation between 2x points inc ups & downs along the way .. that itself is also non-trivial to calculate .
See here for how it can be calculated: https://www.gpsvisualizer.com/tutorials/elevation_gain.php
With gpx data you can use this page to calculate elevation gain (Ensure you click the Add DEM button) : https://www.gpsvisualizer.com/profile_input
That being said .. generating multiple possible gpx tracks between each of your points and then generating the elevation gain for each isn't going to be fun at all.
I think you're strategy to simply where possible makes most sense. Truly trying to calculate all possible paths/tracks between each of your 80(?) nodes, then trying to generate a gpx track for each and then an elevation gain is going to be exceptionally computationally expensive to achieve.
Come back and let us know what you decide to do.
(Would make a good comp science project)