Dynamic Capacity for delivering items from depot with limited number of vehicle

Hello,

I’m trying to implement this feature where first Vehicle (for e.g. only 1 vehicle) is picking up from depot with maximum capacity and then delivering all its items to given delivery location. And if the vehicle got empty without completing the all delivery orders then it will go back to depot to refill it and then complete the remaining delivery locations… so on.

For better understanding,
Number of Vehicle: 1
Vehicle capacity: 100 (1 for each)

Jobs - Demands for different delivery location:

40
30
25
55
70
20
10
35
45
30

Now first vehicle will start at depot and pickup with its full capacity (100) then start delivering the items until its empty then again for the remaining delivery location it will go back to depot for refilling then will do the same process until all the demands fulfilled.

I tried with this into Jsprit until it vehicle got empty but after that how to make them return back to depot for refilling and then again leave completed delivered jobs and start delivering the remaining location until all got completed. It would be great help if someone can approach this problem using Jspirt.

Thanks,
Rishabh