Adding a settings file
Explains how to add a settings file to a project so as to be able to change the values of OPL options for language output, mathematical programming, or constraint programming.
A settings file is where you store user-defined values of OPL options for language output, mathematical programming, or constraint programming. It gives you access to the solver parameters and allows you to modify them. For more information, see Setting programming options in the IDE Reference.
If
your model contains a main flow control
script, the OPL values you set in the .ops file,
as well as the settings set within the main script,
apply to the current model only, not to the submodels loaded and solved
at execution time.
Because you left the Create settings option checked in Step 2 of Creating an empty project, a default settings file already exists for your project and this is the one you used in Populating and executing the run configuration.
To practice with a different run configuration without losing your default settings, you are now going to add a second settings file to your project and use it to set a different value to one mathematical programming option.
This stage of the tutorial assumes you have at least a model in your project and want to be able to modify OPL, CPLEX®, or CP Optimizer parameters.
To add a settings file to an existing project:
Notice the changes in IDE window:
- The
newsettings.opsfile is added to the project in the OPL Projects Navigator.
- The settings editor appears.
- The Outline window displays the settings outline. You can later access the modified settings directly from this window.
Each option available in the settings file is documented individually in OPL language options, Constraint programming options, and Mathematical programming options, in the IDE Reference.
You are now ready to use the new settings file to set a mathematical programming option with which you will then execute the model.
