1

I have a model in ILOG CPLEX written in OPL. I want to run all the semantic checks (in particular all the assert statements). I do not want to produce any output files or solve the model.

Judging by the summary of the execution process explained in the doc, I would want to only execute stages 1-3.

Is there a way to do this from the IDE? Or does it need an *.ops file or scripting with OPL script in a main block?

HTC
  • 107
  • 1
  • 4

1 Answers1

0

in documentation you should have a look at Browse in

IDE and OPL > CPLEX Studio IDE > IDE Reference > The Graphical User Interface > Menu commands and equivalent toolbar buttons

This action is available in the IDE and what it does:

"Builds or rebuilds the model tree of the data structures defined in the active model or project to allow browsing the project in the Problem browser without solving it.

You can click the arrow next to the button and select the file to browse from the contextual menu."

If you prefer to use flow control and scripting and your model is only preprocessing, constraints and postprocessing you can add

main
{
  thisOplModel.generate();
  writeln("ok");
}

which won't call solve

Alex Fleischer
  • 9,276
  • 2
  • 12
  • 15
  • For future reference: the documentation for CPLEX 12.10 (current version) explains the command __Browse__ [here](https://www.ibm.com/support/knowledgecenter/SSSA5P_12.10.0/ilog.odms.ide.help/OPL_Studio/refoplide/topics/opl_gui_menu_run.html). – HTC Feb 24 '20 at 07:55