Routing A -> B -> A #4583
-
I have the following duration matrix: "duration_matrix": [
[-1, -1, 714, 381, 286, 294],
[-1, -1, 507, 174, 120, 127],
[719, 537, -1, -1, -1, -1],
[406, 224, -1, -1, -1, -1],
[283, 142, -1, -1, -1, -1],
[428, 247, -1, -1, -1, -1]
] The values "-1" in the duration matrix represent invalid connections. Conceptually the matrix consists of two sets of vertices: A and B. (duration_matrix[I] < 2 in set A & duration_matrix[I] >= 2 in set B) I have n vehicles, and I want to route them from some vertice in set A to a vertice in set N, then back to the starting vertice. Is it possible to do this with or-tools? I want to optimize overall duration based on these constraints |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
To me it's a bit unclear what you want: maybe add an complete example including a solution. ortools' routing-solver is very generic and might be able to do this but:
|
Beta Was this translation helpful? Give feedback.
To me it's a bit unclear what you want: maybe add an complete example including a solution.
But it sounds like you should not do any routing at all and just solve an assignment-problem / bipartite-matching problem.
ortools' routing-solver is very generic and might be able to do this but: