Option and Option Files on Octeract Engine

Octeract Engine allows users to customise their solving by changing solver options according to their preference. Let’s take a look at what exactly is meant by solver options and how to change these options using an options file.

Octeract Engine accepts custom options through a plain text file. The user can create an empty text file in the format octeract.opt. Within this file the options can be specified, as explained in the section below.




Setting Custom Options in an Option File

It’s important to note that all options are case-sensitive. Each option requires a new line and they are set using the following syntax:

OPTION_NAME = option_value

To show this better, here’s an example.

Let’s assume that the user wants to:

  • turn off the optimisation based bounds tightening technique (OBBT, default behaviour is on)
  • set infinity to \(10^6\) (default is \(10^7\))
  • adjust the convergence tolerance to 0.1 (default is \(10^{-3}\) ) and
  • allow Octeract Engine to run for 60 seconds (default is \(2\times10^9\) seconds)
The contents of the options file should look like the text below:

            
#my octeract custom option file example
USE_OBBT = false
INFINITY = 1.e6
CONVERGENCE_TOLERANCE = 0.1
MAX_SOLVER_TIME = 60
            
        

For further information on how to change specific options, have a look at the Knowledge Base on the left sidebar.




Using Custom Option Files in Third Party Software

When a *third party software is used, in conjunction with Octeract Engine, the user should follow the steps below:

  • Create a text file with the name octeract.opt and save it in the location where the third party software will be run. The name should be exact and in lower case.
  • Define custom options within octeract.opt.
A quick note on using a set of options defined, in the options file octeract.opt, when there is a change in location of the file being run.

If the user would like to use octeract.opt for a file in a different location (to where the options file is currently located), the options file octeract.opt will need to be added to this location.




For example, if a user chooses to run e.g. a Pyomo file by launching Pyomo at location /some/path/in/the/users/computer/ and this location includes an Octeract Engine options file octeract.opt. Octeract Engine will read octeract.opt automatically.

If the user wants to launch Pyomo for, the same or a different file at location a/different/path/in/the/users/computer/ using the same set of options as before, the octeract.opt file needs to be copied from location /some/path/in/the/users/computer/ to a/different/path/in/the/users/computer/.

Therefore, the directory from which the third party software is launched is the correct location of the octeract.opt file.

*Third party software that Octeract Engine supports: Pyomo, Python, AMPL, GAMS, JuMP and C++.




Using Custom Option Files from Terminal

For Octeract Engine usage, via a Terminal environment on Ubuntu/Linux/Unix or Command Prompt (CMD) on Windows, the user can choose how to use custom option files from the two methods mentioned below:

Method 1: the user can specify the custom options within a standard octeract.opt file in the directory where Octeract Engine will be run from.

Method 2: the user can append the following to the usual Octeract Engine call:

-o /path/to/options/file/octeract.opt


so/so1000