CPLEX¶
How to obtain Cplex¶
CPLEX Optimization Studio is available for students, in addition to teachers, researchers and university staff. In order to download it, please follow the link:
https://www.ibm.com/academic/home
on the CIRRELT/GERAD Linux computers, cplex is already available and can be accessed by loading the cplex-studio
module.
module load cplex-studio
Installation¶
For some programming languages, like python and julia, in addition to installing cplex, you need to add the modules specific to the language.
Here's a procedure to install cplex 22.1.1 with python 3.10. You need to adjust the instructions according to the versions that you use. for cplex, it's important that the version you install matches the version you load with module.
We recommend that you use a virtual environment for your peoject instead of using the --user
option.
CPLEX tutorial¶
Here's a 2 part tutorial to learn how to implement a mathematical model with CPLEX in C++.
You can refer to this reference document that covers the most important notions (classes and methods).
You can also refer to commented examples that come with the CPLEX installation. Those examples cover the notions learned in the reference document.
Cplex parameters¶
Since version 11, the solver will try to use all processors on the machine to solve the problem. It is therefore really important that you specifiy a limited number of processors so your solve doesn't interfere with other programs that could be running.
You can see in these tabs the parameter to change to use 1 processor.