Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/corail-research/learning-hk-bound
https://github.com/corail-research/learning-hk-bound
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/corail-research/learning-hk-bound
- Owner: corail-research
- License: mit
- Created: 2023-08-07T18:47:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-06T05:37:11.000Z (about 1 year ago)
- Last Synced: 2024-06-22T09:21:02.402Z (7 months ago)
- Language: C++
- Size: 730 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Content of the repository
This repository provides a training algorithm for Lagrangian multipliers generation for the Held-Karp TSP relaxation, and an associated branch-and-bound TSP solver.
```bash
.
├── conda_env.yml # configuration file for the conda environment
└── solver/
├── src/ # solver source code
├── models/ # GNN models
├── testGraphs/ # test instances
├── loadNN.py # GNN loading and calling functions
├── run_tsp.sh # to run the solver
├── run_test.sh
├── makefile # to compile the solver
└── training/
├── src/ # solver source code
├── trained_models/ # trained GNN models
├── training_graphs/ # training instances
├── trainHKgnn.py # GNN loading and calling functions
├── run_training.sh # to run the training
```## Installation instructions
### 1. Importing the repository
```shell
git clone https://github.com/corail-research/learning-hk-bound.git
```### 2. Setting up the conda virtual environment
```shell
conda env create -f environment.yml
```### 3. Compiling the solver
A makefile is available in the solver and trainer. First, add your python path. Then, you can compile the project as follows:
```shell
cd ./training
make
cd ../solver
make
```## Basic use
### 1. Training a model
Edit the configuration in training/trainHKgnn, then you can start the training as follows:
```shell
cd ./training
./run_training.sh
```### 2. Solving instances
```shell
cd ../solver
./run_test.sh
```## Technologies and tools used
* The TSP solver is implemented in C++ and is based on the [solver](https://hal.science/hal-01344070/document) of Pascal Benchimol.
* The code handling the training and the GNN inferences is implemented in Python3.
* The graph neural network architecture has been implemented in Pytorch together with DGL.