Giter Club home page Giter Club logo

route-optimization's Introduction

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

route-optimization's People

Stargazers

Kish avatar Siddharth Sharma avatar Meredith Boyd avatar Dennis Irorere avatar akakkyle avatar cahit Eyigünlü avatar Jimmy Briggs avatar  avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.