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:
https://ibm.onthehub.com/WebStore/ProductSearchOfferingList.aspx?srch=cplex+optimization+studio
Then select the tab <Student> or <Faculty/staff> for professors, research and university staff.
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:
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
cplex.setParam(IloCplex::Threads, 1);
CPXsetintparam(env, CPX_PARAM_THREADS, 1);
execute PARAMS { cplex.threads = 1; }
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/12.10.0.0/CPLEX_Studio/cplex/python/3.7/x86-64_linux /tmp/Your_username cd /tmp/Your_username/x86-64_linux python setup.py install --user