Public Member Functions | Protected Member Functions | Protected Attributes | List of all members

Implements BFGS updates for approximating second-order derivatives within NLPsolvers. More...

#include <bfgs_update.hpp>

Inheritance diagram for BFGSupdate:
Inheritance graph
[legend]

Public Member Functions

virtual returnValue apply (BlockMatrix &B, const BlockMatrix &x, const BlockMatrix &y)
 
 BFGSupdate ()
 
 BFGSupdate (UserInteraction *_userInteraction, uint _nBlocks=0)
 
 BFGSupdate (const BFGSupdate &rhs)
 
virtual NLPderivativeApproximationclone () const
 
virtual returnValue initHessian (BlockMatrix &B, uint N, const OCPiterate &iter)
 
virtual returnValue initScaling (BlockMatrix &B, const BlockMatrix &x, const BlockMatrix &y)
 
BFGSupdateoperator= (const BFGSupdate &rhs)
 
BooleanType performsBlockUpdates () const
 
returnValue setBFGSModification (const BFGSModificationType &modification_)
 
virtual ~BFGSupdate ()
 
- Public Member Functions inherited from ConstantHessian
 ConstantHessian ()
 
 ConstantHessian (UserInteraction *_userInteraction)
 
 ConstantHessian (const ConstantHessian &rhs)
 
ConstantHessianoperator= (const ConstantHessian &rhs)
 
virtual ~ConstantHessian ()
 
- Public Member Functions inherited from NLPderivativeApproximation
double getHessianScaling () const
 
 NLPderivativeApproximation ()
 
 NLPderivativeApproximation (UserInteraction *_userInteraction)
 
 NLPderivativeApproximation (const NLPderivativeApproximation &rhs)
 
NLPderivativeApproximationoperator= (const NLPderivativeApproximation &rhs)
 
virtual ~NLPderivativeApproximation ()
 
- Public Member Functions inherited from AlgorithmicBase
int addLogRecord (LogRecord &_record)
 
returnValue addOption (OptionsName name, int value)
 
returnValue addOption (OptionsName name, double value)
 
returnValue addOption (uint idx, OptionsName name, int value)
 
returnValue addOption (uint idx, OptionsName name, double value)
 
returnValue addOptionsList ()
 
 AlgorithmicBase ()
 
 AlgorithmicBase (UserInteraction *_userInteraction)
 
 AlgorithmicBase (const AlgorithmicBase &rhs)
 
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 getAll (LogName _name, MatrixVariablesGrid &values) const
 
returnValue getFirst (LogName _name, DMatrix &firstValue) const
 
returnValue getFirst (LogName _name, VariablesGrid &firstValue) const
 
returnValue getLast (LogName _name, DMatrix &lastValue) const
 
returnValue getLast (LogName _name, VariablesGrid &lastValue) const
 
Options getOptions (uint idx) const
 
BooleanType haveOptionsChanged () const
 
BooleanType haveOptionsChanged (uint idx) const
 
AlgorithmicBaseoperator= (const AlgorithmicBase &rhs)
 
returnValue plot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
 
returnValue printLogRecord (std::ostream &_stream, int idx, LogPrintMode _mode=PRINT_ITEM_BY_ITEM) const
 
returnValue replot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
 
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 setAll (LogName _name, const MatrixVariablesGrid &values)
 
returnValue setLast (LogName _name, int lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, double lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, const DVector &lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, const DMatrix &lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, const VariablesGrid &lastValue, double time=-INFTY)
 
returnValue setOptions (const Options &arg)
 
returnValue setOptions (uint idx, const Options &arg)
 
virtual ~AlgorithmicBase ()
 

Protected Member Functions

virtual returnValue applyBlockDiagonalUpdate (BlockMatrix &B, const BlockMatrix &x, const BlockMatrix &y)
 
virtual returnValue applyUpdate (BlockMatrix &B, const BlockMatrix &x, const BlockMatrix &y)
 
returnValue getSubBlockLine (const int &N, const int &line1, const int &line2, const int &offset, const BlockMatrix &M, BlockMatrix &x)
 
returnValue setSubBlockLine (const int &N, const int &line1, const int &line2, const int &offset, BlockMatrix &M, const BlockMatrix &x)
 
- Protected Member Functions inherited from NLPderivativeApproximation
virtual returnValue setupLogging ()
 
virtual returnValue setupOptions ()
 

Protected Attributes

BFGSModificationType modification
 
uint nBlocks
 
- Protected Attributes inherited from NLPderivativeApproximation
double hessianScaling
 
- Protected Attributes inherited from AlgorithmicBase
int outputLoggingIdx
 
BooleanType useModuleStandalone
 
UserInteractionuserInteraction
 

Detailed Description

Implements BFGS updates for approximating second-order derivatives within NLPsolvers.

The class BFGSupdate implements BFGS updates for approximating second-order derivative information within iterative NLPsolvers.

Author
Boris Houska, Hans Joachim Ferreau

Definition at line 67 of file bfgs_update.hpp.

Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO BFGSupdate::BFGSupdate ( )

Default constructor.

Definition at line 45 of file bfgs_update.cpp.

BFGSupdate::BFGSupdate ( UserInteraction _userInteraction,
uint  _nBlocks = 0 
)

Constructor that takes the number of blocks for matrix block updates.

Definition at line 52 of file bfgs_update.cpp.

BFGSupdate::BFGSupdate ( const BFGSupdate rhs)

Copy constructor (deep copy).

Definition at line 61 of file bfgs_update.cpp.

BFGSupdate::~BFGSupdate ( )
virtual

Destructor.

Definition at line 68 of file bfgs_update.cpp.

Member Function Documentation

returnValue BFGSupdate::apply ( BlockMatrix B,
const BlockMatrix x,
const BlockMatrix y 
)
virtual

Applies a BFGS update.

Returns
SUCCESSFUL_RETURN
Parameters
Bmatrix to be updated
xdirection x
yresiduum

Reimplemented from ConstantHessian.

Definition at line 113 of file bfgs_update.cpp.

returnValue BFGSupdate::applyBlockDiagonalUpdate ( BlockMatrix B,
const BlockMatrix x,
const BlockMatrix y 
)
protectedvirtual

Applies a block BFGS update to the diagonal of the matrix B. The integer N
specifies the number of blocks.

B_ii = B_ii - B_ii*x_i*x_i^T*B_ii/(x_i^T*B_ii*x_i) + y_i*y_i^T/(x_i^T*y_i)

Returns
SUCCESSFUL_RETURN
Parameters
Bmatrix to be updated
xdirection x
yresiduum

Definition at line 219 of file bfgs_update.cpp.

returnValue BFGSupdate::applyUpdate ( BlockMatrix B,
const BlockMatrix x,
const BlockMatrix y 
)
protectedvirtual

Applies a BFGS update in its "standard" form:

B = B - B*x*x^T*B/(x^T*B*x) + y*y^T/(x^T*y)

Returns
SUCCESSFUL_RETURN
Parameters
Bmatrix to be updated
xdirection x
yresiduum

Definition at line 130 of file bfgs_update.cpp.

NLPderivativeApproximation * BFGSupdate::clone ( ) const
virtual

Reimplemented from ConstantHessian.

Definition at line 87 of file bfgs_update.cpp.

returnValue BFGSupdate::getSubBlockLine ( const int &  N,
const int &  line1,
const int &  line2,
const int &  offset,
const BlockMatrix M,
BlockMatrix x 
)
protected

Definition at line 257 of file bfgs_update.cpp.

returnValue BFGSupdate::initHessian ( BlockMatrix B,
uint  N,
const OCPiterate iter 
)
virtual
Parameters
Bmatrix to be initialised
Nnumber of intervals
itercurrent iterate

Reimplemented from ConstantHessian.

Definition at line 94 of file bfgs_update.cpp.

returnValue BFGSupdate::initScaling ( BlockMatrix B,
const BlockMatrix x,
const BlockMatrix y 
)
virtual

Applies an initial scaling of the form:

B = B*sqrt( (y^T*y)/(x^T*x) )

This rescaling can be used if the initial Hessian was a
unit matrix which should be auto-scaled in the first step
Note that the update will be skipped for the case that
x^T*x or y^T*y is less than 1000.0*EPS (safeguard
against unreasonable scaling).

Returns
sqrt( (y^T*y)/(x^T*x) )
Parameters
Bmatrix to be updated
xdirection x
yresiduum

Reimplemented from ConstantHessian.

Definition at line 103 of file bfgs_update.cpp.

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

Assignment operator (deep copy).

Definition at line 73 of file bfgs_update.cpp.

BooleanType BFGSupdate::performsBlockUpdates ( ) const
inline
returnValue BFGSupdate::setBFGSModification ( const BFGSModificationType modification_)
inline
returnValue BFGSupdate::setSubBlockLine ( const int &  N,
const int &  line1,
const int &  line2,
const int &  offset,
BlockMatrix M,
const BlockMatrix x 
)
protected

Definition at line 285 of file bfgs_update.cpp.

Member Data Documentation

BFGSModificationType BFGSupdate::modification
protected

Definition at line 193 of file bfgs_update.hpp.

uint BFGSupdate::nBlocks
protected

Definition at line 195 of file bfgs_update.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:22