GCOP  1.0
Public Types | Public Member Functions | Public Attributes
gcop::LsCost< T, _nx, _nu, _np, _ng, Tc > Class Template Reference

#include <lscost.h>

Inheritance diagram for gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >:
Inheritance graph
[legend]
Collaboration diagram for gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
class gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >

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


Member Typedef Documentation

template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
typedef Matrix<double, _nu, _nu> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixcd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
typedef Matrix<double, _nu, _nx> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixcnd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
typedef Matrix<double, _ng, _np> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixgpd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
typedef Matrix<double, _ng, _nu> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixgud
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
typedef Matrix<double, _ng, _nx> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixgxd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
typedef Matrix<double, _np, _np> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixmd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
typedef Matrix<double, _np, _nx> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixmnd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
typedef Matrix<double, _nx, _nu> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixncd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
typedef Matrix<double, _nx, _nx> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixnd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
typedef Matrix<double, _nx, _np> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Matrixnmd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
typedef Matrix<double, _nu, 1> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Vectorcd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
typedef Matrix<double, _ng, 1> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Vectorgd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
typedef Matrix<double, _np, 1> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Vectormd
template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
typedef Matrix<double, _nx, 1> gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::Vectornd

Constructor & Destructor Documentation

template<typename T, int _nx, int _nu, int _np, int _ng, typename Tc >
gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::LsCost ( System< T, _nx, _nu, _np > &  sys,
double  tf,
int  ng = 0 
)

_nureate a _nuost interfacex

Parameters:
Xthe state manifold which is used to perform addition/subtraction of states
tftime 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
ngnumber of residuals per time-step

References gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::g.


Member Function Documentation

template<typename T, int _nx, int _nu, int _np, int _ng, typename Tc >
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

Parameters:
gresidual
ttime
xstate
ucontrol
htime-step
pparameter (optional)
dgdxderivative wrt x
dgduderivative wrt u
dgdpderivative 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 >.


Member Data Documentation

template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
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().

template<typename T = VectorXd, int _nx = Dynamic, int _nu = Dynamic, int _np = Dynamic, int _ng = Dynamic, typename Tc = T>
int gcop::LsCost< T, _nx, _nu, _np, _ng, Tc >::ng

number of residuals per time-step


The documentation for this class was generated from the following file: