Reputation: 100
I'm modeling a problem where the "vehicle go back to depot" constraint depends on each Customer Delivery.
For example, I will delivery something to customer A and he will sign an paper, this paper needs to return to the depot. I will delivery something to another customer B, and on this delivery the vehicle doesn't have to return to depot. If the customer A and customer B are near, and respect the time window, it could be delivered together.
There is a simple way to do this? Thanks in advance.
Upvotes: 0
Views: 211
Reputation: 27312
The default model doesn't need to alter much for this.
The getDistanceToPrevious method is basically what is is now for B, for A it is the distance to the depot + the distance from the depot to A.
Upvotes: 1