Snippet:CPlex on Hypatia

From HUES Platform Wiki
Description CPlex is installed as a module. Add the following to .bash_profile:

module load CPLEXStudio/12.6.0.0

It can be used to run .mps files (exported from AIMMS), with solutions saved to a .sol file. CPlex requires a script (below, saved to a file called cplex_script) that contains the commands to be run.

This script is executed by passing it as an input to CPlex: ./cplex < cplex_script

Author(s) Ralph Evins
Language Bash
Tags Hypatia
Snippet code read /mnt/project/usr/your_file.mps

read /mnt/project/usr/cplex_settings.prm optimize write /mnt/project/usr/your_file.sol quit

Notes The file cplex_settings.prm contains any non-default CPlex parameters that you want to use, e.g. to set optimality gap to 5%:

CPLEX Parameter File Version 12.6 CPX_PARAM_EPGAP 0.05

See http://pic.dhe.ibm.com/infocenter/cosinfoc/v12r2/index.jsp?topic=%2Filog.odms.cplex.help%2FContent%2FOptimization%2FDocumentation%2FCPLEX%2F_pubskel%2FCPLEX934.html