I'm working on a complex VRP problem. I'm working on the generic case, but for you to understand better I've created a small instance....
Assume that there are 3 demand (D1-D2-D3) and 3 supply nodes (S1-S2-S3) all with its own time windows (WLOG in increasing order, so TW of D1 is earlier than TW of D2). Time windows are valid only when entering to a node. Each node should be visited at least once. There are 2 vehicles and they are parked in one of these 6 nodes (both cannot be at the same node at the same time). And there are no additional starting or ending depots. Starting point of the vehicle is where it is parked initially and in later routes it is on the node where it has visited last. The objective is minimizing the total distance travelled. You can assign random distances between nodes and random service times for each node. Each vehicle can do multiple visits.
Let's say initially vehicle-1 is in S2 and vehicle-2 is in D3. So a feasible solution can be vehicle-1 can do like route-1: S2-S1-D1-D2 and route-2: D2-S2-D3 and for vehicle-2 -> route-3: D3-S3... One crucial rule is before visiting a demand node in each route, the vehicle should visit a supply point, because vehicles are assumed to be empty initially and at the end of each route. Now here in route-1, the first visit from S2 to S1 is kind of forced and we should ignore S2's TW as it just leaving and we are obliged to obey only S1,D1,D2's TWs.
How can we model this as a MILP?