Provides a generic way to set and pass user-specified options. More...
#include <options.hpp>
Provides a generic way to set and pass user-specified options.
Manages all user-specified options for solving QPs.
The class Options provides a generic way to set and pass user-specified options. This class is part of the UserInterface class, i.e. all classes that are intended to interact with the user inherit the public functionality of the Options class.
The class Options holds an array of OptionsLists, where only one OptionsList is allocated by default. This list contains all available options and their respective values. The array can be extended by calling the addOptionsList() member function. This allows to handle more than one options list, that can be accessed via its index. This feature is, e.g., intended to manage a seperate options list for each stage of a multi-stage optimal control problem.
This class manages all user-specified options used for solving quadratic programs.
Definition at line 65 of file options.hpp.
Default constructor.
Definition at line 45 of file options.cpp.
Options::Options | ( | const OptionsList & | _optionsList | ) |
Constructor which takes an initialization for first option list.
[in] | _optionsList | Initialization for first option list |
Definition at line 51 of file options.cpp.
Options::~Options | ( | ) | [virtual] |
Destructor.
Definition at line 58 of file options.cpp.
Options::Options | ( | ) |
Default constructor.
Options::Options | ( | const Options & | rhs | ) |
Destructor.
returnValue Options::addOption | ( | OptionsName | name, |
int | value | ||
) | [protected] |
Add an option item with a given integer default value to the all option lists.
[in] | name | Name of new option item. |
[in] | value | Default value of new option. |
Definition at line 301 of file options.cpp.
returnValue Options::addOption | ( | OptionsName | name, |
double | value | ||
) | [protected] |
Add an option item with a given double default value to the all option lists.
[in] | name | Name of new option item. |
[in] | value | Default value of new option. |
Definition at line 318 of file options.cpp.
returnValue Options::addOption | ( | OptionsName | name, |
const std::string & | value | ||
) | [protected] |
Add an option item with a given double default value to the all option lists.
[in] | name | Name of new option item. |
[in] | value | Default value of new option. |
Definition at line 334 of file options.cpp.
returnValue Options::addOption | ( | uint | idx, |
OptionsName | name, | ||
int | value | ||
) | [protected] |
Add an option item with a given integer default value to option list with given index.
[in] | idx | Index of option list. |
[in] | name | Name of new option item. |
[in] | value | Default value of new option. |
Definition at line 352 of file options.cpp.
returnValue Options::addOption | ( | uint | idx, |
OptionsName | name, | ||
double | value | ||
) | [protected] |
Add an option item with a given double default value to option list with given index.
[in] | idx | Index of option list. |
[in] | name | Name of new option item. |
[in] | value | Default value of new option. |
Definition at line 364 of file options.cpp.
returnValue Options::addOption | ( | uint | idx, |
OptionsName | name, | ||
const std::string & | value | ||
) | [protected] |
Add an option item with a given double default value to option list with given index.
[in] | idx | Index of option list. |
[in] | name | Name of new option item. |
[in] | value | Default value of new option. |
Definition at line 375 of file options.cpp.
Adds an additional OptionsList to internal array.
Definition at line 61 of file options.cpp.
returnValue Options::clearOptionsList | ( | ) | [protected] |
Clears all option lists from array.
returnValue Options::copy | ( | const Options & | rhs | ) | [protected] |
Copies all members from given rhs object.
rhs | Rhs object. |
Definition at line 384 of file Options.cpp.
returnValue Options::declareOptionsUnchanged | ( | ) | [protected] |
Declares all options of all option lists to be unchanged.
Definition at line 276 of file options.cpp.
returnValue Options::declareOptionsUnchanged | ( | uint | idx | ) | [protected] |
Declares all options of option list with given index to be unchanged.
[in] | idx | Index of option list. |
Definition at line 291 of file options.cpp.
Ensures that all options have consistent values by automatically correcting inconsistent ones. Note: This routine cannot (and does not try to) ensure that values are set to reasonable values that make the QP solution work!
Definition at line 181 of file Options.cpp.
returnValue Options::get | ( | OptionsName | name, |
int & | value | ||
) | const |
Returns value of an existing option item of integer type.
[in] | name | Name of option item. |
[out] | value | Value of option. |
Definition at line 69 of file options.cpp.
returnValue Options::get | ( | OptionsName | name, |
double & | value | ||
) | const |
Returns value of an existing option item of double type.
[in] | name | Name of option item. |
[out] | value | Value of option. |
Definition at line 77 of file options.cpp.
returnValue Options::get | ( | OptionsName | name, |
std::string & | value | ||
) | const |
Returns value of an existing option item of string type.
[in] | name | Name of option item. |
[out] | value | Value of option. |
Definition at line 84 of file options.cpp.
returnValue Options::get | ( | uint | idx, |
OptionsName | name, | ||
int & | value | ||
) | const |
Returns value of an existing option item of integer type within the option list of given index.
[in] | idx | Index of option list. |
[in] | name | Name of option item. |
[out] | value | Value of option. |
Definition at line 92 of file options.cpp.
returnValue Options::get | ( | uint | idx, |
OptionsName | name, | ||
double & | value | ||
) | const |
Returns value of an existing option item of double type within the option list of given index.
[in] | idx | Index of option list. |
[in] | name | Name of option item. |
[out] | value | Value of option. |
Definition at line 104 of file options.cpp.
returnValue Options::get | ( | uint | idx, |
OptionsName | name, | ||
std::string & | value | ||
) | const |
Returns value of an existing option item of string type within the option list of given index.
[in] | idx | Index of option list. |
[in] | name | Name of option item. |
[out] | value | Value of option. |
Definition at line 115 of file options.cpp.
uint Options::getNumOptionsLists | ( | ) | const |
Returns total number of option lists.
Definition at line 386 of file options.cpp.
Options Options::getOptions | ( | uint | idx | ) | const |
Returns an Options object containing exactly the option list with given index.
[in] | idx | Index of option list. |
Definition at line 204 of file options.cpp.
BooleanType Options::haveOptionsChanged | ( | ) | const [protected] |
Determines whether options of at least one option list have been modified.
Definition at line 251 of file options.cpp.
BooleanType Options::haveOptionsChanged | ( | uint | idx | ) | const [protected] |
Determines whether options of option list with given index have been modified.
[in] | idx | Index of option list. |
Definition at line 263 of file options.cpp.
Assignment operator (deep copy).
rhs | Rhs object. |
Definition at line 76 of file Options.cpp.
returnValue Options::print | ( | ) | const |
returnValue Options::printOptionsList | ( | ) | const |
Prints a list of all available options of all option lists.
Definition at line 217 of file options.cpp.
returnValue Options::printOptionsList | ( | uint | idx | ) | const |
Prints a list of all available options of option list with given index.
[in] | idx | Index of option list. |
Definition at line 232 of file options.cpp.
returnValue Options::set | ( | OptionsName | name, |
int | value | ||
) |
Sets value of an existing option item of integer type to a given value.
[in] | name | Name of option item. |
[in] | value | New value of option. |
Definition at line 126 of file options.cpp.
returnValue Options::set | ( | OptionsName | name, |
double | value | ||
) |
Sets value of an existing option item of double type to a given value.
[in] | name | Name of option item. |
[in] | value | New value of option. |
Definition at line 134 of file options.cpp.
returnValue Options::set | ( | OptionsName | name, |
const std::string & | value | ||
) |
Sets value of an existing option item of string type to a given value.
[in] | name | Name of option item. |
[in] | value | New value of option. |
Definition at line 141 of file options.cpp.
returnValue Options::set | ( | uint | idx, |
OptionsName | name, | ||
int | value | ||
) |
Sets value of an existing option item of integer type within the option list of given index to a given value.
[in] | idx | Index of option list. |
[in] | name | Name of option item. |
[in] | value | New value of option. |
Definition at line 148 of file options.cpp.
returnValue Options::set | ( | uint | idx, |
OptionsName | name, | ||
double | value | ||
) |
Sets value of an existing option item of double type within the option list of given index to a given value.
[in] | idx | Index of option list. |
[in] | name | Name of option item. |
[in] | value | New value of option. |
Definition at line 160 of file options.cpp.
returnValue Options::set | ( | uint | idx, |
OptionsName | name, | ||
const std::string & | value | ||
) |
Sets value of an existing option item of string type within the option list of given index to a given value.
[in] | idx | Index of option list. |
[in] | name | Name of option item. |
[in] | value | New value of option. |
Definition at line 171 of file options.cpp.
returnValue Options::setOptions | ( | const Options & | arg | ) |
Assigns a given Options object to this object.
[in] | arg | New Options object to be assigned. |
Definition at line 183 of file options.cpp.
returnValue Options::setOptions | ( | uint | idx, |
const Options & | arg | ||
) |
Assigns the option list with given index of a given Options object to option list with given index of this object.
[in] | idx | Index of option list. |
[in] | arg | Options object containing the option list to be assigned. |
Definition at line 191 of file options.cpp.
Sets all options to default values.
Definition at line 91 of file Options.cpp.
Sets all options to values resulting in minimum solution time.
Definition at line 155 of file Options.cpp.
Sets all options to values resulting in maximum reliabilty.
Definition at line 139 of file Options.cpp.
returnValue Options::setupOptions | ( | ) | [protected, virtual] |
Prototype member function for setting-up the option list(s) at initialization of derived classes.
Reimplemented in Process, Controller, IntegrationAlgorithm, SimulationEnvironment, RealTimeAlgorithm, MultiObjectiveAlgorithm, ExportModule, and OptimizationAlgorithm.
Definition at line 246 of file options.cpp.
friend class AlgorithmicBase [friend] |
Definition at line 67 of file options.hpp.
Offset for relaxing (constraints') bounds at beginning of an initial homotopy. It is also as initial value for far bounds.
Definition at line 131 of file Options.hpp.
Lower/upper (constraints') bound tolerance (an inequality constraint whose lower and upper bounds differ by less is regarded to be an equality constraint).
Definition at line 130 of file Options.hpp.
Specifies the frequency of full refactorisation of proj. Hessian (otherwise updates).
Definition at line 126 of file Options.hpp.
Specifies the frequency of drift corrections (0 = off).
Definition at line 125 of file Options.hpp.
Specifies whether equalities shall be always treated as active constraints.
Definition at line 127 of file Options.hpp.
Specifies whether far bounds shall be used or not.
Definition at line 120 of file Options.hpp.
Specifies whether flipping bounds shall be used or not.
Definition at line 121 of file Options.hpp.
Specifies whether condition-hardened LI test shall be used or not.
Definition at line 123 of file Options.hpp.
Specifies whether nonzero curvature tests shall be used.
Definition at line 124 of file Options.hpp.
Specifies whether ramping shall be enabled or not.
Definition at line 119 of file Options.hpp.
Specifies whether Hessian matrix shall be regularised in case semi-definiteness is detected.
Definition at line 122 of file Options.hpp.
Denominator tolerance for ratio tests.
Definition at line 133 of file Options.hpp.
Tolerance of squared Cholesky diagonal factor which triggers flipping bound.
Definition at line 142 of file Options.hpp.
Early termination tolerance for iterative refinement.
Definition at line 146 of file Options.hpp.
Tolerance for linear independence tests.
Definition at line 147 of file Options.hpp.
Numerator tolerance for ratio tests.
Definition at line 132 of file Options.hpp.
Tolerance for nonzero curvature tests.
Definition at line 148 of file Options.hpp.
Scaling factor of identity matrix used for Hessian regularisation.
Definition at line 144 of file Options.hpp.
Final value for Ramping Strategy (usually 1.0 or 0.5).
Definition at line 138 of file Options.hpp.
Factor to grow Far Bounds.
Definition at line 140 of file Options.hpp.
Initial size of Far Bounds.
Definition at line 139 of file Options.hpp.
Start value for Ramping Strategy (usually 0.5 or 1.0).
Definition at line 137 of file Options.hpp.
Initial status of bounds at first iteration.
Definition at line 141 of file Options.hpp.
std::vector< OptionsList > Options::lists [protected] |
A list consisting of OptionsLists.
Definition at line 476 of file options.hpp.
Maximum allowed jump in dual variables in linear independence tests.
Definition at line 135 of file Options.hpp.
Maximum allowed jump in primal variables in nonzero curvature tests.
Definition at line 134 of file Options.hpp.
Maximum number of iterative refinement steps.
Definition at line 145 of file Options.hpp.
Maximum number of successive regularisation steps.
Definition at line 143 of file Options.hpp.
Print level.
Definition at line 117 of file Options.hpp.
Termination tolerance.
Definition at line 129 of file Options.hpp.