There are basically three approaches to TSP:
- Brute force
- Heuristics
- Approximating
Using brute force can be an option for small numbers of nodes. It involves generating all (n-1)!
permutations and just computing their length. Adapted to your problem, all you have to change is the algorithm to generate the possible roundtrips to exclude those where the static points are not at their assigned locations.
Using heuristics (like e.g. simulated annealing), you can compute TSP for much larger problems, but you are not guaranteed a perfect roundtrip, only a good one. These often take an existing solution and derive a random different solution (or multiple solutions) from it. Adapted to your problem, you just discard derived solutions if they violate the requirement that the static points are at their assigned locations.
The third variant uses algorithms that give you a roundtrip in polynomial time, like e.g. walking along a minimum spanning tree, sweeping in one direction or greedily traversing them. Those offer good timing, but in a tradeoff for the quality of the resulting roundtrip. I don't have a clear idea how to adapt these to a solution that requires certain points to be at a certain position. Due to their simplicity, they are not easily adjusted to these additional requirements.