User Tools

Site Tools


How to obtain Cplex

CPLEX Optimization Studio is now available for students, in addition to teachers, researchers and university staff. In order to download it, please follow the link:

Then select the tab <Student> or <Faculty/staff> for professors, research and university staff.

CPLEX Tutorial

This is a home made tutorial for CPLEX (in PDF format) to learn how to implement a mathematical model with CPLEX in C++.


And here are some examples from the CPLEX distribution used in the tutorial to illustrate some concepts:


CPLEX Parameters

Since version 11 of CPLEX, Solver tends to use all processors (CPU, cores, hyperthreads) when it's called. It is then VERY IMPORTANT to specify to CPLEX to use sequential mode in order to avoid interfering with the other programs running on the machine via SUNGRID.

Here are some examples of what should be done to avoid your jobs to be stopped, cause they consume machine ressources

C++ / Concert

cplex.setParam(IloCplex::Threads, 1);


CPXsetintparam(env, CPX_PARAM_THREADS, 1);


execute PARAMS {
  cplex.threads = 1;

Cplex interactif

set threads 1


  % Initialize the CPLEX object
  cplex = Cplex('lpex1');
  % set maximum number of threads
  cplex.Param.threads.Cur = 1;

In all cases you should put your instruction before starting the program to insure that your job is run in sequential mode.


option cplex_options 'threads=1';


In order to use CPLEX with Python, you need to install the module in your account.

module load cplex-studio

mkdir -p /tmp/Your_username

cp -r /home/ibm/cplex-studio/ /tmp/Your_username

cd /tmp/Your_username/x86-64_linux

python install --user
en/programmation-cplex.txt · Last modified: 2020/03/23 16:47 by admin