Search code examples
pythonpython-3.xmathematical-optimizationor-toolsvehicle-routing

Is it possible to break demands in several vehicles in a vrp python ortools?


I'm trying to solve a VRP with time windows and demands constraints using python ortools. But my model consider a whole demand for a single vehicle.

My question is:

  • Can i break a demand in several vehicles considering the cost function? That is, the model chooses the number of vehicles and their proportions.

Solution

  • No, solver can only visit each node one time (TSP solver BTW).

    You have to split your node in several nodes manualy...

    ps: see https://github.com/google/or-tools/issues/1246#issuecomment-489105446