Optimizing an urban meal delivery platform
Find a file
Alexander Hess 830f44e3cc
Some checks failed
CI / fast (without R) (push) Has been cancelled
CI / slow (with R) (push) Has been cancelled
Merge branch 'simulation-data' into develop
2021-09-16 13:21:42 +02:00
.github/workflows Add rpy2 to the dependencies 2021-01-11 16:06:58 +01:00
docs Remove pylint from the project 2021-01-09 17:47:45 +01:00
migrations Add ORM models for the simulation data 2021-09-16 11:58:55 +02:00
research Merge branch 'main' into develop 2021-09-13 11:37:37 +02:00
src/urban_meal_delivery Add ORM models for the simulation data 2021-09-16 11:58:55 +02:00
tests Add tests for the Order ORM model 2021-09-16 12:05:22 +02:00
.gitignore Ignore PyCharm's .idea/ folder 2021-09-12 16:51:10 +02:00
.gitmodules Move submodule with demand-forecasting paper into research folder 2020-12-14 16:21:12 +01:00
.pre-commit-config.yaml Adjust the branch reference fixer's logic 2020-09-30 12:16:00 +02:00
alembic.ini Add database migrations 2020-08-11 10:29:58 +02:00
LICENSE.txt Initial commit 2020-08-03 20:19:42 +02:00
noxfile.py There is no 'too complex function' 2021-09-15 14:51:56 +02:00
poetry.lock Upgrade sqlalchemy 2021-09-12 16:52:51 +02:00
pyproject.toml Merge branch 'release-0.4.0' into develop 2021-09-13 11:22:01 +02:00
README.md Merge branch 'main' into develop 2021-03-01 14:45:24 +01:00
setup.cfg Add ORM models for the simulation data 2021-09-16 11:58:55 +02:00

Urban Meal Delivery

This repository holds code analyzing the data of an undisclosed urban meal delivery platform (UDP) operating in France from January 2016 to January 2017. The goal is to optimize the platform's delivery process involving independent couriers.

Structure

The analysis is structured into the following stages that iteratively build on each other.

Data Cleaning

The UDP provided its raw data as a PostgreSQL dump. This notebook cleans the data extensively and maps them onto the ORM models defined in the urban-meal-delivery package that is developed in the src/ folder and contains all source code to drive the analyses.

Due to a non-disclosure agreement with the UDP, neither the raw nor the cleaned data are published as of now. However, previews of the data can be seen throughout the research/ folder.

Tactical Demand Forecasting

Before any optimizations of the UDP's operations are done, a demand forecasting system for tactical purposes is implemented. To achieve that, the cities first undergo a gridification step where each pickup location is assigned into a pixel on a "checker board"-like grid. The main part of the source code that implements that is in this file. Visualizations of the various grids can be found in the visualizations/ folder and in this notebook.

Then, demand is aggregated on a per-pixel level and different kinds of order time series are generated. The latter are the input to different kinds of forecasting *Models. They all have in common that they predict demand into the short-term future (e.g., one hour) and are thus used for tactical purposes, in particular predictive routing (cf., next section). The details of how this works can be found in the first academic paper published in the context of this research project and titled "Real-time Demand Forecasting for an Urban Delivery Platform" (cf., the repository with the LaTeX files). All demand forecasting related code is in the forecasts/ sub-package.

Predictive Routing

Shift & Capacity Planning

Installation & Contribution

To play with the code developed for the analyses, you can clone the project with git and install the contained urban-meal-delivery package and all its dependencies in a virtual environment with poetry:

git clone https://github.com/webartifex/urban-meal-delivery.git

and

poetry install --extras research

The --extras option is necessary as the non-develop dependencies are structured in the pyproject.toml file into dependencies related to only the urban-meal-delivery source code package and dependencies used to run the Jupyter environment with the analyses.

Contributions are welcome. Use the issues tab. The project is licensed under the MIT license.