Base class for user-interfaces to formulate and solve optimal control problems and static NLPs. More...
#include <optimization_algorithm_base.hpp>
Base class for user-interfaces to formulate and solve optimal control problems and static NLPs.
Notes:
The class OptimizationAlgorithmBase serves as a base class for user-interfaces to formulate and solve optimal control problems and static nonlinear programming (NLP) problems.
Definition at line 65 of file optimization_algorithm_base.hpp.
Default constructor.
Definition at line 48 of file optimization_algorithm_base.cpp.
OptimizationAlgorithmBase::OptimizationAlgorithmBase | ( | const OCP & | ocp_ | ) |
Default constructor.
Definition at line 57 of file optimization_algorithm_base.cpp.
Copy constructor (deep copy).
Definition at line 66 of file optimization_algorithm_base.cpp.
OptimizationAlgorithmBase::~OptimizationAlgorithmBase | ( | ) | [virtual] |
Destructor.
Definition at line 79 of file optimization_algorithm_base.cpp.
virtual returnValue OptimizationAlgorithmBase::allocateNlpSolver | ( | Objective * | F, |
DynamicDiscretization * | G, | ||
Constraint * | H | ||
) | [protected, pure virtual] |
Implemented in RealTimeAlgorithm, and OptimizationAlgorithm.
returnValue OptimizationAlgorithmBase::clear | ( | ) | [protected] |
Reimplemented in RealTimeAlgorithm.
Definition at line 457 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::determineDimensions | ( | Objective *const | _objective, |
DifferentialEquation **const | _differentialEquation, | ||
Constraint *const | _constraint, | ||
uint & | _nx, | ||
uint & | _nxa, | ||
uint & | _np, | ||
uint & | _nu, | ||
uint & | _nw | ||
) | const [protected, virtual] |
Definition at line 744 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::extractOCPdata | ( | Objective ** | objective, |
DifferentialEquation *** | differentialEquation, | ||
Constraint ** | constraint, | ||
Grid & | unionGrid | ||
) | [protected, virtual] |
Definition at line 626 of file optimization_algorithm_base.cpp.
Definition at line 232 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::getAlgebraicStates | ( | const char * | fileName | ) | const |
Definition at line 291 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::getControls | ( | VariablesGrid & | p_ | ) | const |
Definition at line 262 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::getControls | ( | const char * | fileName | ) | const |
Definition at line 321 of file optimization_algorithm_base.cpp.
Definition at line 225 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::getDifferentialStates | ( | const char * | fileName | ) | const |
Definition at line 276 of file optimization_algorithm_base.cpp.
Definition at line 269 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::getDisturbances | ( | const char * | fileName | ) | const |
Definition at line 336 of file optimization_algorithm_base.cpp.
double OptimizationAlgorithmBase::getEndTime | ( | ) | const |
Definition at line 443 of file optimization_algorithm_base.cpp.
uint OptimizationAlgorithmBase::getNP | ( | ) | const [virtual] |
Returns number of parameters.
Reimplemented in RealTimeAlgorithm.
Definition at line 416 of file optimization_algorithm_base.cpp.
uint OptimizationAlgorithmBase::getNU | ( | ) | const [virtual] |
Returns number of controls.
Reimplemented in RealTimeAlgorithm.
Definition at line 422 of file optimization_algorithm_base.cpp.
uint OptimizationAlgorithmBase::getNW | ( | ) | const [virtual] |
Returns number of disturbances.
Reimplemented in RealTimeAlgorithm.
Definition at line 428 of file optimization_algorithm_base.cpp.
uint OptimizationAlgorithmBase::getNX | ( | ) | const [virtual] |
Returns number of differential states.
Reimplemented in RealTimeAlgorithm.
Definition at line 404 of file optimization_algorithm_base.cpp.
uint OptimizationAlgorithmBase::getNXA | ( | ) | const [virtual] |
Returns number of algebraic states.
Reimplemented in RealTimeAlgorithm.
Definition at line 410 of file optimization_algorithm_base.cpp.
double OptimizationAlgorithmBase::getObjectiveValue | ( | const char * | fileName | ) | const |
Definition at line 351 of file optimization_algorithm_base.cpp.
double OptimizationAlgorithmBase::getObjectiveValue | ( | ) | const |
Definition at line 361 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::getParameters | ( | VariablesGrid & | u_ | ) | const |
Definition at line 239 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::getParameters | ( | DVector & | u_ | ) | const |
Definition at line 246 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::getParameters | ( | const char * | fileName | ) | const |
Definition at line 306 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::getSensitivitiesP | ( | BlockMatrix & | _sens | ) | const |
Definition at line 382 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::getSensitivitiesU | ( | BlockMatrix & | _sens | ) | const |
Definition at line 389 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::getSensitivitiesW | ( | BlockMatrix & | _sens | ) | const |
Definition at line 396 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::getSensitivitiesX | ( | BlockMatrix & | _sens | ) | const |
Definition at line 369 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::getSensitivitiesXA | ( | BlockMatrix & | _sens | ) | const |
Definition at line 376 of file optimization_algorithm_base.cpp.
double OptimizationAlgorithmBase::getStartTime | ( | ) | const |
Definition at line 434 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::init | ( | UserInteraction * | _userIteraction | ) | [protected] |
Initializes everything.
Definition at line 480 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::initializeAlgebraicStates | ( | const char * | fileName, |
BooleanType | autoinit = BT_FALSE |
||
) |
Definition at line 118 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::initializeAlgebraicStates | ( | const VariablesGrid & | xa_init_, |
BooleanType | autoinit = BT_FALSE |
||
) |
Definition at line 187 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::initializeControls | ( | const char * | fileName | ) |
Reimplemented in RealTimeAlgorithm.
Definition at line 142 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::initializeControls | ( | const VariablesGrid & | p_init_ | ) |
Reimplemented in RealTimeAlgorithm.
Definition at line 209 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::initializeDifferentialStates | ( | const char * | fileName, |
BooleanType | autoinit = BT_FALSE |
||
) |
Initialization of the optimization variables.
Definition at line 106 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::initializeDifferentialStates | ( | const VariablesGrid & | xd_init_, |
BooleanType | autoinit = BT_FALSE |
||
) |
Definition at line 167 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::initializeDisturbances | ( | const char * | fileName | ) |
Definition at line 154 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::initializeDisturbances | ( | const VariablesGrid & | w_init_ | ) |
Definition at line 217 of file optimization_algorithm_base.cpp.
virtual returnValue OptimizationAlgorithmBase::initializeNlpSolver | ( | const OCPiterate & | _userInit | ) | [protected, pure virtual] |
Implemented in RealTimeAlgorithm, MultiObjectiveAlgorithm, ParameterEstimationAlgorithm, MHEalgorithm, and OptimizationAlgorithm.
virtual returnValue OptimizationAlgorithmBase::initializeObjective | ( | Objective * | F | ) | [protected, pure virtual] |
Implemented in RealTimeAlgorithm, MultiObjectiveAlgorithm, ParameterEstimationAlgorithm, MHEalgorithm, and OptimizationAlgorithm.
returnValue OptimizationAlgorithmBase::initializeOCPiterate | ( | Constraint *const | _constraint, |
const Grid & | _unionGrid, | ||
uint | nx, | ||
uint | nxa, | ||
uint | np, | ||
uint | nu, | ||
uint | nw | ||
) | [protected, virtual] |
Definition at line 808 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::initializeParameters | ( | const char * | fileName | ) |
Definition at line 130 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::initializeParameters | ( | const VariablesGrid & | u_init_ | ) |
Definition at line 201 of file optimization_algorithm_base.cpp.
BooleanType OptimizationAlgorithmBase::isLinearQuadratic | ( | Objective * | F, |
DynamicDiscretization * | G, | ||
Constraint * | H | ||
) | const [protected] |
Definition at line 605 of file optimization_algorithm_base.cpp.
OptimizationAlgorithmBase & OptimizationAlgorithmBase::operator= | ( | const OptimizationAlgorithmBase & | arg | ) |
Assignment operator (deep copy).
Definition at line 86 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::setupDifferentialEquation | ( | Objective * | objective, |
DifferentialEquation ** | differentialEquation, | ||
Constraint * | constraint, | ||
Grid | unionGrid | ||
) | [protected, virtual] |
Definition at line 692 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::setupDynamicDiscretization | ( | UserInteraction * | _userIteraction, |
Objective * | objective, | ||
DifferentialEquation ** | differentialEquation, | ||
Constraint * | constraint, | ||
Grid | unionGrid, | ||
DynamicDiscretization ** | dynamicDiscretization | ||
) | [protected, virtual] |
Definition at line 708 of file optimization_algorithm_base.cpp.
returnValue OptimizationAlgorithmBase::setupObjective | ( | Objective * | objective, |
DifferentialEquation ** | differentialEquation, | ||
Constraint * | constraint, | ||
Grid | unionGrid | ||
) | [protected, virtual] |
Definition at line 678 of file optimization_algorithm_base.cpp.
Use this call to overwrite all states by a single shooting initialization. This function takes the initial state and controls and overwrite all states apart from the first one by simulation.
Definition at line 180 of file optimization_algorithm_base.cpp.
OCPiterate OptimizationAlgorithmBase::iter [protected] |
Definition at line 247 of file optimization_algorithm_base.hpp.
NLPsolver* OptimizationAlgorithmBase::nlpSolver [protected] |
Definition at line 244 of file optimization_algorithm_base.hpp.
OCP* OptimizationAlgorithmBase::ocp [protected] |
Definition at line 245 of file optimization_algorithm_base.hpp.
OCPiterate OptimizationAlgorithmBase::userInit [protected] |
Definition at line 248 of file optimization_algorithm_base.hpp.