Help

Distribute work evenly over your drivers

Suppose you have 50 deliveries and you hire four drivers to make those deliveries. Each driver is either paid for a certain number of hours or is paid for a certain number of jobs. In this case, you wouldn’t necessarily want one driver to get all 50 deliveries, even if this minimizes the total variable transport costs. You also wouldn’t necessarily want two drivers to get 25 deliveries each. In fact, you want to use all four of your drivers more or less equally.

The classical vehicle routing problem, which minimizes the number of drivers as well as the total variable costs, has now changed into a new problem. You are essentially saying: “Minimize my total costs, but please keep in mind that I have promised my drivers that they will have at least half a day’s work or will be allowed to make at least 10 deliveries.”

As we have learned from our customers, this is not some rare, niche problem, but a very common one. We already offer some possibilities to solve this problem, described in this blog post: Balance load among all vehicles.

We have now extended our toolbox a bit more: we’ve made it possible to specify a minimum number of orders for each driver. Let’s illustrate this with an example. I have taken the problem above and put our four drivers and 50 deliveries somewhere in Berlin. If I now minimize the number of drivers and the time it takes to process these 50 deliveries, I get the following picture:

As you can see, one driver gets all 50 deliveries and works them off in a beautiful round trip.
But if I now determine that each driver should get at least eight orders assigned ("min_jobs"=8), the following solution results:

As you can see, beautiful round trips are still created, but with the new constraint applied.

If a driver still has too many orders, you can limit the number of orders upwards. For this purpose, you have to specify the maximum number of jobs ("max_jobs"). Please note that, while the max number of jobs is a hard constraint, the minimum number of jobs is a soft one. This means that even if it is not possible to fulfill a minimum number of jobs, we will get as close as possible to the number specified.

If you’d like to learn a little bit more about how you can implement it, I recommend this article. The JSON counterpart for the above example can be found here (without min_jobs) and here.

And if you don’t have an account with us yet, feel free to register and get a free standard subscription for two weeks to try it out.

Have fun optimizing!