What happens when you execute a run configuration

Describes the internal execution process and provides details of each step.

When you trigger the execution of a run configuration, the IDE analyzes the model and checks it for syntactic errors, builds representations, solves the problem itself by finding values, and displays some results.

The internal process of execution

Once a project is open in the IDE, you execute it by right-clicking the run configuration you want to run and choosing Run > <run_configuration_name> from the menu in OPL Projects Navigator, as explained in the The Run options section of Introduction to the CPLEX Studio IDE

Before the IDE begins executing a run configuration, it compiles the OPL statements into an internal representation that is better suited for execution. An OPL statement must be correct before the IDE can execute it.

  • If the model contains errors displayed in the Problems tab, the IDE does not start the solving engine. You must correct any errors as indicated in Dealing with errors in Getting Started with the IDE before running the model. When you have corrected the errors, launch the run configuration again.

  • When the model syntax is correct, the IDE starts to execute the model.

Note:

Executing a run configuration automatically saves unsaved files.

When the IDE starts to execute the run configuration, you can use the Pause or Abort buttons in the execution toolbar to interrupt the run. See The execution toolbar for details.

The functions in the toolbar in Debug view are not available unless you launched the run in debugging mode using the Debug button Debug button.

Summary of the execution process

When CPLEX Studio executes a run configuration, it typically performs the following actions:

  1. analyzes the model

  2. checks for syntax and semantic errors in the model

  3. builds the tree representing the data structures of the model in the Problem Browser

  4. executes the model if it has no errors

  5. displays run status messages in the Status Bar and changes the status indicator (see The Status Bar for more information)

  6. updates the tabs of the Output Area as execution proceeds

Launching a selected run configuration triggers a chain of events. With a simple model, extraction, execution, and solution display are nearly simultaneous.

Details of the execution process

  1. Analysis of the model

    The IDE first analyzes the model and fills in the Problem Browser with summary information about the data structures defined in the model and with the list of solutions. See Understanding the Problem Browser in Getting Started with the IDE for more information.

  2. Syntax and semantic checks

    If the IDE finds errors that were not detected dynamically when you wrote the model, it stops the run so that you can correct the errors. See Dealing with errors in Getting Started with the IDE.

  3. Execution of the model

    If there are no errors, the IDE extracts the model and starts execution. A message appears in the Status Bar and the status indicator animates to indicate the solve process is running. If intermediate solutions are found before the final solution, they appear in the Solutions output panel.

  4. Output Area

    When the IDE finds the optimal solution, the solve operation stops. The tab names for the panels of the Output Area that have received content are highlighted. They revert to normal display as soon as you click them to see their content.

    • Problems: status and error messages

    • Scripting log: execution of flow control, preprocessing, postprocessing IBM® ILOG® Script blocks if the model contains any.

    • Solutions: feasible and final

    • Conflicts: if the model is infeasible

    • Relaxations: if the model required relaxations to make it feasible

    • Engine log: execution history in text mode

    • Statistics: table and progress chart

    • Profiler: performance (speed and memory consumption)

Results

When executing a run configuration, the IDE uses the solving engine to compute one or more solutions. If the project contains an infeasible model, the IDE detects conflicts, if any, and displays the results in the various tabs of the Output Area, as explained in The Output tabs in Getting Started with the IDE.