This repository provides implemented codes for the paper, NeuralSEP.
A Neural Separation Algorithm for the Rounded Capacity Inequalities
Clone project and create an environment with conda:
conda create -n neuralsep python=3.8
conda activate neuralsep
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
pip install -r requirements.txt
Note
- If you use the different cuda version, please modify the URL for
torch-scatter
inrequirements.txt
before running it; see here. - If you have any trouble with
dgl
, please refer here. - To run cutting plane embedded NeuralSEP, other installations are required.
python train_coarsening_model.py
Training data can be downloaded here.
cd src/jl
julia experiment_with_random_instances.jl
- To run the autoregressive model, the function
learned_rounded_capacity_cuts
insrc/jl/cvrp_cutting.jl
needs to be modified. - You can change pre-trained model directories in
julia_main.py
for each model.
- Julia >= 1.8.3
- JuMP
- Gurobi
- CPLEX
- TSPLIB
- CVRPLIB
- CVRPSEP
- Graphs
- PyCall
- Pickle
Note: to use the created python env, activate the env and re-configure PyCall when installing PyCall in julia.
using Pkg
ENV["PYTHON"] = Sys.which("python")
ENV["PYCALL_JL_RUNTIME_PYTHON"] = Sys.which("python")
Pkg.add("PyCall")
Pkg.build("PyCall")
A license is required (the student license is free).
A license is required (the student license is free).