Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends

Provides a generic way to set and pass user-specified options. More...

#include <options.hpp>

Inheritance diagram for Options:
Inheritance graph
[legend]

List of all members.

Public Member Functions

returnValue addOptionsList ()
returnValue ensureConsistency ()
returnValue get (OptionsName name, int &value) const
returnValue get (OptionsName name, double &value) const
returnValue get (OptionsName name, std::string &value) const
returnValue get (uint idx, OptionsName name, int &value) const
returnValue get (uint idx, OptionsName name, double &value) const
returnValue get (uint idx, OptionsName name, std::string &value) const
uint getNumOptionsLists () const
Options getOptions (uint idx) const
Optionsoperator= (const Options &rhs)
 Options ()
 Options (const Options &rhs)
 Options ()
 Options (const OptionsList &_optionsList)
returnValue print () const
returnValue printOptionsList () const
returnValue printOptionsList (uint idx) const
returnValue set (OptionsName name, int value)
returnValue set (OptionsName name, double value)
returnValue set (OptionsName name, const std::string &value)
returnValue set (uint idx, OptionsName name, int value)
returnValue set (uint idx, OptionsName name, double value)
returnValue set (uint idx, OptionsName name, const std::string &value)
returnValue setOptions (const Options &arg)
returnValue setOptions (uint idx, const Options &arg)
returnValue setToDefault ()
returnValue setToFast ()
returnValue setToReliable ()
 ~Options ()
virtual ~Options ()

Public Attributes

real_t boundRelaxation
real_t boundTolerance
int enableCholeskyRefactorisation
int enableDriftCorrection
BooleanType enableEqualities
BooleanType enableFarBounds
BooleanType enableFlippingBounds
BooleanType enableFullLITests
BooleanType enableNZCTests
BooleanType enableRamping
BooleanType enableRegularisation
real_t epsDen
real_t epsFlipping
real_t epsIterRef
real_t epsLITests
real_t epsNum
real_t epsNZCTests
real_t epsRegularisation
real_t finalRamping
real_t growFarBounds
real_t initialFarBounds
real_t initialRamping
SubjectToStatus initialStatusBounds
real_t maxDualJump
real_t maxPrimalJump
int numRefinementSteps
int numRegularisationSteps
PrintLevel printLevel
real_t terminationTolerance

Protected Member Functions

returnValue addOption (OptionsName name, int value)
returnValue addOption (OptionsName name, double value)
returnValue addOption (OptionsName name, const std::string &value)
returnValue addOption (uint idx, OptionsName name, int value)
returnValue addOption (uint idx, OptionsName name, double value)
returnValue addOption (uint idx, OptionsName name, const std::string &value)
returnValue clearOptionsList ()
returnValue copy (const Options &rhs)
returnValue declareOptionsUnchanged ()
returnValue declareOptionsUnchanged (uint idx)
BooleanType haveOptionsChanged () const
BooleanType haveOptionsChanged (uint idx) const
virtual returnValue setupOptions ()

Protected Attributes

std::vector< OptionsListlists

Friends

class AlgorithmicBase

Detailed Description

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.

Note:
Parts of the functionality of the Options class are tunnelled into the AlgorithmicBase class to be used in derived developer classes. In case this functionality is modified or new functionality is added to this class, the AlgorithmicBase class has to be adapted accordingly.
Author:
Hans Joachim Ferreau, Boris Houska, Milan Vukov

This class manages all user-specified options used for solving quadratic programs.

Author:
Hans Joachim Ferreau, Andreas Potschka, Christian Kirches
Version:
3.0beta
Date:
2007-2011

Definition at line 65 of file options.hpp.


Constructor & Destructor Documentation

Default constructor.

Definition at line 45 of file options.cpp.

Options::Options ( const OptionsList _optionsList)

Constructor which takes an initialization for first option list.

Parameters:
[in]_optionsListInitialization for first option list

Definition at line 51 of file options.cpp.

Options::~Options ( ) [virtual]

Destructor.

Definition at line 58 of file options.cpp.

Default constructor.

Options::Options ( const Options rhs)

Copy constructor (deep copy).

Parameters:
rhsRhs object.

Definition at line 59 of file Options.cpp.

Destructor.


Member Function Documentation

returnValue Options::addOption ( OptionsName  name,
int  value 
) [protected]

Add an option item with a given integer default value to the all option lists.

Parameters:
[in]nameName of new option item.
[in]valueDefault value of new option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_ALREADY_EXISTS,
RET_OPTIONS_LIST_CORRUPTED

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.

Parameters:
[in]nameName of new option item.
[in]valueDefault value of new option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_ALREADY_EXISTS,
RET_OPTIONS_LIST_CORRUPTED

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.

Parameters:
[in]nameName of new option item.
[in]valueDefault value of new option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_ALREADY_EXISTS,
RET_OPTIONS_LIST_CORRUPTED

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.

Parameters:
[in]idxIndex of option list.
[in]nameName of new option item.
[in]valueDefault value of new option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_ALREADY_EXISTS,
RET_OPTIONS_LIST_CORRUPTED,
RET_INDEX_OUT_OF_BOUNDS

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.

Parameters:
[in]idxIndex of option list.
[in]nameName of new option item.
[in]valueDefault value of new option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_ALREADY_EXISTS,
RET_OPTIONS_LIST_CORRUPTED,
RET_INDEX_OUT_OF_BOUNDS

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.

Parameters:
[in]idxIndex of option list.
[in]nameName of new option item.
[in]valueDefault value of new option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_ALREADY_EXISTS,
RET_OPTIONS_LIST_CORRUPTED,
RET_INDEX_OUT_OF_BOUNDS

Definition at line 375 of file options.cpp.

Adds an additional OptionsList to internal array.

Returns:
SUCCESSFUL_RETURN

Definition at line 61 of file options.cpp.

Clears all option lists from array.

Returns:
SUCCESSFUL_RETURN
returnValue Options::copy ( const Options rhs) [protected]

Copies all members from given rhs object.

Returns:
SUCCESSFUL_RETURN
Parameters:
rhsRhs object.

Definition at line 384 of file Options.cpp.

Declares all options of all option lists to be unchanged.

Returns:
SUCCESSFUL_RETURN

Definition at line 276 of file options.cpp.

Declares all options of option list with given index to be unchanged.

Parameters:
[in]idxIndex of option list.
Returns:
SUCCESSFUL_RETURN

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!

Returns:
SUCCESSFUL_RETURN

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.

Parameters:
[in]nameName of option item.
[out]valueValue of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS

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.

Parameters:
[in]nameName of option item.
[out]valueValue of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS

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.

Parameters:
[in]nameName of option item.
[out]valueValue of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS

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.

Parameters:
[in]idxIndex of option list.
[in]nameName of option item.
[out]valueValue of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_INDEX_OUT_OF_BOUNDS

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.

Parameters:
[in]idxIndex of option list.
[in]nameName of option item.
[out]valueValue of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_INDEX_OUT_OF_BOUNDS

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.

Parameters:
[in]idxIndex of option list.
[in]nameName of option item.
[out]valueValue of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_INDEX_OUT_OF_BOUNDS

Definition at line 115 of file options.cpp.

Returns total number of option lists.

Returns:
Total number of option lists

Definition at line 386 of file options.cpp.

Returns an Options object containing exactly the option list with given index.

Parameters:
[in]idxIndex of option list.
Returns:
Options object containing exactly the option list with given index

Definition at line 204 of file options.cpp.

Determines whether options of at least one option list have been modified.

Returns:
BT_TRUE iff options have been modified,
BT_FALSE otherwise

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.

Parameters:
[in]idxIndex of option list.
Returns:
BT_TRUE iff options have been modified,
BT_FALSE otherwise

Definition at line 263 of file options.cpp.

Options & Options::operator= ( const Options rhs)

Assignment operator (deep copy).

Parameters:
rhsRhs object.

Definition at line 76 of file Options.cpp.

Prints values of all options.

Returns:
SUCCESSFUL_RETURN

Definition at line 256 of file Options.cpp.

Prints a list of all available options of all option lists.

Returns:
SUCCESSFUL_RETURN

Definition at line 217 of file options.cpp.

Prints a list of all available options of option list with given index.

Parameters:
[in]idxIndex of option list.
Returns:
SUCCESSFUL_RETURN

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.

Parameters:
[in]nameName of option item.
[in]valueNew value of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_OPTIONS_LIST_CORRUPTED

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.

Parameters:
[in]nameName of option item.
[in]valueNew value of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_OPTIONS_LIST_CORRUPTED

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.

Parameters:
[in]nameName of option item.
[in]valueNew value of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_OPTIONS_LIST_CORRUPTED

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.

Parameters:
[in]idxIndex of option list.
[in]nameName of option item.
[in]valueNew value of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_OPTIONS_LIST_CORRUPTED,
RET_INDEX_OUT_OF_BOUNDS

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.

Parameters:
[in]idxIndex of option list.
[in]nameName of option item.
[in]valueNew value of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_OPTIONS_LIST_CORRUPTED,
RET_INDEX_OUT_OF_BOUNDS

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.

Parameters:
[in]idxIndex of option list.
[in]nameName of option item.
[in]valueNew value of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_OPTIONS_LIST_CORRUPTED,
RET_INDEX_OUT_OF_BOUNDS

Definition at line 171 of file options.cpp.

Assigns a given Options object to this object.

Parameters:
[in]argNew Options object to be assigned.
Note:
This routine is introduced only for convenience and is equivalent to the assignment operator.
Returns:
SUCCESSFUL_RETURN

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.

Parameters:
[in]idxIndex of option list.
[in]argOptions object containing the option list to be assigned.
Returns:
SUCCESSFUL_RETURN

Definition at line 191 of file options.cpp.

Sets all options to default values.

Returns:
SUCCESSFUL_RETURN

Definition at line 91 of file Options.cpp.

Sets all options to values resulting in minimum solution time.

Returns:
SUCCESSFUL_RETURN

Definition at line 155 of file Options.cpp.

Sets all options to values resulting in maximum reliabilty.

Returns:
SUCCESSFUL_RETURN

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.

Returns:
SUCCESSFUL_RETURN

Reimplemented in Process, Controller, IntegrationAlgorithm, SimulationEnvironment, RealTimeAlgorithm, MultiObjectiveAlgorithm, ExportModule, and OptimizationAlgorithm.

Definition at line 246 of file options.cpp.


Friends And Related Function Documentation

friend class AlgorithmicBase [friend]

Definition at line 67 of file options.hpp.


Member Data Documentation

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.


The documentation for this class was generated from the following files:


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 12:01:39