Base class for export of NLP/OCP solvers. More...
#include <export_nlp_solver.hpp>
Base class for export of NLP/OCP solvers.
This base class is basically used to extract information from an OCP object and prepare low level structures. Later, a derived class is actually building the solver to solve an OCP problem.
Definition at line 62 of file export_nlp_solver.hpp.
ExportNLPSolver::ExportNLPSolver | ( | UserInteraction * | _userInteraction = 0 , |
const std::string & | _commonHeaderName = "" |
||
) |
Default constructor.
[in] | _userInteraction | Pointer to corresponding user interface. |
[in] | _commonHeaderName | Name of common header file to be included. |
Definition at line 41 of file export_nlp_solver.cpp.
virtual ExportNLPSolver::~ExportNLPSolver | ( | ) | [inline, virtual] |
Destructor.
Definition at line 76 of file export_nlp_solver.hpp.
virtual returnValue ExportNLPSolver::getCode | ( | ExportStatementBlock & | code | ) | [pure virtual] |
Exports source code of the auto-generated condensing algorithm into the given directory.
[in] | code | Code block containing the auto-generated condensing algorithm. |
Implements ExportAlgorithm.
Implemented in ExportGaussNewtonForces, ExportGaussNewtonQpDunes, ExportGaussNewtonCondensed, ExportGaussNewtonQpDunes2, ExportGaussNewtonHpmpc, ExportGaussNewtonCn2Factorization, ExportGaussNewtonCN2, and ExportExactHessianQpDunes.
returnValue ExportNLPSolver::getDataDeclarations | ( | ExportStatementBlock & | declarations, |
ExportStruct | dataStruct = ACADO_ANY |
||
) | const [virtual] |
Adds all data declarations of the auto-generated condensing algorithm to given list of declarations.
[in] | declarations | List of declarations. |
Implements ExportAlgorithm.
Reimplemented in ExportGaussNewtonForces, ExportGaussNewtonQpDunes, ExportGaussNewtonCondensed, ExportGaussNewtonQpDunes2, ExportGaussNewtonHpmpc, ExportGaussNewtonCn2Factorization, and ExportGaussNewtonCN2.
Definition at line 89 of file export_nlp_solver.cpp.
virtual returnValue ExportNLPSolver::getFunctionDeclarations | ( | ExportStatementBlock & | declarations | ) | const [pure virtual] |
Adds all function (forward) declarations of the auto-generated condensing algorithm to given list of declarations.
[in] | declarations | List of declarations. |
Implements ExportAlgorithm.
Implemented in ExportGaussNewtonForces, ExportGaussNewtonQpDunes, ExportGaussNewtonCondensed, ExportGaussNewtonQpDunes2, ExportGaussNewtonHpmpc, ExportGaussNewtonCn2Factorization, ExportGaussNewtonCN2, ExportExactHessianQpDunes, and ExportExactHessianCN2.
unsigned ExportNLPSolver::getNumComplexConstraints | ( | void | ) |
Get the number of complex constraints - path + point constraints.
Definition at line 1420 of file export_nlp_solver.cpp.
virtual unsigned ExportNLPSolver::getNumQPvars | ( | ) | const [pure virtual] |
Returns number of variables in underlying QP.
Implemented in ExportGaussNewtonForces, ExportGaussNewtonCondensed, ExportGaussNewtonQpDunes, ExportGaussNewtonHpmpc, ExportGaussNewtonQpDunes2, ExportGaussNewtonCn2Factorization, and ExportGaussNewtonCN2.
bool ExportNLPSolver::initialStateFixed | ( | ) | const |
Indicates whether initial state is fixed.
Definition at line 1425 of file export_nlp_solver.cpp.
bool ExportNLPSolver::performsSingleShooting | ( | ) | const |
Returns whether a single shooting state discretization is used.
Definition at line 78 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setConstraints | ( | const OCP & | _ocp | ) |
Set the "complex" path and point constraints
Definition at line 1126 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setGeneralObjective | ( | const Objective & | _objective | ) |
Definition at line 382 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setIntegratorExport | ( | IntegratorExportPtr const | _integrator | ) |
Assigns module for exporting a tailored integrator.
[in] | _integrator | Integrator module. |
Definition at line 55 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setLevenbergMarquardt | ( | double | _levenbergMarquardt | ) |
Assigns new constant for Levenberg-Marquardt regularization.
[in] | _levenbergMarquardt | Non-negative constant for Levenberg-Marquardt regularization. |
Definition at line 62 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setLSQObjective | ( | const Objective & | _objective | ) |
Definition at line 635 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setObjective | ( | const Objective & | _objective | ) |
Set objective function
Definition at line 371 of file export_nlp_solver.cpp.
virtual returnValue ExportNLPSolver::setup | ( | ) | [pure virtual] |
Initializes export of an algorithm.
Reimplemented from ExportAlgorithm.
Implemented in ExportGaussNewtonForces, ExportGaussNewtonQpDunes, ExportExactHessianQpDunes, ExportGaussNewtonCondensed, ExportGaussNewtonQpDunes2, ExportGaussNewtonHpmpc, ExportExactHessianCN2, ExportGaussNewtonCn2Factorization, and ExportGaussNewtonCN2.
returnValue ExportNLPSolver::setupArrivalCostCalculation | ( | ) | [protected] |
Setup of functions and variables for evaluation of arrival cost.
Definition at line 1758 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setupAuxiliaryFunctions | ( | ) | [protected] |
Setup of functions for evaluation of auxiliary functions.
Definition at line 1441 of file export_nlp_solver.cpp.
virtual returnValue ExportNLPSolver::setupConstraintsEvaluation | ( | ) | [protected, pure virtual] |
Setup of functions for evaluation of constraints.
Implemented in ExportGaussNewtonCondensed, ExportGaussNewtonCn2Factorization, ExportGaussNewtonCN2, ExportGaussNewtonForces, ExportGaussNewtonQpDunes, ExportGaussNewtonHpmpc, and ExportGaussNewtonQpDunes2.
virtual returnValue ExportNLPSolver::setupEvaluation | ( | ) | [protected, pure virtual] |
Exports source code containing the evaluation routines of the algorithm.
Implemented in ExportGaussNewtonCondensed, ExportGaussNewtonCn2Factorization, ExportGaussNewtonCN2, ExportGaussNewtonForces, ExportGaussNewtonHpmpc, ExportGaussNewtonQpDunes, and ExportGaussNewtonQpDunes2.
returnValue ExportNLPSolver::setupGetGeneralObjective | ( | ) | [protected, virtual] |
Setup the function for evaluating the actual objective value.
Definition at line 1696 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setupGetLSQObjective | ( | ) | [protected, virtual] |
Setup the function for evaluating the actual LSQ objective value.
Definition at line 1608 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setupGetObjective | ( | ) | [protected, virtual] |
Setup the function for evaluating the actual objective value.
Definition at line 1597 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setupInitialization | ( | ) | [protected, virtual] |
Setup main initialization code for the solver
Definition at line 163 of file export_nlp_solver.cpp.
virtual returnValue ExportNLPSolver::setupMultiplicationRoutines | ( | ) | [protected, pure virtual] |
Exports source code containing the multiplication routines of the algorithm.
Implemented in ExportGaussNewtonCondensed, ExportGaussNewtonCn2Factorization, ExportGaussNewtonCN2, ExportGaussNewtonForces, ExportGaussNewtonQpDunes, ExportGaussNewtonHpmpc, and ExportGaussNewtonQpDunes2.
returnValue ExportNLPSolver::setupObjectiveLinearTerms | ( | const Objective & | _objective | ) | [private] |
Definition at line 1061 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setupResidualVariables | ( | ) | [private] |
Definition at line 1113 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setupSimulation | ( | void | ) | [protected, virtual] |
Setting up of a model simulation:
Definition at line 188 of file export_nlp_solver.cpp.
virtual returnValue ExportNLPSolver::setupVariables | ( | ) | [protected, pure virtual] |
Initialization of member variables.
Implemented in ExportGaussNewtonCondensed, ExportGaussNewtonCn2Factorization, ExportGaussNewtonCN2, ExportGaussNewtonForces, ExportGaussNewtonQpDunes, ExportGaussNewtonHpmpc, and ExportGaussNewtonQpDunes2.
bool ExportNLPSolver::usingLinearTerms | ( | ) | const |
Indicates whether linear terms in the objective are used.
Definition at line 1433 of file export_nlp_solver.cpp.
unsigned ExportNLPSolver::weightingMatricesType | ( | void | ) | const |
Return type of weighting matrices.
Definition at line 1744 of file export_nlp_solver.cpp.
ExportVariable ExportNLPSolver::acA [protected] |
Definition at line 332 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::acb [protected] |
Definition at line 332 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::acHTilde [protected] |
Definition at line 334 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::acHu [protected] |
Definition at line 334 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::acHx [protected] |
Definition at line 334 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::acP [protected] |
Definition at line 332 of file export_nlp_solver.hpp.
ExportHouseholderQR ExportNLPSolver::acSolver [protected] |
Definition at line 330 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::acTmp [protected] |
Definition at line 332 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::acVL [protected] |
Definition at line 334 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::acWL [protected] |
Definition at line 334 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::acXTilde [protected] |
Definition at line 334 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::acXu [protected] |
Definition at line 334 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::acXx [protected] |
Definition at line 334 of file export_nlp_solver.hpp.
ExportCholeskyDecomposition ExportNLPSolver::cholObjS [protected] |
Definition at line 327 of file export_nlp_solver.hpp.
ExportCholeskyDecomposition ExportNLPSolver::cholSAC [protected] |
Definition at line 328 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::conAuxVar [protected] |
Definition at line 289 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::conValueIn [protected] |
Definition at line 290 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::conValueOut [protected] |
Definition at line 291 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::d [protected] |
Definition at line 242 of file export_nlp_solver.hpp.
bool ExportNLPSolver::diagonalH [protected] |
Definition at line 275 of file export_nlp_solver.hpp.
bool ExportNLPSolver::diagonalHN [protected] |
Definition at line 275 of file export_nlp_solver.hpp.
unsigned ExportNLPSolver::dimPacH [protected] |
Definition at line 287 of file export_nlp_solver.hpp.
unsigned ExportNLPSolver::dimPocH [protected] |
Definition at line 301 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::DxAC [protected] |
Definition at line 337 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::Dy [protected] |
Definition at line 255 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::DyN [protected] |
Definition at line 255 of file export_nlp_solver.hpp.
Definition at line 288 of file export_nlp_solver.hpp.
std::vector< std::tr1::shared_ptr< ExportAcadoFunction > > ExportNLPSolver::evaluatePointConstraints [protected] |
Definition at line 302 of file export_nlp_solver.hpp.
Definition at line 265 of file export_nlp_solver.hpp.
Definition at line 266 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::evGu [protected] |
Definition at line 245 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::evGx [protected] |
Definition at line 244 of file export_nlp_solver.hpp.
ExportFunction ExportNLPSolver::getObjective [protected] |
Definition at line 319 of file export_nlp_solver.hpp.
ExportFunction ExportNLPSolver::initialize [protected] |
Main initialization function for the solver.
Definition at line 315 of file export_nlp_solver.hpp.
ExportFunction ExportNLPSolver::initializeNodes [protected] |
Definition at line 320 of file export_nlp_solver.hpp.
IntegratorExportPtr ExportNLPSolver::integrator [protected] |
Module for exporting a tailored integrator.
Definition at line 233 of file export_nlp_solver.hpp.
DVector ExportNLPSolver::lbPathConValues [protected] |
Definition at line 293 of file export_nlp_solver.hpp.
DVector ExportNLPSolver::lbPointConValues [protected] |
Definition at line 303 of file export_nlp_solver.hpp.
double ExportNLPSolver::levenbergMarquardt [protected] |
Non-negative constant for Levenberg-Marquardt regularization.
Definition at line 253 of file export_nlp_solver.hpp.
ExportFunction ExportNLPSolver::modelSimulation [protected] |
Definition at line 235 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::mu [protected] |
Definition at line 258 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::objAuxVar [protected] |
Definition at line 264 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::objEvFu [protected] |
Definition at line 261 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::objEvFuu [protected] |
Definition at line 262 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::objEvFx [protected] |
Definition at line 261 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::objEvFxEnd [protected] |
Definition at line 261 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::objEvFxu [protected] |
Definition at line 262 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::objEvFxx [protected] |
Definition at line 262 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::objEvFxxEnd [protected] |
Definition at line 262 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::objS [protected] |
Definition at line 260 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::objSEndTerm [protected] |
Definition at line 260 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::objSlu [protected] |
Definition at line 273 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::objSlx [protected] |
Definition at line 273 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::objValueIn [protected] |
Definition at line 264 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::objValueOut [protected] |
Definition at line 264 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::od [protected] |
Definition at line 241 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::pacEvH [protected] |
Definition at line 295 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::pacEvHu [protected] |
Definition at line 296 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::pacEvHx [protected] |
Definition at line 296 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::pacEvHxd [protected] |
Definition at line 296 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::pocEvH [protected] |
Definition at line 307 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::pocEvHu [protected] |
Definition at line 308 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::pocEvHx [protected] |
Definition at line 308 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::pocEvHxd [protected] |
Definition at line 308 of file export_nlp_solver.hpp.
std::vector< DVector > ExportNLPSolver::pocLbStack [protected] |
Definition at line 305 of file export_nlp_solver.hpp.
std::vector< DVector > ExportNLPSolver::pocUbStack [protected] |
Definition at line 305 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::Q1 [protected] |
Definition at line 268 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::Q2 [protected] |
Definition at line 268 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::QN1 [protected] |
Definition at line 271 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::QN2 [protected] |
Definition at line 271 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::R1 [protected] |
Definition at line 269 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::R2 [protected] |
Definition at line 269 of file export_nlp_solver.hpp.
ExportFunction ExportNLPSolver::regularization [protected] |
Definition at line 340 of file export_nlp_solver.hpp.
ExportFunction ExportNLPSolver::regularizeHessian [protected] |
Definition at line 339 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::S1 [protected] |
Definition at line 270 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::SAC [protected] |
Definition at line 337 of file export_nlp_solver.hpp.
ExportFunction ExportNLPSolver::shiftControls [protected] |
Definition at line 318 of file export_nlp_solver.hpp.
ExportFunction ExportNLPSolver::shiftStates [protected] |
Definition at line 317 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::state [protected] |
Definition at line 237 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::u [protected] |
Definition at line 240 of file export_nlp_solver.hpp.
VariablesGrid ExportNLPSolver::uBounds [protected] |
Definition at line 281 of file export_nlp_solver.hpp.
DVector ExportNLPSolver::ubPathConValues [protected] |
Definition at line 293 of file export_nlp_solver.hpp.
DVector ExportNLPSolver::ubPointConValues [protected] |
Definition at line 303 of file export_nlp_solver.hpp.
ExportFunction ExportNLPSolver::updateArrivalCost [protected] |
Definition at line 325 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::x [protected] |
Definition at line 238 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::xAC [protected] |
Definition at line 337 of file export_nlp_solver.hpp.
VariablesGrid ExportNLPSolver::xBounds [protected] |
Definition at line 282 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::y [protected] |
Definition at line 255 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::yN [protected] |
Definition at line 255 of file export_nlp_solver.hpp.
ExportVariable ExportNLPSolver::z [protected] |
Definition at line 239 of file export_nlp_solver.hpp.