GCOP
1.0
|
#include <gndocp.h>
Public Member Functions | |
GnDocp (System< T, _nx, _nu, _np > &sys, LqCost< T, _nx, _nu, _np, _ng > &cost, Tparam< T, _nx, _nu, _np, _ntp > &tparam, vector< double > &ts, vector< T > &xs, vector< Vectorcd > &us, Vectormd *p=0, bool update=true) | |
virtual | ~GnDocp () |
void | Iterate () |
GnDocp (System< T, _nx, _nu, _np > &sys, LqCost< T, _nx, _nu, _np, _ng > &cost, Tparam< T, _nx, _nu, _np, _ntp > &tparam, vector< double > &ts, vector< T > &xs, vector< Vectorcd > &us, Vectormd *p=0, bool update=true) | |
virtual | ~GnDocp () |
void | Iterate () |
Public Attributes | |
Tparam< T, _nx, _nu, _np, _ntp > & | tparam |
int | info |
double | fnorm |
double | covfac |
int | inputs |
int | values |
double | numdiff_stepsize |
The step size for perturbations. | |
VectorXd | s |
optimization vector | |
GnCost< T, _nx, _nu, _np, _ng, _ntp > * | functor |
NumericalDiff< GnCost< T, _nx, _nu, _np, _ng, _ntp > , NumericalDiffMode::Central > * | numDiff |
LevenbergMarquardt < NumericalDiff< GnCost< T, _nx, _nu, _np, _ng, _ntp > , NumericalDiffMode::Central > > * | lm |
SampleNumericalDiff< GnCost< T, _nx, _nu, _np, _ng, _ntp > > * | numDiff |
LevenbergMarquardt < SampleNumericalDiff< GnCost < T, _nx, _nu, _np, _ng, _ntp > > > * | lm |
gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::GnDocp | ( | System< T, _nx, _nu, _np > & | sys, |
LqCost< T, _nx, _nu, _np, _ng > & | cost, | ||
Tparam< T, _nx, _nu, _np, _ntp > & | tparam, | ||
vector< double > & | ts, | ||
vector< T > & | xs, | ||
vector< Vectorcd > & | us, | ||
Vectormd * | p = 0 , |
||
bool | update = true |
||
) |
Create an 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.
sys | system |
cost | cost |
tparam | trajectory parametrization |
ts | (N+1) sequence of discrete times |
xs | (N+1) sequence of discrete states |
us | (N) sequence of control inputs |
p | static parameter vector |
ng | |
update | whether 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 >::nofevaluations, gcop::Tparam< T, nx, nu, np, _ntp, Tc >::ntp, gcop::Tparam< T, nx, nu, np, _ntp, Tc >::To(), gcop::Docp< T, _nx, _nu, _np >::Update(), and gcop::Docp< T, _nx, _nu, _np >::us.
gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::~GnDocp | ( | ) | [virtual] |
gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::GnDocp | ( | System< T, _nx, _nu, _np > & | sys, |
LqCost< T, _nx, _nu, _np, _ng > & | cost, | ||
Tparam< T, _nx, _nu, _np, _ntp > & | tparam, | ||
vector< double > & | ts, | ||
vector< T > & | xs, | ||
vector< Vectorcd > & | us, | ||
Vectormd * | p = 0 , |
||
bool | update = true |
||
) |
Create an 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.
sys | system |
cost | cost |
tparam | trajectory parametrization |
ts | (N+1) sequence of discrete times |
xs | (N+1) sequence of discrete states |
us | (N) sequence of control inputs |
p | static parameter vector |
ng | |
update | whether to update trajectory xs using initial state xs[0] and inputs us. This is necessary only if xs was not already generated from us. |
virtual gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::~GnDocp | ( | ) | [virtual] |
void gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::Iterate | ( | ) | [virtual] |
Perform one DOCP iteration. Internally calls: are updated.
Reimplemented from gcop::Docp< T, _nx, _nu, _np >.
void gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::Iterate | ( | ) | [virtual] |
Perform one DOCP iteration. Internally calls: are updated.
Reimplemented from gcop::Docp< T, _nx, _nu, _np >.
References gcop::GnCost< T, _nx, _nu, _np, _ng, _ntp >::docp.
double gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::covfac |
double gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::fnorm |
GnCost< T, _nx, _nu, _np, _ng, _ntp > * gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::functor |
int gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::info |
int gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::inputs |
LevenbergMarquardt<SampleNumericalDiff<GnCost<T, _nx, _nu, _np, _ng, _ntp> > >* gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::lm |
LevenbergMarquardt<NumericalDiff<GnCost<T, _nx, _nu, _np, _ng, _ntp>, NumericalDiffMode::Central> >* gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::lm |
SampleNumericalDiff<GnCost<T, _nx, _nu, _np, _ng, _ntp> >* gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::numDiff |
NumericalDiff<GnCost<T, _nx, _nu, _np, _ng, _ntp>, NumericalDiffMode::Central>* gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::numDiff |
double gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::numdiff_stepsize |
The step size for perturbations.
VectorXd gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::s |
optimization vector
Tparam< T, _nx, _nu, _np, _ntp > & gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::tparam |
int gcop::GnDocp< T, _nx, _nu, _np, _ng, _ntp >::values |