Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

Data class for storing generic optimization variables. More...

#include <ocp_iterate.hpp>

List of all members.

Public Member Functions

returnValue allocateAll ()
returnValue applyStep (const BlockMatrix &bm, double alpha)
BooleanType areGridsConsistent ()
returnValue clear ()
returnValue enableSimulationMode ()
Grid getGrid () const
returnValue getInitialData (DVector &x_=emptyVector, DVector &xa_=emptyVector, DVector &p_=emptyVector, DVector &u_=emptyVector, DVector &w_=emptyVector) const
uint getNP () const
uint getNU () const
uint getNumPoints () const
uint getNW () const
uint getNX () const
uint getNXA () const
DVector getP (const uint &idx) const
double getTime (const uint &idx) const
DVector getU (const uint &idx) const
Grid getUnionGrid () const
DVector getW (const uint &idx) const
DVector getX (const uint &idx) const
DVector getXA (const uint &idx) const
returnValue init (const VariablesGrid *const _x, const VariablesGrid *const _xa, const VariablesGrid *const _p, const VariablesGrid *const _u, const VariablesGrid *const _w)
BooleanType isInSimulationMode () const
 OCPiterate ()
 OCPiterate (const VariablesGrid *const _x, const VariablesGrid *const _xa, const VariablesGrid *const _p, const VariablesGrid *const _u, const VariablesGrid *const _w)
 OCPiterate (const OCPiterate &rhs)
OCPiterateoperator= (const OCPiterate &rhs)
returnValue print () const
virtual returnValue shift (double timeShift=-1.0, DVector lastX=emptyVector, DVector lastXA=emptyVector, DVector lastP=emptyVector, DVector lastU=emptyVector, DVector lastW=emptyVector)
returnValue updateData (double t, DVector &x_=emptyVector, DVector &xa_=emptyVector, DVector &p_=emptyVector, DVector &u_=emptyVector, DVector &w_=emptyVector)
virtual ~OCPiterate ()

Public Attributes

VariablesGridp
VariablesGridu
VariablesGridw
VariablesGridx
VariablesGridxa

Protected Member Functions

void copy (const OCPiterate &rhs)
DVector copy (const VariablesGrid *z, const uint &idx) const
uint getDim (VariablesGrid *z) const
void update (double t, VariablesGrid &z1, DVector &z2) const

Protected Attributes

BooleanType inSimulationMode

Detailed Description

Data class for storing generic optimization variables.

The class OCPiterate is a data class to store generic optimization variables as arising in the optimal control context. (Philosophy: This class is used liked a struct with some add-on functionality.)

Author:
Boris Houska, Hans Joachim Ferreau

Definition at line 57 of file ocp_iterate.hpp.


Constructor & Destructor Documentation

Default constructor.

Definition at line 43 of file ocp_iterate.cpp.

OCPiterate::OCPiterate ( const VariablesGrid *const  _x,
const VariablesGrid *const  _xa,
const VariablesGrid *const  _p,
const VariablesGrid *const  _u,
const VariablesGrid *const  _w 
)

Definition at line 55 of file ocp_iterate.cpp.

Copy constructor (deep copy).

Definition at line 69 of file ocp_iterate.cpp.

OCPiterate::~OCPiterate ( ) [virtual]

Destructor.

Definition at line 75 of file ocp_iterate.cpp.


Member Function Documentation

Definition at line 92 of file ocp_iterate.cpp.

returnValue OCPiterate::applyStep ( const BlockMatrix bm,
double  alpha 
)

Definition at line 328 of file ocp_iterate.cpp.

Definition at line 197 of file ocp_iterate.cpp.

Definition at line 140 of file ocp_iterate.cpp.

void OCPiterate::copy ( const OCPiterate rhs) [protected]

Definition at line 436 of file ocp_iterate.cpp.

DVector OCPiterate::copy ( const VariablesGrid z,
const uint idx 
) const [inline, protected]

Definition at line 381 of file ocp_iterate.cpp.

uint OCPiterate::getDim ( VariablesGrid z) const [inline, protected]
Grid OCPiterate::getGrid ( ) const [inline]

Definition at line 278 of file ocp_iterate.cpp.

uint OCPiterate::getNP ( ) const [inline]

Returns the dimension of the parameter vector.

uint OCPiterate::getNU ( ) const [inline]

Returns the dimension of the control vector.

Definition at line 155 of file ocp_iterate.cpp.

uint OCPiterate::getNW ( ) const [inline]

Returns the dimension of the disturbance vector.

uint OCPiterate::getNX ( ) const [inline]

Assignment operator (deep copy). Returns the dimension of the differential state vector.

uint OCPiterate::getNXA ( ) const [inline]

Returns the dimension of the algebraic state vector.

DVector OCPiterate::getP ( const uint idx) const [inline]
double OCPiterate::getTime ( const uint idx) const [inline]
DVector OCPiterate::getU ( const uint idx) const [inline]

Returns the union grid of all members, i.e. x, xa, p, u, and w.

Returns:
The requested union grid.

Definition at line 182 of file ocp_iterate.cpp.

DVector OCPiterate::getW ( const uint idx) const [inline]
DVector OCPiterate::getX ( const uint idx) const [inline]
DVector OCPiterate::getXA ( const uint idx) const [inline]
returnValue OCPiterate::init ( const VariablesGrid *const  _x,
const VariablesGrid *const  _xa,
const VariablesGrid *const  _p,
const VariablesGrid *const  _u,
const VariablesGrid *const  _w 
)

Definition at line 112 of file ocp_iterate.cpp.

OCPiterate & OCPiterate::operator= ( const OCPiterate rhs)

Assignment operator (deep copy).

Definition at line 81 of file ocp_iterate.cpp.

Definition at line 169 of file ocp_iterate.cpp.

returnValue OCPiterate::shift ( double  timeShift = -1.0,
DVector  lastX = emptyVector,
DVector  lastXA = emptyVector,
DVector  lastP = emptyVector,
DVector  lastU = emptyVector,
DVector  lastW = emptyVector 
) [virtual]

Shifts all grids by given amount.

Returns:
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS

Definition at line 396 of file ocp_iterate.cpp.

void OCPiterate::update ( double  t,
VariablesGrid z1,
DVector z2 
) const [protected]

Definition at line 291 of file ocp_iterate.cpp.

Definition at line 314 of file ocp_iterate.cpp.


Member Data Documentation

Definition at line 213 of file ocp_iterate.hpp.

Definition at line 188 of file ocp_iterate.hpp.

Definition at line 189 of file ocp_iterate.hpp.

Definition at line 190 of file ocp_iterate.hpp.

Definition at line 186 of file ocp_iterate.hpp.

Definition at line 187 of file ocp_iterate.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:40:25