Coder Social home page Coder Social logo

amazon-lmrrc's Introduction

Amazon-LMRRC

The Amazon Last-Mile Routing Research Challenge focuses on the gap between theoretical route planning and real-life route execution that most optimization-based approaches are unable to bridge. This gap relies on several factors that are difficult to model explicitly, such as geography, infrastructure, and consumers drivers deliver to. The goal of the challenge is to bridge this gap by exploiting a dataset of 6,112 historical routes operated by experienced drivers.

How to download the data

You can use this code by simply cloning the repository. The dataset can be downloaded here, and once downloaded, the folder data must be located within the main directory of this repo.

Methodology

The proposed methodology has a two-level hierarchical structure. First, a zone (geographical region with multiple stops) sequence is found solving a Traveling Salesman Problem (TSP), then within each zone an open TSP (OTSP) is solved. The predicted route is the concatenation of the OTSP solutions. The learning process takes place in the definition of a cost matrix used in the TSP for the zone sequence. The matrix is a weighted combination of travel times and transition probabilities. The latter is based on the number of times we see a transition from a zone to another one in the train data.

Within each zone, an OTSP is solved including forcing the first node to be the last of the previous zone, and the last node to be close to the center of the next zone. This gives a sense of direction in the resolution of the problem.

We refer to our paper for a detailed description of the methodology.

How the code is structured

The code is divided into three parts:

  1. Model Build: historical routes are used to define a probability matrix for the zone TSP.
  2. Model Apply: the cost matrix is used to determine the zone sequence by formulating a TSP over the zones including the station, and when the zone sequence has been established the stop sequence within each zone is determined by means of a series of OTSPs.
  3. Model Score: performance metrics are provided.

The three main Python scripts: model_build.py, model_apply.py, and model_score.py require a Linux environment to be run. They must be run sequentially using the bash command in the Linux Terminal, e.g., bash model_build.sh.

Citation

Our software can be cited as:

@misc{IILMR,
author = "Ghosh, Mayukh and Mahes, Roshan and Maragno, Donato",
title = "Incorporating Intuition in Last-Mile Routing",
year = 2021,
url = "https://github.com/donato-maragno/Amazon-LMRRC"
}

Get in touch!

We welcome any questions or suggestions. Please submit an issue on GitHub, or reach us at [email protected], [email protected], and [email protected].

amazon-lmrrc's People

Contributors

donato-maragno avatar roshanmahes avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

sylezenwata

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.