Parallel relations for a VRP in Google OR-Tools

82 Views Asked by At

Is there a way to solve a VRP in Google ORTools where some vehicles have to be at certain locations at the same time?

Let's say, there are technicians in the vehicles who have to check a line at the same time, one at one end of the line and the other at the other end.

The task can take place at any time during the tour, the only condition is that it takes place at the same time.

A predefined time window would not be a solution, as this would possibly prevent the optimum route.

1

There are 1 best solutions below

1
On

Just synchronize the cumul var of the time dimensions on the two vehicles for the given node.

This is described here: https://github.com/google/or-tools/issues/1047#issuecomment-529312260

The code (in C++) is:

solver->Add(solver->MakeEquality(cumul_var1, cumul_var2));