Data class for storing generic optimization variables. More...
#include <ocp_iterate.hpp>
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.
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.
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] |
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.
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.
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.
BooleanType OCPiterate::inSimulationMode [protected] |
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.