I am trying to solve variant of a multi-path traveling salesman with an incomplete graph.
EDIT: changed the description (twice) based on feedback from @daniel_junglas.
In more words:
- Only 1 salesperson
- The salesperson can only visit every city exactly once
- The salesperson can drive in various modes of transport (e.g. train, car, boat). Every mode of transport changes the time it takes to travel between cities
- The salesperson can change the mode of transport in between cities (at a cost), but not in a city. The change can be seen as yet another edge between the two cities with a particular weight associated
- not every city can be visited by every mode of transport (e.g. only a boat can reach city D)
- the graph is not complete, so not all cities are connected, but one or more Hamiltonian path exists
Based on the example:
- 4 cities (1-4), each node having a car parking lot (C), train station (T), harbor for boats (B).
- Starting and ending in 1C
- Every city has to be visited one
- No link from a train station to a harbour to the parking lot, only able to change outside of the cities (for instance 1C to 2T).
- every link has a weight associated to it, based on distance, speed of transport mode and time penalty for changing transport mode
- Example paths:
- 1C -> 2T -> 3T -> 4T -> 1C
- 1C -> 2C -> 3T -> 4T -> 1C
I was planning to solve this with concorde/cplex.
I have tried solving it with pyconcorde. For this, I encoded every parallel edge to the same node as a new node (A, A', A''), but I can't find a restriction to say only one A-node should be visited. I see many a-symetric TSP and multi-TSP solutions, but none fitting my requirements.
My questions: How should I approach this problem (tutorial link, embedding proposal, etc) to find the shortest route that visits all cities exactly once? Which tool would help me?
P.S. I am aware of various single-algorithm solutions, both probabilistic and exact. However, I am searching for a tool that combines various techniques, such as cplex, in the hope of better results for my specific data.
P.S.2. I am aware this question might be broad. I am open to any remarks in order to improve my questions