Traveling sales man with alternating groups of destinations.

46 Views Asked by At

I am looking for an algorithm to determine the best route where the groups of destinations alternate.

For example: I have three stores and three warehouses. So I would like to visit a warehouse first, then a store, then a warehouse, then a store and so on. What are some algorithms for finding the best route in these circumstances.

Parameters and Restrictions:

  • Equal number of Warehouse and Stores.
  • Each location only visited once.
1

There are 1 best solutions below

0
On BEST ANSWER

Just run a standard traveling salesman algorithm, setting the distances between stores to infinity (meaning: to such a large number that no self-respecting traveling salesman algorithm would ever include an edge joining two stores) and likewise the distances between warehouses.