Is-it possible to run Travelling Sales Person (TSP) in pgRouting (I've got 2.3... installed) with constraints?
A general TSP algorythm or those I've identified in pgRounting solve the TSP problem visiting each nodes (cities) to create the shortest cost path at the end.
I need a more sophisticated solution that enables adding constraints before the calculated related to node (city) order.
Eg.: Say we have 5 points to reach like A B C D and E.
In a regular TSP when starting from A it would answer A -> D -> E -> C -> B [-> A].
Let's assume that we have a package to carry meanwhile from C to E, so C must precede E on that day of traveling.
So, a constraint comes up like: C -> E
The full definition of the call would be:
Do TSP with
- A B C D E
- Starting from A (and also finishing here)
- CONSTRAINT: visit C before E (and maybe more...)
Is there a solution, algorithm, program like this?