Combining multiple Routing tasks of Google OR-Tools

192 Views Asked by At

I want to solve a VRP with some constraints. Let's say I got a network of nodes (= electric omnibus network) and each node represents a busline. Each node has attributes like starting and end time and energy consumption.

My idea is to use the code for a VRPTW and add the constraint of the energy consumption as capacity of a node .
This way I could manage that after a bus does a specific line, it only drives to the lines that are possible to fulfill concerning the time window (means: if he can or can not reach f.ex. line 30 before its starting time) and concerning the enery capacity (every bus has a battery and the energy consumption must not bring it below a certain point x. Point x means the bus can drive the line and still have enough energy left to reach the closest loading facility).
I tried to add the capacity constraint with the AddDimension() functionality, but it doesn't work out the way I want it to.

My question is: is it even possible to realize my idea with the current state of OR-Tools and if yes, how is it done best?
I do it with Python.

0

There are 0 best solutions below