GCOP  1.0
Public Member Functions | Public Attributes
gcop::PDdp< T, n, c, np > Class Template Reference

#include <pddp.h>

Inheritance diagram for gcop::PDdp< T, n, c, np >:
Inheritance graph
[legend]
Collaboration diagram for gcop::PDdp< T, n, c, np >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PDdp (System< T, n, c, np > &sys, Cost< T, n, c, np > &cost, vector< double > &ts, vector< T > &xs, vector< Vectorcd > &us, Vectormd &p, int dynParams=0, bool update=true)
void Iterate ()
void Update (bool der=true)
void Forward ()
void Backward ()
bool pdX (const MatrixXd &P)

Public Attributes

int m
 parameter space dimension
int dynParams
 number of dynamic parameters (that the dynamics depend on)
VectorXd & p
 reference to parameters being optimized
VectorXd dp
 computed parameter increment
std::vector< Matrixnmd > Cs
std::vector< MatrixXd > Kuxs
VectorXd Lxa
MatrixXd Lxxa
Vectorcd Lu
Matrixcd Luu
MatrixXd Lxua
VectorXd v
MatrixXd P
double nu
 current regularization factor nu
double nu0
 minimum regularization factor nu
double dnu0
 regularization factor modification step-size
bool printDebug

template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
class gcop::PDdp< T, n, c, np >


Constructor & Destructor Documentation

template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
gcop::PDdp< T, n, c, np >::PDdp ( System< T, n, c, np > &  sys,
Cost< T, n, c, np > &  cost,
vector< double > &  ts,
vector< T > &  xs,
vector< Vectorcd > &  us,
Vectormd &  p,
int  dynParams = 0,
bool  update = true 
)

Create a parameter-dependent optimal control problem using a system, a cost, and a trajectory given by a sequence of times, states, controls, and parameters. The times ts must be given, the initial state xs[0] must be set, and the controls us and parameters p will be used as an initial guess for the optimization.

After initialization, every call to Iterate() will optimize the controls us, states xs, and parameters p and modify them accordingly. Problems involving time-optimization will also modify the sequence of times ts.

Parameters:
syssystem
costcost
ts(N+1-vector) sequence of discrete times
xs(N+1-vector) sequence of discrete states
us(N-vector) sequence of control inputs
p(m-vector) parameters
dynParamshow many of these are dynamic parameters (i.e. that the dynamics depends on), the first dynParams in the parameter vector p will be regarded as the dynamic parameters
updatewhether to update trajectory xs using initial state xs[0], inputs us, and parameters p. This is necessary only if xs was not already generated.

References gcop::PDdp< T, n, c, np >::Cs, gcop::PDdp< T, n, c, np >::Kuxs, gcop::PDdp< T, n, c, np >::Lxa, gcop::PDdp< T, n, c, np >::Lxua, gcop::PDdp< T, n, c, np >::Lxxa, gcop::PDdp< T, n, c, np >::m, gcop::Ddp< T, n, c, np >::N, gcop::Manifold< T, _n >::n, gcop::PDdp< T, n, c, np >::printDebug, gcop::System< T, _nx, _nu, _np >::U, gcop::PDdp< T, n, c, np >::Update(), and gcop::System< T, _nx, _nu, _np >::X.


Member Function Documentation

template<typename T , int n, int c, int np>
void gcop::PDdp< T, n, c, np >::Backward ( )

Backward pass

Reimplemented from gcop::Ddp< T, n, c, np >.

template<typename T , int n, int c, int np>
void gcop::PDdp< T, n, c, np >::Forward ( )

Forward pass

Reimplemented from gcop::Ddp< T, n, c, np >.

template<typename T , int n, int c, int np>
void gcop::PDdp< T, n, c, np >::Iterate ( ) [virtual]

Perform one DDP iteration. Internally calls:

Backward -> Forward -> Update. The controls us and trajectory xs are updated.

Reimplemented from gcop::Ddp< T, n, c, np >.

template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
bool gcop::PDdp< T, n, c, np >::pdX ( const MatrixXd &  P) [inline]

Reimplemented from gcop::Ddp< T, n, c, np >.

template<typename T , int n, int c, int np>
void gcop::PDdp< T, n, c, np >::Update ( bool  der = true)

Update the trajectory and (optionally) its linearization

Parameters:
derwhether to update derivatives (A and B matrices)

Reimplemented from gcop::Docp< T, nx, nu, np >.

Referenced by gcop::PDdp< T, n, c, np >::PDdp().


Member Data Documentation

template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
std::vector<Matrixnmd> gcop::PDdp< T, n, c, np >::Cs
template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
double gcop::PDdp< T, n, c, np >::dnu0

regularization factor modification step-size

template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
VectorXd gcop::PDdp< T, n, c, np >::dp

computed parameter increment

template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
int gcop::PDdp< T, n, c, np >::dynParams

number of dynamic parameters (that the dynamics depend on)

template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
std::vector<MatrixXd> gcop::PDdp< T, n, c, np >::Kuxs

Reimplemented from gcop::Ddp< T, n, c, np >.

Referenced by gcop::PDdp< T, n, c, np >::PDdp().

template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
Vectorcd gcop::PDdp< T, n, c, np >::Lu

Reimplemented from gcop::Ddp< T, n, c, np >.

template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
Matrixcd gcop::PDdp< T, n, c, np >::Luu

Reimplemented from gcop::Ddp< T, n, c, np >.

template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
VectorXd gcop::PDdp< T, n, c, np >::Lxa
template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
MatrixXd gcop::PDdp< T, n, c, np >::Lxua
template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
MatrixXd gcop::PDdp< T, n, c, np >::Lxxa
template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
int gcop::PDdp< T, n, c, np >::m

parameter space dimension

Referenced by gcop::PDdp< T, n, c, np >::PDdp().

template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
double gcop::PDdp< T, n, c, np >::nu

current regularization factor nu

template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
double gcop::PDdp< T, n, c, np >::nu0

minimum regularization factor nu

template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
VectorXd& gcop::PDdp< T, n, c, np >::p

reference to parameters being optimized

Reimplemented from gcop::Docp< T, nx, nu, np >.

template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
MatrixXd gcop::PDdp< T, n, c, np >::P

Reimplemented from gcop::Ddp< T, n, c, np >.

template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
bool gcop::PDdp< T, n, c, np >::printDebug
template<typename T, int n = Dynamic, int c = Dynamic, int np = Dynamic>
VectorXd gcop::PDdp< T, n, c, np >::v

Reimplemented from gcop::Ddp< T, n, c, np >.


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