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.
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.