Hello,
I have to solve a problem related with
capacitated vehicle routing problem
(
https://developers.google.com/optimization/routing/cvrp). Let's say
that in this case the vehicle has to pick up and deliver items in
different locations. The items to pick up of deliver are always the
same, it could be, for example, bicycles in different points of a city.
So,
my initial input is the number of items left
over or missing at each point, and also the capacity of the vehicle. (I
haven't thought about solve it with pick-up delivery or-tools approach
because I don't have pairs points of pick up and deliver, as the items
are the same it does not matter)
I tried to solve the problem with CVRP, just writing some demands in negative, for example:
data['demands'] = [0, 1, -1, 2, 4, -2, -4, 8, 8, 1, -2, 1, -2, 4, 4, 8, -8]
When I execute the code, I have a result, but I don't know if is correct because the documentation says that it is for one case or the other, but not for delivery and pick up together.
Can you tell me if this approach is correct? , and if I can use CVRP in this use case? Thank you very much.