Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members

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

#include <ocp_iterate.hpp>

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

BEGIN_NAMESPACE_ACADO OCPiterate::OCPiterate ( )

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.

OCPiterate::OCPiterate ( const OCPiterate rhs)

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

returnValue OCPiterate::allocateAll ( )

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.

BooleanType OCPiterate::areGridsConsistent ( )

Definition at line 197 of file ocp_iterate.cpp.

returnValue OCPiterate::clear ( )

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
inlineprotected
returnValue OCPiterate::enableSimulationMode ( )

Definition at line 381 of file ocp_iterate.cpp.

uint OCPiterate::getDim ( VariablesGrid z) const
inlineprotected
Grid OCPiterate::getGrid ( ) const
inline
returnValue OCPiterate::getInitialData ( DVector x_ = emptyVector,
DVector xa_ = emptyVector,
DVector p_ = emptyVector,
DVector u_ = emptyVector,
DVector w_ = emptyVector 
) const

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.

uint OCPiterate::getNumPoints ( ) const

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
Grid OCPiterate::getUnionGrid ( ) const

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.

BooleanType OCPiterate::isInSimulationMode ( ) const
inline
OCPiterate & OCPiterate::operator= ( const OCPiterate rhs)

Assignment operator (deep copy).

Definition at line 81 of file ocp_iterate.cpp.

returnValue OCPiterate::print ( ) const

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.

\return SUCCESSFUL_RETURN \n
        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.

returnValue OCPiterate::updateData ( double  t,
DVector x_ = emptyVector,
DVector xa_ = emptyVector,
DVector p_ = emptyVector,
DVector u_ = emptyVector,
DVector w_ = emptyVector 
)

Definition at line 314 of file ocp_iterate.cpp.

Member Data Documentation

BooleanType OCPiterate::inSimulationMode
protected

Definition at line 213 of file ocp_iterate.hpp.

VariablesGrid* OCPiterate::p

Definition at line 188 of file ocp_iterate.hpp.

VariablesGrid* OCPiterate::u

Definition at line 189 of file ocp_iterate.hpp.

VariablesGrid* OCPiterate::w

Definition at line 190 of file ocp_iterate.hpp.

VariablesGrid* OCPiterate::x

Definition at line 186 of file ocp_iterate.hpp.

VariablesGrid* OCPiterate::xa

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 Mon Jun 10 2019 12:35:25