This repository supports the research paper titled A Short-Term Predict-Then-Cluster Framework for Meal Delivery Services.
Authors: Jingyi Cheng and Shadi Sharif Azadeh*.
Institute: Transport and Planning, Delft University of Technology.
The manuscript is under review at Transportation Research Part A: Policy and Practice.
Micro-delivery services offer promising solutions for on-demand city logistics, but their success relies on efficient real-time delivery operations and fleet management.
On-demand meal delivery platforms seek to optimize real-time operations based on anticipatory insights into citywide demand distributions.
To address these needs, this study proposes a short-term predict-then-cluster framework for on-demand meal delivery services. The framework utilizes ensemble-learning methods for point and distributional forecasting with multivariate features, including lagged-dependent inputs to capture demand dynamics.
We introduce Constrained K-Means Clustering (CKMC) and Contiguity Constrained Hierarchical Clustering with Iterative Constraint Enforcement (CCHC-ICE) to generate dynamic clusters based on predicted demand and geographical proximity, tailored to user-defined operational constraints.
Evaluations of European and Taiwanese case studies demonstrate that the proposed methods outperform traditional time series approaches in both accuracy and computational efficiency. Clustering results demonstrate that the incorporation of distributional predictions effectively addresses demand uncertainties, improving the quality of operational insights. Additionally, a simulation study demonstrates the practical value of short-term demand predictions for proactive strategies, such as idle fleet rebalancing, significantly enhancing delivery efficiency.
By addressing demand uncertainties and operational constraints, our predict-then-cluster framework provides actionable insights for optimizing real-time operations. The approach is adaptable to other on-demand platform-based city logistics and passenger mobility services, promoting sustainable and efficient urban operations.
This repository contains the implementation of the Short-Term Predict-Then-Cluster Framework, which includes:
- Demand Prediction: Utilizes ensemble-learning methods for accurate point and distributional forecasting of short-term demand using multivariate features and lagged-dependent inputs.
- Dynamic Clustering:
- Constrained K-Means Clustering (CKMC): Generates clusters based on predicted demand and user-defined constraints.
- CCHC-ICE: Applies iterative constraint enforcement to form geographically contiguous clusters tailored to operational needs.
- Simulation Study: Demonstrates how short-term demand predictions can enhance real-time operations, such as idle fleet rebalancing, improving delivery efficiency and sustainability.
- Python (>=3.9) installed with dependencies listed in
requirements.txt
. - A GPU is recommended for computational efficiency.
- Clone the repository:
git clone https://github.com/yourusername/predict-then-cluster.git cd predict-then-cluster
- Install the required dependencies:
pip install -r requirements.txt
- Configure the settings in the
config/
directory as needed (e.g.,settings.yaml
).
- Train the demand prediction model:
python src/train_forecasting.py --config config/settings.yaml
- Perform dynamic clustering:
python src/clustering.py --config config/settings.yaml
- Run the simulation study:
python src/simulation.py --config config/settings.yaml
- Visualize results:
python scripts/visualize_results.py
project-root/
├── README.md # Project description and setup instructions
├── src/ # Source code for forecasting, clustering, and simulation
│ ├── train_forecasting.py
│ ├── clustering.py
│ ├── simulation.py
│ └── model/
├── tests/ # Test scripts
│ └── test_clustering.py
├── config/ # Configuration files
│ └── settings.yaml
├── docs/ # Documentation
│ └── framework_overview.md
├── data/ # Sample datasets
│ └── european_case_study.csv
├── images/ # Images for documentation
│ └── methodology.png
├── scripts/ # Utility scripts
│ └── visualize_results.py
├── .gitignore # Files to ignore
├── papers/ # Relevant publications
├── presentations/ # Slides and other presentations
This project is licensed under the MIT License - see the LICENSE file for details.