3

I'm trying to solve fleet optimisation by solving CVRPTW in ortools.

I'm dividing each location in chunks as their loads are higher than max capacity of available vehicle types.

Here, we have two constraints which are kind of conflicting:

  1. Each vehicle can do at most two trips in a day. One trip should be in day (6AM to 6PM) and second should be in night (6PM to midnight).
  2. If a location (having many nodes due to chunk divisions) is being visited 2 or more than 2 times, two of them must be in day and night. [For example, A location is being visited twice, but both in night or both in day doesn't work]
  3. If there are 3 visits, then 2 can be in one shift(day or night) and 1 can be in other shift... and so on.

How can I implement this in ortools vrp?

mufassir
  • 406
  • 5
  • 16

0 Answers0