A while back, I had announced the creation of a Vehicle Routing Problem solver to manage delivery operations with ERPNext, and to this day, it has served us very well for the last 3 months in production and allowed us to expand our operations to different cities with relative ease.
During that work, we heavily hacked on the Vehicle doctype in order to amend it with the metadata and constraints necessary for the solver to find optimal global delivery paths.
It quickly became apparent how the Vehicle doctype has stayed in its initial conception as an accounting- & inventory-oriented doctype to manage the static aspects of a fleet. It became clear that the dynamic perspective that comes with a VRP solver requires a different angle.
Based on this experience, I had started to amend the docytpe in an improvement PR and would be happy to continue this work in order to open up the possibility of — maybe one day — publishing a VRP suite to the ecosystem.
I’d be grateful for any feedback and help to push this to completion!
The VRP has provided us with a valuable opportunity to optimize our in-house logistics, and we are now leveraging its capabilities to extend our operations. Here’s a breakdown of how this tool functions:
Bulk Action Creation: From the delivery notes list, a bulk action allows the creation of a new VRP document, incorporating the selected delivery notes.
Configuration Steps:
Specify the “depot address”, define the time lapse, and set the “objectives” that the VRP calculation should consider.
Choose all “available” vehicles suitable for the routing.
Routing Calculation:
Upon selecting “save”, the tool computes the routing, displaying it on a map.
It generates a delivery trip for each route and assigns the corresponding delivery notes.
Moreover, successful implementation of the VRP necessitates advance configuration in the following areas:
Vehicles: In our business case, vehicles are assigned to specific delivery zones.
Vehicle Types: Assigning vehicle capacities (loading capacity) and vehicle capabilities (e.g., ability to navigate slopes) is crucial.
Drivers: Ensuring that drivers are appropriately configured and available for assigned routes.
For a visual representation, here’s an example of a VRP document in the “solved” status: