Data class for storing generic optimization variables. More...
#include <ocp_iterate.hpp>
Public Attributes | |
VariablesGrid * | p |
VariablesGrid * | u |
VariablesGrid * | w |
VariablesGrid * | x |
VariablesGrid * | xa |
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 |
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.)
Definition at line 57 of file ocp_iterate.hpp.
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.
|
virtual |
Destructor.
Definition at line 75 of file ocp_iterate.cpp.
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.
|
protected |
Definition at line 436 of file ocp_iterate.cpp.
|
inlineprotected |
returnValue OCPiterate::enableSimulationMode | ( | ) |
Definition at line 381 of file ocp_iterate.cpp.
|
inlineprotected |
|
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.
|
inline |
Returns the dimension of the parameter vector.
|
inline |
Returns the dimension of the control vector.
uint OCPiterate::getNumPoints | ( | ) | const |
Definition at line 155 of file ocp_iterate.cpp.
|
inline |
Returns the dimension of the disturbance vector.
|
inline |
Assignment operator (deep copy). Returns the dimension of the differential state vector.
|
inline |
Returns the dimension of the algebraic state vector.
|
inline |
Grid OCPiterate::getUnionGrid | ( | ) | const |
Returns the union grid of all members, i.e. x, xa, p, u, and w.
Definition at line 182 of file ocp_iterate.cpp.
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.
|
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.
|
virtual |
Shifts all grids by given amount.
\return SUCCESSFUL_RETURN \n RET_INVALID_ARGUMENTS
Definition at line 396 of file ocp_iterate.cpp.
|
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.
|
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.