I am working on a VRP optimization problem. It includes capacity, pickup delivery, and time window constraints. I also want to minimize no of vehicles used for the tour. The sample problem set is -
[A -> B] [B -> C] [C -> B] [D -> E]
As I have the same node for both pickup and delivery, I duplicated the node and made it like this -
[A -> B1] [B2 -> C1] [C2 -> B3] [D -> E],
where B1, B2, and B3 are duplications of B.C1 and C2 are duplications of C.
I could solve the problem with an arbitrary start point without any issue. I want to solve this problem with fixed starting and endpoints. Each vehicle will start from a point and come back to the same point. For example, the start point is B. To solve this problem, I duplicated B2 and created B0. Now the list of points looks like this -
[A -> B1] (B0) [B2 -> C1] [C2 -> B3] [D -> E]
* Pickup and deliveries - [A -> B1] [B2 -> C1] [C2 -> B3] [D -> E]
* B0 is my start and end point
The distance from B0 to B2 is zero.
I created distance and duration matrices with this sequence of points. My program works. But the problem is it starts with B0 but revisits B2 later, which I don't want. I want to force B2 to be visited immediately after starting from B0 so that I can later manually merge duplicate points in sequence. My question is how can I force VRP to force visit this point first? Or, any other suggestion to tackle this situation?