Search code examples
cplexopl

How to execute Cplex Run Configuration without IDE


I don't know if this is possible or not, but I would like to execute a run configuration of my Cplex project without opening the project in the Cplex IDE and running it from there.

Can I somehow double click something that runs the configuration or maybe a batch file with command line that executes the run configuration?

Any help / ideas will be appreciated.


Solution

  • To execute OPL projects from the command line you can use oplrun. The most basic usage is as follows:

    oplrun [options] "model-file" "[data-file ...]"
    

    To execute a specific run configuration in a project, follow this syntax:

    oplrun [options] -p project-dir [run-configuration]
    

    To find out more, see the documentation for run configurations and the oplrun command line options. In particular, see the -ph option which:

    Displays the run configurations available in the specified project. This is most useful on Unix platforms, where one cannot view this information in the CPLEX Studio IDE.

    If you don't know what the names of your run configurations are, try running with the -ph option to get a listing.