Octeract Engine Options

⌘K
  1. Home
  2. Docs
  3. Octeract Engine Options
  4. How to set options

How to set options

Octeract Engine parses an options file for options. By default, it will parse an octeract.opt text file, if one exists in the current directory. You can also pass an options file as a flag, e.g.

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

The syntax of the options file is case sensitive, and follows the pattern option = value

The left hand-side and the right hand-side of this syntax are always single words (no whitespace). Any whitespace surrounding the = sign is ignored.

If no value is specified for an option, a default value is used instead. The default value for most options is simply AUTOMATIC (or equivalent), since the engine will dynamically decide what to use on runtime.

You can also have comments in the file using hash, e.g.:

# Convergence options
CONVERGENCE_TOLERANCE = 0.1
MAX_SOLVER_TIME = 60

# Domain reduction
USE_OBBT = false

# Misc
INFINITY = 1.e6

If you make a mistake and e.g. type what_the_fudge as an option, the engine will print this immensely helpful message:

terminate called after throwing an instance of 'octeract::options::LineError'
what(): Parsing error at line 1 : what_the_fudge

This way of setting options works with everything, including AMPL, GAMS, Pyomo, etc, i.e., if you are in my/current/dir and type:

gams my_gams_file.gms

the engine will pick up an octeract.opt file, if one exists in my/current/dir.

For setting engine options from within third party software, refer to their documentation to see how that’s done.