Installing Concorde with CPLEX
Install Concorde with CPLEX
This tutorial will guide you through the process of building together CPLEX and Concorde. It merges together information from the here and here, applyng minor changes.
Tested on the following system: - Ubuntu 20.04.2 LTS
If you test this instruction to other machines, write me an email and I will update the tutorial.
CPLEX
- Register for the CPLEX Academic Initiative here. Use your institutional email.
- Note: if you tried to register with a new institutional email, and you were already registered with an old one, you may need to clear your broswer cache and cookies.
- Go here and click on "Software", then choose "IBM ILOG CPLEX Optimization Studio".
- Click to "Download". It is possible that you have to click on it multiple times, otherwise you'll get an error.
- Search for "IBM ILOG CPLEX Optimization Studio 12.9 for Linux x86-64 Multilingual" (Image: CNZM2ML) and download it.
- Select it, scroll down, agree to the terms and conditions, and click "Download".
- Select a directory where to save the files and complete the download.
- Once the download is complete, go in the selected folder and run
chmod +x cplex_studio129.linux-x86-64.bin
sudo ./cplex_studio129.linux-x86-64.binThe sudo command is necessary to install the software in the default directory /opt/ibm/ILOG/CPLEX_Studio129/ (which I recommend). This tutorial assume that you have used this directory.
- Follow the instructions and install the software. This part should be pretty straightforward and will be not commented further.
Concorde
- Download Concorde from the Concorde website or by directly clicking here.
-
Extrct the files
gunzip co031219.tgz tar xvf co031219.tar -
In the file
concorde/Makefile.inchange the lineLIBFLAGS = @LIBS@into
LIBFLAGS = @LIBS@ -lpthread -
In the file
concorde/TSP/Makefile.inchange the lineLIBFLAGS = @LIBS@into
LIBFLAGS = @LIBS@ -lpthread -ldl -
Create a folder called
./concorde/cplexand copy in it the following files(This command assume that you have used the default installation directory for CPLEX)cp /opt/ibm/ILOG/CPLEX_Studio129/cplex/include/ilcplex/*h . cp /opt/ibm/ILOG/CPLEX_Studio129/cplex/lib/x86-64_linux/static_pic/libcplex.a . - Create a folder called
buildin the folderconcorde. -
In the folder
buildrunIt is important to use the full path for all the repositories.../configure --prefix=/full/path/concorde/build/ --with-cplex=/full/path/concorde/cplex/ -
Run
make It will fail, it's okay :) Now we have the file
concorde/build/concorde.hto work on. Inconcorde.huse "find and replace" of any text editor to change all*new)to*NEW)and all*class)to*CLASS)-
In
concorde/LP/lpcplex8.creplace#undef CC_CPLEX_DISPLAYWith
#undef CC_CPLEX_DISPLAY #ifndef CPX_PARAM_FASTMIP #define CPX_PARAM_FASTMIP 1017 #endif In
concorde/build/, renameconcorde.atolibconcorde.a-
In the folder
buildrun againmake -
In the folder
buildrun./TSP/concordeThis should work, printing the help message of Concorde.