Options

options: oppy options.

This module contains an option class which provides several possibilities for different methods in oppy.

The attributes differ from caller method to caller method. A detailed list of all options can be found in the documentation of the respective methods.

Documentation is available in the docstrings and online here.

oppy.options.options module

class oppy.options.Options(**kwargs)

Options object for all methods.

The Options class is essential for all methods used in oppy. Here you can set all options that a solver has. Since these are sometimes very different for each method, a detailed list of possible options can be found in the documentation of the individual methods.

The attributes differ from caller method to caller method.
__init__(self, \*\*kwargs)

A method to initialize the class, set the cache flag to false and create a dictionary, containing all methods (including line search algorithms) and their corresponding common options key. One could either set all attributes via options_class.attribute of or with the usage of varargs in the constructor.

ops(self)

A method to identify the caller method and set all its attributes including some common options of the line search/optimization methods and special options. Moreover the cache is set to True, so if you call a method multiple times (e.g. line search algorithms), the options will be only set once.

get_ops(self)

Method to return all options and their values, the caller method has, excluding the cache flag and the common options key

set_missing(self, caller_method, special_options, common_options)

This method checks which of the options are set by the user to non default and completes the other option attributes with their default value

check_constraints(self, common_constraints, special_constraints)

In the constructor the developers set internal mathematical constraints which the options should satisfy, e.g. the maximum number of iterations should be positive. This method checks all these constraints and sets attributes to its default value, if a constraint is violated.