I am trying to solve a capacitated multi vehicle problem using Jsprit with the capacity expressed as total time from departure to return...including transit. Im finding that while service can have capacity dimensions, transit is only expressed in distance and time, but never has a Size in terms of Capacity dimensions, and therefore is never compared to the capacity constraint. I end up assigning too much service and any transit time is in excess of capacity.
Ive tried several approaches using StateUpdater, such as dynamically adding a Break with the updated route's transit time as the "Size", and trying to dynamically update the Vehicle's capacity...neither of which work for different reasons.
Is there any way to enforce such a constraint that I am missing? The only approach I can come up with that works is less than perfect. That is to use the transit cost matrix to find minimum required transit and remove it from the vehicle's capacity ahead of time. Any ideas would be greatly appreciated.