3l-cvrp-classifier-work
Working Repository where i can do whatever i want to implement the classifier
Science Score: 57.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 10 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.9%) to scientific vocabulary
Repository
Working Repository where i can do whatever i want to implement the classifier
Basic Info
- Host: GitHub
- Owner: MxHbm
- Language: C++
- Default Branch: main
- Size: 76.9 MB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Vehicle routing problems with three-dimensional loading constraints
This repo is part of the manuscript A branch-and-cut algorithm for vehicle routing problems with three-dimensional loading constraints, which is currently under review.
The repo contains the instances, solutions, the source code of the algorithm, and a visualizer for the solutions and solver statistics.
Abstract
This paper presents a new branch-and-cut algorithm based on infeasible path elimination for the three-dimensional loading capacitated vehicle routing problem (3L-CVRP) with different loading problem variants. We show that a previously infeasible route can become feasible by adding a new customer if support constraints are enabled in the loading subproblem and call this the incremental feasibility property. Consequently, different infeasible path definitions apply to different 3L-CVRP variants and we introduce several variant-depending lifting steps to strengthen infeasible path inequalities. The loading subproblem is solved exactly using a flexible constraint programming model to determine the feasibility or infeasibility of a route. An extreme point-based packing heuristic is implemented to reduce time-consuming calls to the exact loading algorithm. Furthermore, we integrate a start solution procedure and periodically combine memoized feasible routes in a set-partitioning-based heuristic to generate new upper bounds. A comprehensive computational study, employing well-known benchmark instances, showcases the significant performance improvements achieved through the algorithmic enhancements. Consequently, we not only prove the optimality of many best-known heuristic solutions for the first time but also introduce new optimal and best solutions for a large number of instances.
Instances
Instances are the classical 3L-CVRP instances introduced in Gendreau et al. (2006). We use only instances with at most 50 customer nodes.
.
/data/input/3l-cvrp/
parameters/
E016-03m.json
E016-05m.json
...
E051-05e.json
In addition, we provide the parameter files used in the benchmark tests.
Solutions
Gendreau et al. (2006) consider different constraints in the container loading subproblem and introduce the following five variants.
| Variant | Constraints | ||||
|---|---|---|---|---|---|
| no-overlap | rotation | support | fragility | lifo | |
| all-constraints | x | x | x | x | x |
| no-fragility | x | x | x | x | |
| no-lifo | x | x | x | x | |
| no-support | x | x | x | x | |
| loading-only | x | x | |||
We provide solutions for all variants. In addition, we provide solutions for the one-dimensional approximation (CVRP) of the 3L-CVRP using weight and volume as capacities and solutions for variant all constraints applying a basic variant of the branch-and-cut algorithm (all-constraints-basic).
.
/data/output/3l-cvrp/
variant/
name/run-0/
solution-validator/ # files for solution validator
instance-name.txt
solution-name.txt
name.LOG # Gurobi log-file
solution-name.json
solution-statistics-name.json
Branch-and-cut algorithm
The source code of the branch-and-cut algorithm is located in subdirectory cpp/3L-VehicleRouting. We use CMake (version 3.18 or newer) as cross-platform build system generator.
[!NOTE] The loading subproblem is solved exactly using the CP-SAT solver from Google OR-Tools to determine the feasibility or infeassibility of a route. The extreme-point based packing heuristic is not part of the source code.
External code
- A-MDVRP and paper for separation of cuts
- CVRPSEP for separation of cuts
- CLI11 for command line parsing
- nlohmann for json serialization
Setup General
Requirements
- Gurobi 10.0.3 or newer
- Google or-tools 9.8 or newer
- boost 1.79 or newer
The libraries as prerequisites must be installed locally on the machine. The installation paths must be transferred. See for example settings.json
Linux
Clone the repo.
git clone https://github.com/felicze/3l-cvrp.git
Install boost 1.79 or newer.
Install tbb.
Download or-tools 9.8 or newer and gurobi 10.0.3 or newer and extract to /opt:
sudo tar -xvzf or-tools_amd64_ubuntu-22.04_cpp_v9.8.3296.tar.gz -C /opt
sudo tar -xvzf gurobi10.0.3_linux64.tar.gz -C /opt
Rebuild Gurobi for full compatibility with different compilers.
If necessary, adjust the or-tools and Gurobi paths in .vscode/settings.json.
Configure and build the project (tested on GCC 12.3.0 or newer and Clang 16.0.6 or newer).
Windows
Clone the repo.
git clone https://github.com/felicze/3l-cvrp.git
Install boost 1.79 or newer.
Download or-tools 9.8 or newer and gurobi 10.0.3 or newer.
If necessary, adjust the or-tools and Gurobi paths in .vscode/settings.json.
Configure and build the project (tested on MSVC 17.12.12).
Run the algorithm
To run the code, you must specify four command-line arguments (see .vscode/launch.json):
- -i: input directory
- -f: input file
- -o: output directory
- -p: parameter file
You can run the code:
- From your editor:
Provide the command-line arguments in the editor's configuration (e.g., in
.vscode/launch.json). - From the command line:
Navigate to the root directory of the repository and run, for example:
build/Release/bin/3L-VehicleRoutingApplication -i data/input/3l-cvrp/ -f E023-03g.json -o data/output/3l-cvrp/test/ -p data/input/3l-cvrp/parameters/BenchmarkParameters_AllConstraints.json
Visualizer
This visualizer is a python app using Streamlit. We only provide a visualization of solutions and some solver statistics. The app cannot be used to check the feasibility of solutions. If you want to do this, we refer to the paper by Krebs & Ehmke (2023) and the accompanying solution validator and visualizer.
[!NOTE]
It should be noted that items can hover in our solutions if support constraints are disabled as the supported area can be zero. This is prohibited in Krebs & Ehmke (2023). Thus, our solutions for variants no-support and loading-only might be infeasible using the solution validator. However, in the case of the loading-only variant, all floating items could be lowered enough to touch an underlying object, resulting in a feasible solution. This is not possible for the no-support variant due to the fragility constraint.
Requirements
- Python version >= 3.10 and < 3.13
- Poetry version 2.0.0 or higher, see official documentation
Run visualizer locally
- Clone repository
- Go to subdirectory python
- Install dependencies with
poetry install or pip install -r requirements.txt
- Activate virtual environment if necessary
- Run streamlit web app locally with
streamlit run visualization/SolutionVisualizer.py
Solutions
Select a solution file from the output directory, e.g, data/output/3l-cvrp/all-constraints/e023-03g/run-0/solution-E023-03g.json.

Solver information
Select a solution statistics file from the output directory, e.g., data/output/3l-cvrp/all-constraints/e023-03g/run-0/solution-statistics-E023-03g.json.
"# 3l-cvrp-classifier-work"
"# 3l-cvrp-classifier-work"
Owner
- Name: maxhubmann
- Login: MxHbm
- Kind: user
- Repositories: 1
- Profile: https://github.com/MxHbm
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: 3L-CVRP
message: >-
If you use this software or data set, please cite it using
the metadata from this file.
type: software
authors:
- given-names: Felix
family-names: Tamke
email: felix.tamke@tu-dresden.de
affiliation: 'TU Dresden, Clover Optimization'
orcid: 'https://orcid.org/0000-0003-1650-8936'
- given-names: Leopold
family-names: Kuttner
email: leopold.kuttner@tu-dresden.de
affiliation: 'TU Dresden, Clover Optimization'
orcid: 'https://orcid.org/0000-0002-9359-8835'
- given-names: Florian
family-names: Linß
email: florian.linss@tu-dresden.de
affiliation: TU Dresden
orcid: 'https://orcid.org/0000-0002-5869-0425'
repository-code: 'https://github.com/felicze/3l-cvrp'
abstract: >-
This repository provides instances, solutions, a simple
visualizer based on streamlit, and source code for a
branch-and-cut algorithm for vehicle routing problems with
three-dimensional loading constraints.
version: '0.1'
date-released: '2024-02-09'
GitHub Events
Total
- Watch event: 2
- Push event: 30
- Create event: 2
Last Year
- Watch event: 2
- Push event: 30
- Create event: 2
Dependencies
- altair 5.2.0
- attrs 23.2.0
- blinker 1.7.0
- cachetools 5.3.2
- certifi 2024.2.2
- charset-normalizer 3.3.2
- click 8.1.7
- colorama 0.4.6
- colorcet 3.0.1
- colorlog 6.8.2
- colormap 1.0.6
- contourpy 1.2.0
- cycler 0.12.1
- easydev 0.12.1
- fonttools 4.48.1
- gitdb 4.0.11
- gitpython 3.1.41
- idna 3.6
- importlib-metadata 7.0.1
- jinja2 3.1.3
- jsonschema 4.21.1
- jsonschema-specifications 2023.12.1
- kiwisolver 1.4.5
- markdown-it-py 3.0.0
- markupsafe 2.1.5
- matplotlib 3.8.2
- mdurl 0.1.2
- networkx 3.2.1
- numpy 1.26.4
- packaging 23.2
- pandas 2.2.0
- param 2.0.2
- pexpect 4.9.0
- pillow 10.2.0
- plotly 5.18.0
- protobuf 4.25.2
- ptyprocess 0.7.0
- pyarrow 15.0.0
- pyct 0.5.0
- pydeck 0.8.0
- pygments 2.17.2
- pyparsing 3.1.1
- python-dateutil 2.8.2
- pytz 2024.1
- referencing 0.33.0
- requests 2.31.0
- rich 13.7.0
- rpds-py 0.17.1
- seaborn 0.13.2
- setuptools 69.1.0
- six 1.16.0
- smmap 5.0.1
- streamlit 1.31.0
- tenacity 8.2.3
- toml 0.10.2
- toolz 0.12.1
- tornado 6.4
- typing-extensions 4.9.0
- tzdata 2023.4
- tzlocal 5.2
- urllib3 2.2.0
- validators 0.22.0
- watchdog 4.0.0
- zipp 3.17.0
- colorcet ^3.0.1
- colormap ^1.0.6
- networkx ^3.2.1
- numpy ^1.26.4
- pandas ^2.2.0
- plotly ^5.18.0
- pydeck ^0.8.0
- python >=3.10,<3.13
- seaborn ^0.13.2
- setuptools ^69.1.0
- streamlit ^1.31.0
- altair ==5.2.0
- attrs ==23.2.0
- blinker ==1.7.0
- cachetools ==5.3.2
- certifi ==2024.2.2
- charset-normalizer ==3.3.2
- click ==8.1.7
- colorama ==0.4.6
- colorcet ==3.0.1
- colorlog ==6.8.2
- colormap ==1.0.6
- contourpy ==1.2.0
- cycler ==0.12.1
- easydev ==0.12.1
- fonttools ==4.48.1
- gitdb ==4.0.11
- gitpython ==3.1.41
- idna ==3.6
- importlib-metadata ==7.0.1
- jinja2 ==3.1.3
- jsonschema ==4.21.1
- jsonschema-specifications ==2023.12.1
- kiwisolver ==1.4.5
- markdown-it-py ==3.0.0
- markupsafe ==2.1.5
- matplotlib ==3.8.2
- mdurl ==0.1.2
- networkx ==3.2.1
- numpy ==1.26.4
- packaging ==23.2
- pandas ==2.2.0
- param ==2.0.2
- pexpect ==4.9.0
- pillow ==10.2.0
- plotly ==5.18.0
- protobuf ==4.25.2
- ptyprocess ==0.7.0
- pyarrow ==15.0.0
- pyct ==0.5.0
- pydeck ==0.8.0
- pygments ==2.17.2
- pyparsing ==3.1.1
- python-dateutil ==2.8.2
- pytz ==2024.1
- referencing ==0.33.0
- requests ==2.31.0
- rich ==13.7.0
- rpds-py ==0.17.1
- seaborn ==0.13.2
- setuptools ==69.1.0
- six ==1.16.0
- smmap ==5.0.1
- streamlit ==1.31.0
- tenacity ==8.2.3
- toml ==0.10.2
- toolz ==0.12.1
- tornado ==6.4
- typing-extensions ==4.9.0
- tzdata ==2023.4
- tzlocal ==5.2
- urllib3 ==2.2.0
- validators ==0.22.0
- watchdog ==4.0.0
- zipp ==3.17.0