Multiple packages with same source and destination

I have packages to be picked up from various sources and need to deliver them at couple of destinations. When I run the algorithm, multiple vehicles are picking up packages from the same source which need to be delivered at same destination. Number of packages from one source can be more than the vehicle capacity to bundle all of those packages with size dimension. Is there any way to make a vehicle pickup all the packages from a source, which need to be delivered at the same destination, if the vehicle capacity permits.

Please help


Did you set a Distance cost ?

It will be more interesting to perform this trip with only one vehicle if its more expensive with two or more.

Hi. Thanks for your response.

I have set Distance cost. The number of packages at one source can sometimes be more than capacity of a vehicle and there are multiple sources and couple of destinations. So, I need to run this with multiple vehicles. But, multiple vehicles are going to the same source to pick up packages even though all the packages can be accomodated in a single vehicle. is there any way to force a vehicle to pickup all packages from one source location, if it can accommodate


There are various ways. One way might be to assign them to certain vehicles in advance, e.g. by using skills. You can also specify hard constraints such that if one shipment of this same-source-cluster has already been assigned to a certain vehicle, all other shipments need to be assigned to this vehicle as well. However, depending on the destinations of these shipments the solution might be worse than what you get if multiple vehicles are allowed to pick from the same source.

Thanks Stefan. Will try this