Stores and evaluates LSQ terms within optimal control problems. More...
#include <lsq_term.hpp>
Protected Attributes | |
DVector * | r |
VariablesGrid * | r_temp |
DMatrix * | S |
double ** | S_h_res |
MatrixVariablesGrid * | S_temp |
Protected Attributes inherited from ObjectiveElement | |
BlockMatrix * | bSeed |
BlockMatrix * | bSeed2 |
BlockMatrix | dBackward |
BlockMatrix | dForward |
Function | fcn |
Grid | grid |
EvaluationPoint | JJ |
int | na |
int | np |
int | nu |
int | nw |
int | nx |
int | ny |
double | obj |
BlockMatrix * | pSeed |
BlockMatrix * | pSeed2 |
int | t_index |
BlockMatrix * | uSeed |
BlockMatrix * | uSeed2 |
BlockMatrix * | wSeed |
BlockMatrix * | wSeed2 |
BlockMatrix * | xaSeed |
BlockMatrix * | xaSeed2 |
BlockMatrix * | xSeed |
BlockMatrix * | xSeed2 |
int * | y_index |
EvaluationPoint | z |
Additional Inherited Members | |
Protected Member Functions inherited from ObjectiveElement | |
Grid | getGrid () const |
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.
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.
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.
|
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 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.
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.
|
inline |
returns whether the constraint element is affine.
|
inline |
returns whether the constraint element is convex.
|
inline |
returns whether the constraint element is convex.
Assignment operator (deep copy).
Definition at line 139 of file acado/objective/lsq_term.cpp.
|
inline |
Sets the discretization grid.
returnValue LSQTerm::setReference | ( | const VariablesGrid & | ref | ) |
overwrites the reference vector r
Definition at line 591 of file acado/objective/lsq_term.cpp.
|
protected |
a tracking reference
Definition at line 170 of file lsq_term.hpp.
|
protected |
a tracking reference
Definition at line 167 of file lsq_term.hpp.
|
protected |
a symmetric weighting matrix
Definition at line 169 of file lsq_term.hpp.
|
protected |
specific intermediate results
to be stored for backward
differentiation
Definition at line 172 of file lsq_term.hpp.
|
protected |
a symmetric weighting matrix
Definition at line 166 of file lsq_term.hpp.