1

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.

rkersh
  • 4,447
  • 2
  • 22
  • 31
Shiasu-sama
  • 1,179
  • 2
  • 12
  • 39
  • https://www.ibm.com/support/knowledgecenter/SSSA5P_12.5.1/ilog.odms.ide.help/OPL_Studio/refoplrun/topics/oplrun_syntax_commandline.html That link seems helpful, but I don't know how it works exactly: '-p' in Command Line: Meaning: "project-dir: [run configuration]" Description: "Executes the run configuration of the project identified by its path. If you do not specify a run configuration, the default one is executed." – Shiasu-sama Jun 27 '18 at 11:07

1 Answers1

1

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.

rkersh
  • 4,447
  • 2
  • 22
  • 31
  • 1
    See also [this](https://stackoverflow.com/questions/44942964/how-to-change-cplex-parameters-in-oplrun) related question. – rkersh Jun 27 '18 at 20:33
  • If a client didn't have Cplex Studio IDE installed on their system. What's the least amount of necessary steps they'd have to take to make "oplrun" work for them? @rkersh – Shiasu-sama Jun 27 '18 at 21:53
  • 1
    Don't quote me on this, but I believe that the client would have to purchase a deployment edition license (which _should_ include `oplrun`). See [this](https://www.ibm.com/developerworks/community/forums/html/topic?id=99dcc201-f8c9-4fd7-a232-aab68df474ab) post from the official IBM developerWorks forum. – rkersh Jun 27 '18 at 23:17
  • Thanks for the help :) @rkersh – Shiasu-sama Jun 28 '18 at 08:42