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: