mdvrptw
A python implementation of an algorithm to solve the MDVRPTW, a NP-hard combinatorial problem.
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in README -
✓Academic publication links
Links to: springer.com -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.2%) to scientific vocabulary
Repository
A python implementation of an algorithm to solve the MDVRPTW, a NP-hard combinatorial problem.
Basic Info
Statistics
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 1
Metadata Files
README.md
MDVRPTW
Let's solve the MDVRPTW!
This is an algorithm that seeks to solve the MDVRPTW.
The GRASP version of this project for the MDVRP was published on Computational Science and Its Applications – ICCSA 2022: 22nd International Conference, Malaga, Spain, July 4–7, 2022.
Table of Contents
About The Project
The Vehicle Routing Problem (VRP) is a known hard-to-solve combinatorial problem (NP-hard). In this project, we seek to solve the Multi Depot Vehicle Routing Problem with Time Windows (MDVRPTW).
We adopt the cluster-first route-second approach. For this, the customers are clustered considering each depot as the cluster center (each depot creates a cluster). Then the construction process is applied to generate solutions.
Currently, we use a randomized version of the Solomon I1 Insertion Heuristic as the constructive algorithm. The random decisions are administrated by the GRASP metaheuristic. After the construction process, a set of local search methods are applied. The local search can be intra-depot and inter-depot. The former considers each cluster as a complete problem and the latter considers all clusters to improve the solution. In this project, we consider both intra-depot and inter-depot local search methods.
The GRASP version of the project was published on Computational Science and Its Applications – ICCSA 2022: 22nd International Conference, Malaga, Spain, July 4–7, 2022. Full article.
We also aim to develop an Ant Colony Optimization algorithm, instead of GRASP, to solve the problem. Which is in progress...
For now, you can use the GRASP version.
If you use this code, please cite our article.
Clustering Methods
A set of clustering methods are utilized. * [K-Means] * [Urgencies] Giosa et al. [2]
Getting Started
First, you need an MDVRPTW problem instance, which you can get on VRP Libraries. We will list some libraries in which you can get them. We have the "instances" folder with Cordeuat and Vidal MDVRPTW instances, mostly for backup purposes but You can use them too!
You can also make your instance, but it needs to follow Cordeaut standards.
Prerequisites
Python 3.6 or higher is required.
Installation
- Get the dependencies
sh python -m pip install -r requirements.txt - Run the project
sh python main.py <FLAGS>
Flags description
Here we describe the algorithm parameters.
```bash main.py: (obrigatory) --instance: path to the MDVRPTW instance. (default: None)
(optional)
--cluster: the cluster method to use.
(default: 'kmeans')
(options: 'kmeans', 'urgencies')
```
- Example of usage:
python main.py --instance ./instances/cordeau-al-2001-mdvrptw/pr01.txt --cluster kmeans
Contact
Israel P. - israelpereira55@gmail.com
Project Link: https://github.com/israelpereira55/MDVRPTW
Acknowledgements
References
[1] Cordeau, Jean-François, Gilbert Laporte, and Anne Mercier. "A unified tabu search heuristic for vehicle routing problems with time windows." Journal of the Operational research society 52.8 (2001): 928-936.
[2] Giosa, I. D., I. L. Tansini, and I. O. Viera. "New assignment algorithms for the multi-depot vehicle routing problem." Journal of the operational research society 53.9 (2002): 977-984.
Owner
- Name: Israel P.
- Login: israelpereira55
- Kind: user
- Location: Brazil
- Company: Federal University of Espírito Santo, Brazil
- Repositories: 1
- Profile: https://github.com/israelpereira55
PhD student at UFES. My interests involves optimization, vehicle routing problem, metaheuristics, computer vision, and machine learning.
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Souza" given-names: "Israel" orcid: "https://orcid.org/0000-0002-3745-5530" title: "israelpereira55/MDVRPTW: RGRASP+VND v0.1" version: v0.1 doi: 10.5281/zenodo.11128366 date-released: 2024-05-07 url: "https://github.com/israelpereira55/MDVRPTW"
GitHub Events
Total
- Watch event: 2
- Push event: 1
Last Year
- Watch event: 2
- Push event: 1
Dependencies
- absl-py >=0.9.0
- matplotlib *
- scikit-learn >=0.24.2