How to use cplex in IDUN

cplex

The cplex installation and file

  1. download the ‘IBM ILOG CPLEX Optimization Studio Linux’
    -https://www.ibm.com/academic/topic/data-science

    • find the ‘IBM ILOG CPLEX Optimization Studio ‘ click
      img.png
    • find IBM ILOG CPLEX Optimization Studio for linux and download it.
      img_1.png
  2. Install xxxx.bin file to net drive.

    • using the chmod command from the directory where the .bin is located: ‘chmod +x cplex_studioXXX.linux-x86-64.bin’
    • Enter the following command to start the installation process: ‘./cplex_studioXXX.linux-x86-64.bin’
  3. Then the process should pop up. But there is some necessary steps need to be done:

    • Default install folder need an absolute directory: which in idun is : /cluster/home//opt/ibm/ILOG/CPLEX_Studio2211
    • Then, install cplex python file to the python dir
    • The setup.py located at opt\ibm\ILOG\CPLEX_Studio2211\python
    • install it ‘python setup.py install’
    • (Optional. add path to bash :export PYTHONPATH=”/home//.conda/envs/my_env/lib/python3.8/site-packages:$PYTHONPATH”)
  4. if it still doesn’t work, change your opt.solverfactory(‘cplex’) to cplex_direct : opt=SolverFactory(‘cplex_direct’)