Postprocessing a feasible solution

Discusses changing a language option and adding a settings file before postprocessing.

About this task

You are now going to change an OPL Language option for the covering project and observe the different output in the Scripting Log after execution. First, you need to add a settings file to that project if it does not already exist.

To change an OPL language option for a project:

Procedure

  1. Right-click the covering project in OPL Projects Navigator and choose New > Settings to create a settings file as explained in Adding a settings file in Getting Started with the IDE.
  2. Name it covering.ops and add it to the default run configuration using drag and drop.

    After you have done this the various MP, CP, and OPL Language options become visible in the settings editor.

  3. Click Language > Run, then check the Postprocess feasible solutions box and save the settings file.
    Figure 1. Turning on the Postprocess feasible solutions option
    Setting the Postprocess feasible solutions option
  4. Re-run Basic Configuration in the covering project to execute the covering example again and postprocess any feasible solutions found before the final solution.

Results

At the end of execution, observe the difference in the Scripting log. It contains three sets of output written by the engine and by the postprocessing script, two for feasible solutions, and one for the final solution.

Figure 2. Postprocessing a feasible solution (covering project)
Postprocessing a feasible solution

The non optimal feasible solution appears because the Postprocess feasible solutions was checked.