GCOP
1.0
|
#include <lscost.h>
Public Types | |
typedef Matrix< double, _ng, 1 > | Vectorgd |
typedef Matrix< double, _ng, _nx > | Matrixgxd |
typedef Matrix< double, _ng, _nu > | Matrixgud |
typedef Matrix< double, _ng, _np > | Matrixgpd |
typedef Matrix< double, _nx, 1 > | Vectornd |
typedef Matrix< double, _nu, 1 > | Vectorcd |
typedef Matrix< double, _np, 1 > | Vectormd |
typedef Matrix< double, _nx, _nx > | Matrixnd |
typedef Matrix< double, _nx, _nu > | Matrixncd |
typedef Matrix< double, _nu, _nx > | Matrixcnd |
typedef Matrix< double, _nu, _nu > | Matrixcd |
typedef Matrix< double, _np, _np > | Matrixmd |
typedef Matrix< double, _nx, _np > | Matrixnmd |
typedef Matrix< double, _np, _nx > | Matrixmnd |
Public Member Functions | |
LsCost (System< T, _nx, _nu, _np > &sys, double tf, int ng=0) | |
virtual bool | Res (Vectorgd &g, double t, const T &x, const Vectorcd &u, double h, const Vectormd *p=0, Matrixgxd *dgdx=0, Matrixgud *dgdu=0, Matrixgpd *dgdp=0) |
Public Attributes | |
int | ng |
number of residuals per time-step | |
Vectorgd | g |
residuals per time-step |
Cost interface for optimal control on manifolds. Defines a cost function and means to compute difference between two states on a manifold.
Subclasses should provide implementation of either a regular const function L or a parameter-dependent cost function Lp (e.g. for sys id / adaptive control / optimal design problems)
Author: Marin Kobilarov marin(at)jhu.edu
typedef Matrix<double, _nu, _nu> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixcd |
Reimplemented from gcop::Cost< T, _nx, _nu, _np, Tc >.
Reimplemented in gcop::ConstraintCost< T, _nx, _nu, _np, _ng >, gcop::ConstraintCost< T, _nx, _nu, _np, 1 >, gcop::LqCost< T, _nx, _nu, _np, _ng >, gcop::PqpDemCost< T, _nx, _nu, _np >, gcop::LqCost< M3V2d, 5, 2 >, gcop::LqCost< MbsState< nb >, MBS_DIM(nb), c >, gcop::LqCost< Body2dState, 6, c, Dynamic, 9 >, gcop::LqCost< Body3dState, 12, c, Dynamic, 6 >, gcop::LqCost< M3V2d, 5, 2, Dynamic, 7 >, gcop::LqCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng >, gcop::LqCost< Matrix4d, 6, _nu >, and gcop::Body2dCost< c >.
typedef Matrix<double, _nu, _nx> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixcnd |
Reimplemented from gcop::Cost< T, _nx, _nu, _np, Tc >.
Reimplemented in gcop::ConstraintCost< T, _nx, _nu, _np, _ng >, gcop::ConstraintCost< T, _nx, _nu, _np, 1 >, gcop::LqCost< T, _nx, _nu, _np, _ng >, gcop::PqpDemCost< T, _nx, _nu, _np >, gcop::LqCost< M3V2d, 5, 2 >, gcop::LqCost< MbsState< nb >, MBS_DIM(nb), c >, gcop::LqCost< Body2dState, 6, c, Dynamic, 9 >, gcop::LqCost< Body3dState, 12, c, Dynamic, 6 >, gcop::LqCost< M3V2d, 5, 2, Dynamic, 7 >, gcop::LqCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng >, and gcop::LqCost< Matrix4d, 6, _nu >.
typedef Matrix<double, _ng, _np> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixgpd |
Reimplemented in gcop::LqCost< T, _nx, _nu, _np, _ng >, gcop::PqpDemCost< T, _nx, _nu, _np >, gcop::LqCost< M3V2d, 5, 2 >, gcop::LqCost< MbsState< nb >, MBS_DIM(nb), c >, gcop::LqCost< Body2dState, 6, c, Dynamic, 9 >, gcop::LqCost< Body3dState, 12, c, Dynamic, 6 >, gcop::LqCost< M3V2d, 5, 2, Dynamic, 7 >, gcop::LqCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng >, and gcop::LqCost< Matrix4d, 6, _nu >.
typedef Matrix<double, _ng, _nu> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixgud |
Reimplemented in gcop::LqCost< T, _nx, _nu, _np, _ng >, gcop::PqpDemCost< T, _nx, _nu, _np >, gcop::LqCost< M3V2d, 5, 2 >, gcop::LqCost< MbsState< nb >, MBS_DIM(nb), c >, gcop::LqCost< Body2dState, 6, c, Dynamic, 9 >, gcop::LqCost< Body3dState, 12, c, Dynamic, 6 >, gcop::LqCost< M3V2d, 5, 2, Dynamic, 7 >, gcop::LqCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng >, and gcop::LqCost< Matrix4d, 6, _nu >.
typedef Matrix<double, _ng, _nx> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixgxd |
Reimplemented in gcop::LqCost< T, _nx, _nu, _np, _ng >, gcop::PqpDemCost< T, _nx, _nu, _np >, gcop::LqCost< M3V2d, 5, 2 >, gcop::LqCost< MbsState< nb >, MBS_DIM(nb), c >, gcop::LqCost< Body2dState, 6, c, Dynamic, 9 >, gcop::LqCost< Body3dState, 12, c, Dynamic, 6 >, gcop::LqCost< M3V2d, 5, 2, Dynamic, 7 >, gcop::LqCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng >, and gcop::LqCost< Matrix4d, 6, _nu >.
typedef Matrix<double, _np, _np> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixmd |
Reimplemented from gcop::Cost< T, _nx, _nu, _np, Tc >.
Reimplemented in gcop::ConstraintCost< T, _nx, _nu, _np, _ng >, gcop::ConstraintCost< T, _nx, _nu, _np, 1 >, gcop::LqCost< T, _nx, _nu, _np, _ng >, gcop::PqpDemCost< T, _nx, _nu, _np >, gcop::LqCost< M3V2d, 5, 2 >, gcop::LqCost< MbsState< nb >, MBS_DIM(nb), c >, gcop::LqCost< Body2dState, 6, c, Dynamic, 9 >, gcop::LqCost< Body3dState, 12, c, Dynamic, 6 >, gcop::LqCost< M3V2d, 5, 2, Dynamic, 7 >, gcop::LqCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng >, and gcop::LqCost< Matrix4d, 6, _nu >.
typedef Matrix<double, _np, _nx> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixmnd |
Reimplemented from gcop::Cost< T, _nx, _nu, _np, Tc >.
Reimplemented in gcop::ConstraintCost< T, _nx, _nu, _np, _ng >, gcop::ConstraintCost< T, _nx, _nu, _np, 1 >, gcop::LqCost< T, _nx, _nu, _np, _ng >, gcop::PqpDemCost< T, _nx, _nu, _np >, gcop::LqCost< M3V2d, 5, 2 >, gcop::LqCost< MbsState< nb >, MBS_DIM(nb), c >, gcop::LqCost< Body2dState, 6, c, Dynamic, 9 >, gcop::LqCost< Body3dState, 12, c, Dynamic, 6 >, gcop::LqCost< M3V2d, 5, 2, Dynamic, 7 >, gcop::LqCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng >, and gcop::LqCost< Matrix4d, 6, _nu >.
typedef Matrix<double, _nx, _nu> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixncd |
Reimplemented from gcop::Cost< T, _nx, _nu, _np, Tc >.
Reimplemented in gcop::ConstraintCost< T, _nx, _nu, _np, _ng >, gcop::ConstraintCost< T, _nx, _nu, _np, 1 >, gcop::LqCost< T, _nx, _nu, _np, _ng >, gcop::PqpDemCost< T, _nx, _nu, _np >, gcop::LqCost< M3V2d, 5, 2 >, gcop::LqCost< MbsState< nb >, MBS_DIM(nb), c >, gcop::LqCost< Body2dState, 6, c, Dynamic, 9 >, gcop::LqCost< Body3dState, 12, c, Dynamic, 6 >, gcop::LqCost< M3V2d, 5, 2, Dynamic, 7 >, gcop::LqCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng >, and gcop::LqCost< Matrix4d, 6, _nu >.
typedef Matrix<double, _nx, _nx> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixnd |
Reimplemented from gcop::Cost< T, _nx, _nu, _np, Tc >.
Reimplemented in gcop::ConstraintCost< T, _nx, _nu, _np, _ng >, gcop::ConstraintCost< T, _nx, _nu, _np, 1 >, gcop::LqCost< T, _nx, _nu, _np, _ng >, gcop::PqpDemCost< T, _nx, _nu, _np >, gcop::LqCost< M3V2d, 5, 2 >, gcop::LqCost< MbsState< nb >, MBS_DIM(nb), c >, gcop::LqCost< Body2dState, 6, c, Dynamic, 9 >, gcop::LqCost< Body3dState, 12, c, Dynamic, 6 >, gcop::LqCost< M3V2d, 5, 2, Dynamic, 7 >, gcop::LqCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng >, and gcop::LqCost< Matrix4d, 6, _nu >.
typedef Matrix<double, _nx, _np> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixnmd |
Reimplemented from gcop::Cost< T, _nx, _nu, _np, Tc >.
Reimplemented in gcop::ConstraintCost< T, _nx, _nu, _np, _ng >, gcop::ConstraintCost< T, _nx, _nu, _np, 1 >, gcop::LqCost< T, _nx, _nu, _np, _ng >, gcop::PqpDemCost< T, _nx, _nu, _np >, gcop::LqCost< M3V2d, 5, 2 >, gcop::LqCost< MbsState< nb >, MBS_DIM(nb), c >, gcop::LqCost< Body2dState, 6, c, Dynamic, 9 >, gcop::LqCost< Body3dState, 12, c, Dynamic, 6 >, gcop::LqCost< M3V2d, 5, 2, Dynamic, 7 >, gcop::LqCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng >, and gcop::LqCost< Matrix4d, 6, _nu >.
typedef Matrix<double, _nu, 1> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Vectorcd |
Reimplemented from gcop::Cost< T, _nx, _nu, _np, Tc >.
Reimplemented in gcop::ConstraintCost< T, _nx, _nu, _np, _ng >, gcop::ConstraintCost< T, _nx, _nu, _np, 1 >, gcop::LqCost< T, _nx, _nu, _np, _ng >, gcop::PqpDemCost< T, _nx, _nu, _np >, gcop::LqCost< M3V2d, 5, 2 >, gcop::LqCost< MbsState< nb >, MBS_DIM(nb), c >, gcop::LqCost< Body2dState, 6, c, Dynamic, 9 >, gcop::LqCost< Body3dState, 12, c, Dynamic, 6 >, gcop::LqCost< M3V2d, 5, 2, Dynamic, 7 >, gcop::LqCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng >, gcop::LqCost< Matrix4d, 6, _nu >, and gcop::Body2dCost< c >.
typedef Matrix<double, _ng, 1> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Vectorgd |
Reimplemented in gcop::ConstraintCost< T, _nx, _nu, _np, _ng >, gcop::ConstraintCost< T, _nx, _nu, _np, 1 >, gcop::LqCost< T, _nx, _nu, _np, _ng >, gcop::PqpDemCost< T, _nx, _nu, _np >, gcop::LqCost< M3V2d, 5, 2 >, gcop::LqCost< MbsState< nb >, MBS_DIM(nb), c >, gcop::LqCost< Body2dState, 6, c, Dynamic, 9 >, gcop::LqCost< Body3dState, 12, c, Dynamic, 6 >, gcop::LqCost< M3V2d, 5, 2, Dynamic, 7 >, gcop::LqCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng >, and gcop::LqCost< Matrix4d, 6, _nu >.
typedef Matrix<double, _np, 1> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Vectormd |
Reimplemented from gcop::Cost< T, _nx, _nu, _np, Tc >.
Reimplemented in gcop::ConstraintCost< T, _nx, _nu, _np, _ng >, gcop::ConstraintCost< T, _nx, _nu, _np, 1 >, gcop::LqCost< T, _nx, _nu, _np, _ng >, gcop::PqpDemCost< T, _nx, _nu, _np >, gcop::LqCost< M3V2d, 5, 2 >, gcop::LqCost< MbsState< nb >, MBS_DIM(nb), c >, gcop::LqCost< Body2dState, 6, c, Dynamic, 9 >, gcop::LqCost< Body3dState, 12, c, Dynamic, 6 >, gcop::LqCost< M3V2d, 5, 2, Dynamic, 7 >, gcop::LqCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng >, and gcop::LqCost< Matrix4d, 6, _nu >.
typedef Matrix<double, _nx, 1> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Vectornd |
Reimplemented from gcop::Cost< T, _nx, _nu, _np, Tc >.
Reimplemented in gcop::ConstraintCost< T, _nx, _nu, _np, _ng >, gcop::ConstraintCost< T, _nx, _nu, _np, 1 >, gcop::LqCost< T, _nx, _nu, _np, _ng >, gcop::PqpDemCost< T, _nx, _nu, _np >, gcop::LqCost< M3V2d, 5, 2 >, gcop::LqCost< MbsState< nb >, MBS_DIM(nb), c >, gcop::LqCost< Body2dState, 6, c, Dynamic, 9 >, gcop::LqCost< Body3dState, 12, c, Dynamic, 6 >, gcop::LqCost< M3V2d, 5, 2, Dynamic, 7 >, gcop::LqCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng >, and gcop::LqCost< Matrix4d, 6, _nu >.
gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::LsCost | ( | System< T, _nx, _nu, _np > & | sys, |
double | tf, | ||
int | ng = 0 |
||
) |
_nureate a _nuost interfacex
X | the state manifold which is used to perform addition/subtraction of states |
tf | time horizon: when the cost function L is called it will internally check whether its argument t is equation to tf and return the terminal cost |
ng | number of residuals per time-step |
References gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::g.
bool gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Res | ( | Vectorgd & | g, |
double | t, | ||
const T & | x, | ||
const Vectorcd & | u, | ||
double | h, | ||
const Vectormd * | p = 0 , |
||
Matrixgxd * | dgdx = 0 , |
||
Matrixgud * | dgdu = 0 , |
||
Matrixgpd * | dgdp = 0 |
||
) | [virtual] |
Residual cost
g | residual |
t | time |
x | state |
u | control |
h | time-step |
p | parameter (optional) |
dgdx | derivative wrt x |
dgdu | derivative wrt u |
dgdp | derivative wrt p |
Reimplemented in gcop::LqCost< T, _nx, _nu, _np, _ng >, gcop::LqCost< Body2dState, 6, c, Dynamic, 9 >, gcop::LqCost< Body3dState, 12, c, Dynamic, 6 >, gcop::LqCost< M3V2d, 5, 2, Dynamic, 7 >, and gcop::LqCost< Matrix< double, _nx, 1 >, _nx, _nu, _np, _ng >.
Vectorgd gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::g |
residuals per time-step
Referenced by gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::LsCost().
int gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::ng |
number of residuals per time-step