VRPy: Problem Infeasible but i'm sure the network is correct and the problem is solvable

59 Views Asked by At

I am using the VRPy python library to solve the vehicle routing problem. I have done some tests with it on my OSM road network using a depot (source/sink) location and about 25 delivery locations. These tests worked great. Now what I want to do is use two types of vehicles (electric vs diesel). In the VRP problem, these vehicles have different costs per segment of my network. For segments inside a zero emission zone, the costs for the diesel cars are multiplied by 1000 in order to make sure the VRP solver never sends diesel cars into the zero emission zone. The costs for routes outside the zone are the same for both types of trucks.

Therefore the edges in my networkx.DiGraph network look like this:

Given that points 1 and 2 are inside the zero emission zone and points 3 and 4 are outside of the zero emission zone.

Edge(1, 2, cost=[1, 1000]) Edge(2, 1, cost=[1, 1000]) ... Edge(3, 4, cost=[1, 1]) Edge(4, 3, cost=[1, 1])

There are roads between every point and every point in both directions and also between every point and the source/sink in both directions. So all combinations or routes are theoretically possible, however, the algorithm has to find a solution that does not use any of the 1000 cost edges. I have checked manually whether this is possible and, given the number of points, number of vehicles of each type and all other parameters, there are many solutions that don't use these 1000 cost edges. In other words, there are solutions that don't send diesel trucks into the zero emission zone.

BTW: The VRP Problem has around 700 edges, around 25 locations of which approximately half are in the zero emission zone. As is said I thoroughly checked whether the problem is solvable given the constraints like number of vehicles of both types and maximum number of stops per vehicle.

The VRP solver just keeps running infinitely and if I use the time limit parameter it just says: Problem Infeasible when the timer runs out.

In the picture you can see how the delivery could be done, using three electric trucks and 3 diesel trucks that can each do a maximum of 6 stops. However, the VRP solver does not this solution, or any other viable one for that matter. I feel like it somehow doesn't recognize the fact that there it should avoid the 1000 cost edges for diesel trucks.

(https://i.stack.imgur.com/IowmO.jpg)

0

There are 0 best solutions below