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

Public Member Functions | |
| returnValue | evaluate (const OCPiterate &x) |
| returnValue | evaluateSensitivities (BlockMatrix *hessian) |
| returnValue | evaluateSensitivitiesGN (BlockMatrix *GNhessian) |
| returnValue | init (const Grid &grid_, const DMatrix &S_, const Function &m_, const DVector &r_) |
| BooleanType | isAffine () |
| BooleanType | isConvex () |
| BooleanType | isQuadratic () |
| LSQEndTerm () | |
| LSQEndTerm (const Grid &grid_, const DMatrix &S_, const Function &m_, const DVector &r_) | |
| LSQEndTerm (const LSQEndTerm &rhs) | |
| LSQEndTerm & | operator= (const LSQEndTerm &rhs) |
| returnValue | setReference (const DVector &ref) |
| virtual | ~LSQEndTerm () |
Protected Attributes | |
| DVector | r |
| DMatrix | S |
| double * | S_h_res |
Stores and evaluates LSQ mayer terms within optimal control problems.
The class LSQEndTerm allows to manage and evaluate least square objective mayer terms
of the general form:
0.5* || S * ( m(T,x(T),p(T),...) - r ) ||^2_2
Here the T is the time at the last grid point of the objective grid.
Definition at line 61 of file lsq_end_term.hpp.
Default constructor.
Definition at line 51 of file lsq_end_term.cpp.
| LSQEndTerm::LSQEndTerm | ( | const Grid & | grid_, |
| const DMatrix & | S_, | ||
| const Function & | m_, | ||
| const DVector & | r_ | ||
| ) |
Default constructor.
| grid_ | the objective grid |
| S_ | the weighting matrix |
| m_ | the LSQ function |
| r_ | the reference vector |
Definition at line 58 of file lsq_end_term.cpp.
| LSQEndTerm::LSQEndTerm | ( | const LSQEndTerm & | rhs | ) |
Copy constructor (deep copy).
Definition at line 70 of file lsq_end_term.cpp.
| LSQEndTerm::~LSQEndTerm | ( | ) | [virtual] |
Destructor.
Definition at line 80 of file lsq_end_term.cpp.
| returnValue LSQEndTerm::evaluate | ( | const OCPiterate & | x | ) |
Definition at line 103 of file lsq_end_term.cpp.
| returnValue LSQEndTerm::evaluateSensitivities | ( | BlockMatrix * | hessian | ) |
Evaluates the objective gradient contribution from this term
and computes the corresponding exact hessian.
Definition at line 136 of file lsq_end_term.cpp.
| returnValue LSQEndTerm::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 143 of file lsq_end_term.cpp.
| returnValue LSQEndTerm::init | ( | const Grid & | grid_, |
| const DMatrix & | S_, | ||
| const Function & | m_, | ||
| const DVector & | r_ | ||
| ) | [inline] |
| grid_ | the objective grid |
| S_ | the weighting matrix |
| m_ | the LSQ function |
| r_ | the reference vectors |
| BooleanType LSQEndTerm::isAffine | ( | ) | [inline] |
returns whether the constraint element is affine.
| BooleanType LSQEndTerm::isConvex | ( | ) | [inline] |
returns whether the constraint element is convex.
| BooleanType LSQEndTerm::isQuadratic | ( | ) | [inline] |
returns whether the constraint element is convex.
| LSQEndTerm & LSQEndTerm::operator= | ( | const LSQEndTerm & | rhs | ) |
Assignment operator (deep copy).
Definition at line 86 of file lsq_end_term.cpp.
| returnValue LSQEndTerm::setReference | ( | const DVector & | ref | ) | [inline] |
overwrites the reference vector r
DVector LSQEndTerm::r [protected] |
a tracking reference
Definition at line 159 of file lsq_end_term.hpp.
DMatrix LSQEndTerm::S [protected] |
a symmetric weighting matrix
Definition at line 158 of file lsq_end_term.hpp.
double* LSQEndTerm::S_h_res [protected] |
specific intermediate results
to be stored for backward
differentiation
Definition at line 161 of file lsq_end_term.hpp.