Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jescresswell/route-optimization
Produces optimal routing for freight deliveries, accounting for multiple trucks working in tandem, and multiple dispatch depots.
https://github.com/jescresswell/route-optimization
Last synced: 9 days ago
JSON representation
Produces optimal routing for freight deliveries, accounting for multiple trucks working in tandem, and multiple dispatch depots.
- Host: GitHub
- URL: https://github.com/jescresswell/route-optimization
- Owner: jescresswell
- Created: 2019-02-22T16:15:22.000Z (almost 6 years ago)
- Default Branch: b1
- Last Pushed: 2019-02-22T19:39:10.000Z (almost 6 years ago)
- Last Synced: 2024-08-14T07:10:02.992Z (4 months ago)
- Language: Python
- Homepage:
- Size: 4.9 MB
- Stars: 8
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - jescresswell/route-optimization - Produces optimal routing for freight deliveries, accounting for multiple trucks working in tandem, and multiple dispatch depots. (Python)
README
# route-optimization
This repo solves the vehicle routing problem and was implemented for a large Canadian freight company. We take a manifest of deliveries to be made in a day and produce an set of individual manifests and routes for a fleet of trucks. The algorithms can account for vehicle capacities, and having multiple truck depots to dispatch from. Our optimized solution represented a 5% decrease of travel distance on average compared to previous practice at the company, amounting to significant fuel savings.
First we clean the manifest data, a list of deliveries to be made, in the geocodepandas.py file. This fills in missing latitude/longitude data for the delivery locations by geocoding addresses. Then we use GraphHopper to create a distance matrix, an array of distances between each pair of locations in the manifest. Finally, we use the distance matrix to solve the route optimization problem in tsp.py.
Conventions - Address file should start with depot first (starting/ending point for travelling salesman problem (TSP)).
Geocoded file should be in CSV format with (lat/long/address) with the first row being the header "Latitude,Longitude,Address".
Distance matrix file is in CSV format with row/column indices matching that of geocoded file (row=origin, column=destination).
Dependencies: GraphHopper folder assumed to be in same location as dmatrix.jar, with subfolder north-america_canada_ontario-gh containing open source map data from Open Street Maps.
Usage: java -jar dmatrix.jar manifest.csv
produces dmatrix.csv