GCOP  1.0
Public Member Functions | Public Attributes
gcop::Docp< T, nx, nu, np > Class Template Reference

#include <docp.h>

Inheritance diagram for gcop::Docp< T, nx, nu, np >:
Inheritance graph
[legend]
Collaboration diagram for gcop::Docp< T, nx, nu, np >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Docp (System< T, nx, nu, np > &sys, Cost< T, nx, nu, np > &cost, vector< double > &ts, vector< T > &xs, vector< Vectorcd > &us, Vectormd *p=0, bool update=true)
virtual ~Docp ()
virtual void Iterate ()
void Update (bool der=true)

Public Attributes

System< T, nx, nu, np > & sys
 dynamical system
Cost< T, nx, nu, np > & cost
 given cost function
std::vector< double > & ts
 times (N+1) vector
std::vector< T > & xs
 states (N+1) vector
std::vector< Vectorcd > & us
 controls (N) vector
Vectormd * p
 parameter vector
std::vector< Matrixnd > As
 state jacobians along the path (computed internally)
std::vector< Matrixncd > Bs
 control jacobians along the path (computed internally)
bool debug
 whether to display debugging info
double eps
 epsilon used for finite differences
double J
 Optimal cost at any point of time.
int nofevaluations
 Number of Function evaluations at any point of time.

template<typename T, int nx = Dynamic, int nu = Dynamic, int np = Dynamic>
class gcop::Docp< T, nx, nu, np >


Constructor & Destructor Documentation

template<typename T, int nx, int nu, int np>
gcop::Docp< T, nx, nu, np >::Docp ( System< T, nx, nu, np > &  sys,
Cost< T, nx, nu, np > &  cost,
vector< double > &  ts,
vector< T > &  xs,
vector< Vectorcd > &  us,
Vectormd *  p = 0,
bool  update = true 
)

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

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

Parameters:
syssystem
costcost
ts(N+1) sequence of discrete times
xs(N+1) sequence of discrete states
us(N) sequence of control inputs
updatewhether to update trajectory xs using initial state xs[0] and inputs us. This is necessary only if xs was not already generated from us.

References gcop::Docp< T, nx, nu, np >::As, gcop::Docp< T, nx, nu, np >::Bs, gcop::Manifold< T, _n >::n, gcop::System< T, _nx, _nu, _np >::U, gcop::Docp< T, nx, nu, np >::Update(), gcop::Docp< T, nx, nu, np >::us, and gcop::System< T, _nx, _nu, _np >::X.

template<typename T , int nx, int nu, int np>
gcop::Docp< T, nx, nu, np >::~Docp ( ) [virtual]

Member Function Documentation

template<typename T , int nx, int nu, int np>
void gcop::Docp< T, nx, nu, np >::Iterate ( ) [virtual]
template<typename T , int nx, int nu, int np>
void gcop::Docp< T, nx, nu, np >::Update ( bool  der = true)

Update the trajectory and (optionally) its linearization

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

Reimplemented in gcop::PDdp< T, n, c, np >, gcop::PDdp< Body2dState, 6, 3 >, and gcop::PDdp< Matrix3d, 3, 3 >.

Referenced by gcop::Ddp< T, nx, nu, np >::Ddp(), gcop::Docp< T, nx, nu, np >::Docp(), and gcop::SDdp< T, nx, nu, np >::SDdp().


Member Data Documentation

template<typename T, int nx = Dynamic, int nu = Dynamic, int np = Dynamic>
std::vector<Matrixnd> gcop::Docp< T, nx, nu, np >::As

state jacobians along the path (computed internally)

Referenced by gcop::Docp< T, nx, nu, np >::Docp().

template<typename T, int nx = Dynamic, int nu = Dynamic, int np = Dynamic>
std::vector<Matrixncd> gcop::Docp< T, nx, nu, np >::Bs

control jacobians along the path (computed internally)

Referenced by gcop::Docp< T, nx, nu, np >::Docp().

template<typename T, int nx = Dynamic, int nu = Dynamic, int np = Dynamic>
Cost<T, nx, nu, np>& gcop::Docp< T, nx, nu, np >::cost

given cost function

template<typename T, int nx = Dynamic, int nu = Dynamic, int np = Dynamic>
bool gcop::Docp< T, nx, nu, np >::debug

whether to display debugging info

template<typename T, int nx = Dynamic, int nu = Dynamic, int np = Dynamic>
double gcop::Docp< T, nx, nu, np >::eps

epsilon used for finite differences

template<typename T, int nx = Dynamic, int nu = Dynamic, int np = Dynamic>
double gcop::Docp< T, nx, nu, np >::J

Optimal cost at any point of time.

template<typename T, int nx = Dynamic, int nu = Dynamic, int np = Dynamic>
int gcop::Docp< T, nx, nu, np >::nofevaluations

Number of Function evaluations at any point of time.

Referenced by gcop::SDdp< T, nx, nu, np >::SDdp().

template<typename T, int nx = Dynamic, int nu = Dynamic, int np = Dynamic>
Vectormd* gcop::Docp< T, nx, nu, np >::p
template<typename T, int nx = Dynamic, int nu = Dynamic, int np = Dynamic>
System<T, nx, nu, np>& gcop::Docp< T, nx, nu, np >::sys

dynamical system

template<typename T, int nx = Dynamic, int nu = Dynamic, int np = Dynamic>
std::vector<double>& gcop::Docp< T, nx, nu, np >::ts

times (N+1) vector

template<typename T, int nx = Dynamic, int nu = Dynamic, int np = Dynamic>
std::vector<Vectorcd>& gcop::Docp< T, nx, nu, np >::us
template<typename T, int nx = Dynamic, int nu = Dynamic, int np = Dynamic>
std::vector<T>& gcop::Docp< T, nx, nu, np >::xs

states (N+1) vector

Referenced by gcop::SDdp< T, nx, nu, np >::SDdp().


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