Public Member Functions | Protected Attributes | List of all members

Stores and evaluates LSQ terms within optimal control problems. More...

#include <lsq_term.hpp>

Inheritance diagram for LSQTerm:
Inheritance graph
[legend]

Public Member Functions

returnValue evaluate (const OCPiterate &x)
 
returnValue evaluateSensitivities (BlockMatrix *hessian)
 
returnValue evaluateSensitivitiesGN (BlockMatrix *GNhessian)
 
returnValue getWeigthingtMatrix (const unsigned _index, DMatrix &_matrix) const
 
BooleanType isAffine ()
 
BooleanType isConvex ()
 
BooleanType isQuadratic ()
 
 LSQTerm ()
 
 LSQTerm (const MatrixVariablesGrid *S_, const Function &h, const VariablesGrid *r_)
 
 LSQTerm (const LSQTerm &rhs)
 
LSQTermoperator= (const LSQTerm &rhs)
 
returnValue setGrid (const Grid &grid_)
 
returnValue setReference (const VariablesGrid &ref)
 
virtual ~LSQTerm ()
 
- Public Member Functions inherited from ObjectiveElement
virtual returnValue getBackwardSensitivities (BlockMatrix *D, int order)
 
virtual returnValue getForwardSensitivities (BlockMatrix *D, int order)
 
returnValue getFunction (Function &_function)
 
int getNP () const
 
int getNU () const
 
int getNW () const
 
int getNX () const
 
int getNXA () const
 
virtual returnValue getObjectiveValue (double &objectiveValue)
 
returnValue init (const OCPiterate &x)
 
 ObjectiveElement ()
 
 ObjectiveElement (const Grid &grid_)
 
 ObjectiveElement (const ObjectiveElement &rhs)
 
ObjectiveElementoperator= (const ObjectiveElement &rhs)
 
virtual returnValue setBackwardSeed (BlockMatrix *seed, int order)
 
virtual returnValue setForwardSeed (BlockMatrix *xSeed_, BlockMatrix *xaSeed_, BlockMatrix *pSeed_, BlockMatrix *uSeed_, BlockMatrix *wSeed_, int order)
 
returnValue setGrid (const Grid &grid_)
 
virtual ~ObjectiveElement ()
 

Protected Attributes

DVectorr
 
VariablesGridr_temp
 
DMatrixS
 
double ** S_h_res
 
MatrixVariablesGridS_temp
 
- Protected Attributes inherited from ObjectiveElement
BlockMatrixbSeed
 
BlockMatrixbSeed2
 
BlockMatrix dBackward
 
BlockMatrix dForward
 
Function fcn
 
Grid grid
 
EvaluationPoint JJ
 
int na
 
int np
 
int nu
 
int nw
 
int nx
 
int ny
 
double obj
 
BlockMatrixpSeed
 
BlockMatrixpSeed2
 
int t_index
 
BlockMatrixuSeed
 
BlockMatrixuSeed2
 
BlockMatrixwSeed
 
BlockMatrixwSeed2
 
BlockMatrixxaSeed
 
BlockMatrixxaSeed2
 
BlockMatrixxSeed
 
BlockMatrixxSeed2
 
int * y_index
 
EvaluationPoint z
 

Additional Inherited Members

- Protected Member Functions inherited from ObjectiveElement
Grid getGrid () const
 

Detailed Description

Stores and evaluates LSQ terms within optimal control problems.

The class LSQTerm allows to manage and evaluate least square objective functionals
of the general form:

0.5* sum_i || S(t_i) * ( h(t_i,x(t_i),u(t_i),p(t_i),...) - r(t_i) ) ||^2_2

Here the sum is over all grid points of the objective grid. The DMatrix S is assumed to
be symmetric and positive (semi-) definite.

Author
Boris Houska, Hans Joachim Ferreau

Definition at line 61 of file lsq_term.hpp.

Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO LSQTerm::LSQTerm ( )

Default constructor.

Definition at line 46 of file acado/objective/lsq_term.cpp.

LSQTerm::LSQTerm ( const MatrixVariablesGrid S_,
const Function h,
const VariablesGrid r_ 
)

Default constructor.

Parameters
S_the weighting matrix
hthe LSQ function
r_the reference vectors

Definition at line 59 of file acado/objective/lsq_term.cpp.

LSQTerm::LSQTerm ( const LSQTerm rhs)

Copy constructor (deep copy).

Definition at line 77 of file acado/objective/lsq_term.cpp.

LSQTerm::~LSQTerm ( )
virtual

Destructor.

Definition at line 115 of file acado/objective/lsq_term.cpp.

Member Function Documentation

returnValue LSQTerm::evaluate ( const OCPiterate x)

Definition at line 201 of file acado/objective/lsq_term.cpp.

returnValue LSQTerm::evaluateSensitivities ( BlockMatrix hessian)

Evaluates the objective gradient contribution from this term
and computes the corresponding exact hessian if hessian != 0

Returns
SUCCESSFUL_RETURN

Definition at line 283 of file acado/objective/lsq_term.cpp.

returnValue LSQTerm::evaluateSensitivitiesGN ( BlockMatrix GNhessian)

Evaluates the objective gradient contribution from this term
and computes the corresponding GN hessian approximation for
the case that GNhessian != 0.

Returns
SUCCESSFUL_RETURN

Definition at line 422 of file acado/objective/lsq_term.cpp.

returnValue LSQTerm::getWeigthingtMatrix ( const unsigned  _index,
DMatrix _matrix 
) const

Definition at line 579 of file acado/objective/lsq_term.cpp.

BooleanType LSQTerm::isAffine ( )
inline

returns whether the constraint element is affine.

BooleanType LSQTerm::isConvex ( )
inline

returns whether the constraint element is convex.

BooleanType LSQTerm::isQuadratic ( )
inline

returns whether the constraint element is convex.

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

Assignment operator (deep copy).

Definition at line 139 of file acado/objective/lsq_term.cpp.

returnValue LSQTerm::setGrid ( const Grid grid_)
inline

Sets the discretization grid.

Returns
SUCCESSFUL_RETURN
returnValue LSQTerm::setReference ( const VariablesGrid ref)

overwrites the reference vector r

Returns
SUCCESSFUL_RETURN

Definition at line 591 of file acado/objective/lsq_term.cpp.

Member Data Documentation

DVector* LSQTerm::r
protected

a tracking reference

Definition at line 170 of file lsq_term.hpp.

VariablesGrid* LSQTerm::r_temp
protected

a tracking reference

Definition at line 167 of file lsq_term.hpp.

DMatrix* LSQTerm::S
protected

a symmetric weighting matrix

Definition at line 169 of file lsq_term.hpp.

double** LSQTerm::S_h_res
protected

specific intermediate results
to be stored for backward
differentiation

Definition at line 172 of file lsq_term.hpp.

MatrixVariablesGrid* LSQTerm::S_temp
protected

a symmetric weighting matrix

Definition at line 166 of file lsq_term.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:25