Firstly, I hope I'm asking this in the right place. I work for a large online retailer in UK. We ship approaching 2000 orders each day and are growing very quickly.
We currently use multiple delivery firms to handle all our deliveries. We're planning to launch our own fleet of delivery vans soon for deliveries local to our distribution centre.
When we launch our own delivery fleet, one of the first tasks for the computer systems behind it will be to decide which parcels should be delivered by us and which parcels we should outsource the delivery of to one of our delivery partners. Once that has been worked out, we can worry about which parcels go onto which vans and in which order they will be delivered (the Vehicle Routing Problem (VRP)).
I looking for some advice here on the first part of that (which parcels we deliver ourselves and which we outsource). I'm not looking for help with the VRP at the moment (we're intending to build a system upon OSRM and Optaplanner and are comfortable with how that will work), although if you know of a good solution to solve both problems in one go, that would be great.
I have considered some fairly obvious things to determine the orders we deliver ourselves:
- All deliveries within
x
miles radius of our distribution centre. - All deliveries within
x
minutes drive of our distribution centre. - All deliveries within
x
minutes drive of our distribution centre and then all deliveries withiny
minutes drive of any delivery we are going to. Recursively. With a maximum distance from our distribution centre (so we don't have a line of deliveries up the country and end up 500 miles away!) - As with number 3 but calculating
x
andy
based on the cost of us using a 3rd party to make the delivery on our behalf (i.e. we'd be happy to send one of our vans further for a heavier/larger parcel).
I'm going to give it some more thought, but there has to be a better way than any of those options above. Does anyone have an experience with this as I'm totally new to it? Is there a name for this problem? Much like the names of Traveling Salesman Problem (TSP) and Vehicle Routing Problem (VRP) which would aid my Googling? I'm sure there will be a way to use Optaplanner to come up with a good solution but I'm not sure how. Ideally we would factor into the decision process the cost of delivering the order with our cheapest delivery partner.
You can assume that we know the following for all parcels:
- Lat/long for each delivery point.
- The actual driving time and distance between any two delivery points (and/or our distribution centre).
- The cost of using a 3rd party to make each delivery.
We use linux based systems and love open source projects (and have contributed fixes/improvements back to many). We're up for using open or closed source applications to make our life easier, and even things that only run on Windows if we really need to. We'd also happily code the entire thing in-house. If you know if any good packages to look at then please do say.
Thank you for your help.