TSP with bidirectional tunnels #2405
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
donthomasitos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem description
My routing problem consists of "tunnels", which can be traversed in both directions, but should only be traversed once. So it's basically a TSP problem, but each vertex has two positions: An entry and exit - but accessible from two directions. Therefore, I don't think it's just an asymmetric TSP.
Current approach
With N tunnels, I have a distance matrix of (2*N)**2, where I set the distance between each exit/entry to 0. This works most of the time, but it's not a guaranteed constraint.
Question
How can I force the routing algorithm to either:
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions