Hello,
I am solving the CVRP in a bit of a particular way, as such to get an optimal route between different product installations (for example curtains), where the demand is equal to the amount of minutes the installation takes and where the maximum capacity = 480 minutes (8 working hours). As such, I get the shortest route for every technician, while he/she stays within the limits of working hours (capacity constraint).
However, now I would like to add two more constraints, being:
1° Some of the installations need to be performed by two people, others by one. When defining an array in which at each node (0 at the depot, 2 technicians at job(node) 1 and 1 at job(node) 2:
data['num_workers'] = [0, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2]
I would like to add this constraint to the routes, in such a way that two routes can contain the same node, since it has to be carried out by 2 workers and the demand is taken into account at this node for each route.
For example: Vehicle 0 -> 1 -> 2 > 5 > 6 -> 0 and Vehicle 2: 0 -> 3 -> 5 -> 8 -> 0
2° Secondly, I would like to not use the total vehicle_capacity as constraint - in my case, the number of working hours should not be more than 480min. I would like the sum of the demands + the sum of the travel distance for a vehicle be less than 480min. So the the sum of demands + the sum of the distances must be lower than the vecile capacity.
Could you please help me?
Thanks,
Erik