Stores and evaluates LSQ terms within optimal control problems. More...
#include <lsq_term.hpp>

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) | |
| LSQTerm & | operator= (const LSQTerm &rhs) |
| returnValue | setGrid (const Grid &grid_) |
| returnValue | setReference (const VariablesGrid &ref) |
| virtual | ~LSQTerm () |
Protected Attributes | |
| DVector * | r |
| VariablesGrid * | r_temp |
| DMatrix * | S |
| double ** | S_h_res |
| MatrixVariablesGrid * | S_temp |
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.
Definition at line 61 of file lsq_term.hpp.
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.
| S_ | the weighting matrix |
| h | the 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.
| 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
Definition at line 279 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.
Definition at line 418 of file acado/objective/lsq_term.cpp.
| returnValue LSQTerm::getWeigthingtMatrix | ( | const unsigned | _index, |
| DMatrix & | _matrix | ||
| ) | const |
Definition at line 575 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.
Assignment operator (deep copy).
Definition at line 139 of file acado/objective/lsq_term.cpp.
| returnValue LSQTerm::setGrid | ( | const Grid & | grid_ | ) | [inline] |
| returnValue LSQTerm::setReference | ( | const VariablesGrid & | ref | ) |
overwrites the reference vector r
Definition at line 587 of file acado/objective/lsq_term.cpp.
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.