0

I have a list of haversine distances between customers and their respective salespersons and I would like to apply the TSP algorithm to optimize each salesperson's distance traveled in a given day. What would be the best approach to solving this problem in R or Python?

Note: I do not need to visualize this through any map, I just need to shortest distance traveled between each customer starting and ending with the salesperson location.

GodspeedYou77
  • 23
  • 1
  • 7

1 Answers1

1

Well, there are a lot of strategies you can use to solve this problem, such as (1) approximation algorithms, (2) exact approaches, and, of course, (3) heuristic/metaheuristic approaches. Note that, the optimal solution of a given instance is guaranteed to be achieved only using exact approaches. Regarding each strategy, bellow follows some links that might help you:

  1. Approximation algorithms: There is a famous approximation algorithm for the metric TSP, i.e. when the graph is metric, called Christofides algorithm. But for a general graph, there is no approximation algorithm, unless P = NP (you can check the proof of this theorem here, at section 2);
  2. Exact approaches: For the TSP, this strategy usually divides itself into two categories (but not limited): dynamic programming and integer programming;
  3. Heuristic/Metaheuristic approaches: I will not enter in details about it since there are a big number of heuristics and metaheuristics available for the TSP (you can check it by yourself here).

As you can see, my answer is very open, since your question is very open. So, if you want to get a more precise answer, you need to specify exactly what you need/want.

  • One more thing, maybe move this question to the OR Stack exchange (https://or.stackexchange.com/), would be better, since this question seems to be more related to the OR environment. – Matheus Diógenes Andrade Jan 19 '20 at 13:26