Base class for export of NLP/OCP solvers. More...
#include <export_nlp_solver.hpp>
Protected Member Functions | |
returnValue | setupArrivalCostCalculation () |
returnValue | setupAuxiliaryFunctions () |
virtual returnValue | setupConstraintsEvaluation ()=0 |
virtual returnValue | setupEvaluation ()=0 |
virtual returnValue | setupGetGeneralObjective () |
virtual returnValue | setupGetLSQObjective () |
virtual returnValue | setupGetObjective () |
virtual returnValue | setupInitialization () |
virtual returnValue | setupMultiplicationRoutines ()=0 |
virtual returnValue | setupSimulation (void) |
virtual returnValue | setupVariables ()=0 |
Private Member Functions | |
returnValue | setupObjectiveLinearTerms (const Objective &_objective) |
returnValue | setupResidualVariables () |
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.
@param[in] _userInteraction Pointer to corresponding user interface. @param[in] _commonHeaderName Name of common header file to be included.
Definition at line 41 of file export_nlp_solver.cpp.
|
inlinevirtual |
Destructor.
Definition at line 76 of file export_nlp_solver.hpp.
|
pure virtual |
Exports source code of the auto-generated condensing algorithm into the given directory.
@param[in] code Code block containing the auto-generated condensing algorithm. \return SUCCESSFUL_RETURN
Implements ExportAlgorithm.
Implemented in ExportGaussNewtonForces, ExportGaussNewtonQpDunes, ExportGaussNewtonCondensed, ExportGaussNewtonHpmpc, ExportGaussNewtonBlockCN2, ExportGaussNewtonCn2Factorization, ExportGaussNewtonGeneric, ExportGaussNewtonCN2, ExportExactHessianQpDunes, ExportGaussNewtonBlockForces, and ExportGaussNewtonBlockQpDunes.
|
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, ExportGaussNewtonHpmpc, ExportGaussNewtonBlockCN2, ExportGaussNewtonCn2Factorization, ExportGaussNewtonGeneric, and ExportGaussNewtonCN2.
Definition at line 89 of file export_nlp_solver.cpp.
|
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, ExportGaussNewtonHpmpc, ExportGaussNewtonBlockCN2, ExportGaussNewtonCn2Factorization, ExportGaussNewtonGeneric, ExportGaussNewtonCN2, ExportExactHessianQpDunes, and ExportExactHessianCN2.
unsigned ExportNLPSolver::getNumComplexConstraints | ( | void | ) |
Get the number of complex constraints - path + point constraints.
Definition at line 1579 of file export_nlp_solver.cpp.
unsigned ExportNLPSolver::getNumPathConstraints | ( | void | ) |
Get the number of path constraints.
Definition at line 1584 of file export_nlp_solver.cpp.
|
pure virtual |
Returns number of variables in underlying QP.
Implemented in ExportGaussNewtonForces, ExportGaussNewtonCondensed, ExportGaussNewtonQpDunes, ExportGaussNewtonHpmpc, ExportGaussNewtonBlockCN2, ExportGaussNewtonCn2Factorization, ExportGaussNewtonGeneric, and ExportGaussNewtonCN2.
bool ExportNLPSolver::initialStateFixed | ( | ) | const |
Indicates whether initial state is fixed.
Definition at line 1589 of file export_nlp_solver.cpp.
bool ExportNLPSolver::performsSingleShooting | ( | ) | const |
Returns whether a single shooting state discretization is used.
\return true iff single shooting state discretization is used, \n false otherwise
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 1227 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setGeneralObjective | ( | const Objective & | _objective | ) |
Definition at line 456 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setIntegratorExport | ( | IntegratorExportPtr const | _integrator | ) |
Assigns module for exporting a tailored integrator.
@param[in] _integrator Integrator module. \return SUCCESSFUL_RETURN
Definition at line 55 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setLevenbergMarquardt | ( | double | _levenbergMarquardt | ) |
Assigns new constant for Levenberg-Marquardt regularization.
@param[in] _levenbergMarquardt Non-negative constant for Levenberg-Marquardt regularization. \return SUCCESSFUL_RETURN
Definition at line 62 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setLSQObjective | ( | const Objective & | _objective | ) |
Definition at line 715 of file export_nlp_solver.cpp.
returnValue ExportNLPSolver::setObjective | ( | const Objective & | _objective | ) |
Set objective function
Definition at line 445 of file export_nlp_solver.cpp.
|
pure virtual |
Initializes export of an algorithm.
\return SUCCESSFUL_RETURN
Reimplemented from ExportAlgorithm.
Implemented in ExportGaussNewtonForces, ExportGaussNewtonQpDunes, ExportExactHessianQpDunes, ExportGaussNewtonBlockForces, ExportGaussNewtonCondensed, ExportGaussNewtonBlockQpDunes, ExportGaussNewtonHpmpc, ExportGaussNewtonBlockCN2, ExportExactHessianCN2, ExportGaussNewtonCn2Factorization, ExportGaussNewtonGeneric, and ExportGaussNewtonCN2.
|
protected |
Setup of functions and variables for evaluation of arrival cost.
Definition at line 1938 of file export_nlp_solver.cpp.
|
protected |
Setup of functions for evaluation of auxiliary functions.
Definition at line 1605 of file export_nlp_solver.cpp.
|
protectedpure virtual |
Setup of functions for evaluation of constraints.
Implemented in ExportGaussNewtonCondensed, ExportGaussNewtonForces, ExportGaussNewtonCn2Factorization, ExportGaussNewtonCN2, ExportGaussNewtonQpDunes, ExportGaussNewtonBlockCN2, ExportGaussNewtonHpmpc, ExportGaussNewtonGeneric, and ExportGaussNewtonBlockForces.
|
protectedpure virtual |
Exports source code containing the evaluation routines of the algorithm.
Implemented in ExportGaussNewtonCondensed, ExportGaussNewtonForces, ExportGaussNewtonCn2Factorization, ExportGaussNewtonCN2, ExportGaussNewtonBlockCN2, ExportGaussNewtonHpmpc, ExportGaussNewtonGeneric, ExportGaussNewtonQpDunes, ExportGaussNewtonBlockForces, and ExportGaussNewtonBlockQpDunes.
|
protectedvirtual |
Setup the function for evaluating the actual objective value.
Definition at line 1876 of file export_nlp_solver.cpp.
|
protectedvirtual |
Setup the function for evaluating the actual LSQ objective value.
Definition at line 1788 of file export_nlp_solver.cpp.
|
protectedvirtual |
Setup the function for evaluating the actual objective value.
Definition at line 1777 of file export_nlp_solver.cpp.
|
protectedvirtual |
Setup main initialization code for the solver
Definition at line 165 of file export_nlp_solver.cpp.
|
protectedpure virtual |
Exports source code containing the multiplication routines of the algorithm.
\return SUCCESSFUL_RETURN
Implemented in ExportGaussNewtonCondensed, ExportGaussNewtonForces, ExportGaussNewtonCn2Factorization, ExportGaussNewtonCN2, ExportGaussNewtonQpDunes, ExportGaussNewtonBlockCN2, ExportGaussNewtonHpmpc, and ExportGaussNewtonGeneric.
|
private |
Definition at line 1150 of file export_nlp_solver.cpp.
|
private |
Definition at line 1214 of file export_nlp_solver.cpp.
|
protectedvirtual |
Setting up of a model simulation:
Definition at line 193 of file export_nlp_solver.cpp.
|
protectedpure virtual |
Initialization of member variables.
\return SUCCESSFUL_RETURN
Implemented in ExportGaussNewtonCondensed, ExportGaussNewtonForces, ExportGaussNewtonCn2Factorization, ExportGaussNewtonCN2, ExportGaussNewtonQpDunes, ExportGaussNewtonBlockCN2, ExportGaussNewtonHpmpc, ExportGaussNewtonGeneric, and ExportGaussNewtonBlockForces.
bool ExportNLPSolver::usingLinearTerms | ( | ) | const |
Indicates whether linear terms in the objective are used.
Definition at line 1597 of file export_nlp_solver.cpp.
unsigned ExportNLPSolver::weightingMatricesType | ( | void | ) | const |
Return type of weighting matrices.
Definition at line 1924 of file export_nlp_solver.cpp.
|
protected |
Definition at line 338 of file export_nlp_solver.hpp.
|
protected |
Definition at line 338 of file export_nlp_solver.hpp.
|
protected |
Definition at line 340 of file export_nlp_solver.hpp.
|
protected |
Definition at line 340 of file export_nlp_solver.hpp.
|
protected |
Definition at line 340 of file export_nlp_solver.hpp.
|
protected |
Definition at line 338 of file export_nlp_solver.hpp.
|
protected |
Definition at line 336 of file export_nlp_solver.hpp.
|
protected |
Definition at line 338 of file export_nlp_solver.hpp.
|
protected |
Definition at line 340 of file export_nlp_solver.hpp.
|
protected |
Definition at line 340 of file export_nlp_solver.hpp.
|
protected |
Definition at line 340 of file export_nlp_solver.hpp.
|
protected |
Definition at line 340 of file export_nlp_solver.hpp.
|
protected |
Definition at line 340 of file export_nlp_solver.hpp.
|
protected |
Definition at line 333 of file export_nlp_solver.hpp.
|
protected |
Definition at line 334 of file export_nlp_solver.hpp.
|
protected |
Definition at line 294 of file export_nlp_solver.hpp.
|
protected |
Definition at line 295 of file export_nlp_solver.hpp.
|
protected |
Definition at line 296 of file export_nlp_solver.hpp.
|
protected |
Definition at line 247 of file export_nlp_solver.hpp.
|
protected |
Definition at line 280 of file export_nlp_solver.hpp.
|
protected |
Definition at line 280 of file export_nlp_solver.hpp.
|
protected |
Definition at line 292 of file export_nlp_solver.hpp.
|
protected |
Definition at line 307 of file export_nlp_solver.hpp.
|
protected |
Definition at line 343 of file export_nlp_solver.hpp.
|
protected |
Definition at line 260 of file export_nlp_solver.hpp.
|
protected |
Definition at line 260 of file export_nlp_solver.hpp.
|
protected |
Definition at line 293 of file export_nlp_solver.hpp.
|
protected |
Definition at line 308 of file export_nlp_solver.hpp.
|
protected |
Definition at line 270 of file export_nlp_solver.hpp.
|
protected |
Definition at line 271 of file export_nlp_solver.hpp.
|
protected |
Definition at line 250 of file export_nlp_solver.hpp.
|
protected |
Definition at line 249 of file export_nlp_solver.hpp.
|
protected |
Definition at line 325 of file export_nlp_solver.hpp.
|
protected |
Main initialization function for the solver.
Definition at line 321 of file export_nlp_solver.hpp.
|
protected |
Definition at line 326 of file export_nlp_solver.hpp.
|
protected |
Module for exporting a tailored integrator.
Definition at line 238 of file export_nlp_solver.hpp.
|
protected |
Definition at line 298 of file export_nlp_solver.hpp.
|
protected |
Definition at line 309 of file export_nlp_solver.hpp.
|
protected |
Non-negative constant for Levenberg-Marquardt regularization.
Definition at line 258 of file export_nlp_solver.hpp.
|
protected |
Definition at line 240 of file export_nlp_solver.hpp.
|
protected |
Definition at line 263 of file export_nlp_solver.hpp.
|
protected |
Definition at line 269 of file export_nlp_solver.hpp.
|
protected |
Definition at line 266 of file export_nlp_solver.hpp.
|
protected |
Definition at line 267 of file export_nlp_solver.hpp.
|
protected |
Definition at line 266 of file export_nlp_solver.hpp.
|
protected |
Definition at line 266 of file export_nlp_solver.hpp.
|
protected |
Definition at line 267 of file export_nlp_solver.hpp.
|
protected |
Definition at line 267 of file export_nlp_solver.hpp.
|
protected |
Definition at line 267 of file export_nlp_solver.hpp.
|
protected |
Definition at line 265 of file export_nlp_solver.hpp.
|
protected |
Definition at line 265 of file export_nlp_solver.hpp.
|
protected |
Definition at line 265 of file export_nlp_solver.hpp.
|
protected |
Definition at line 278 of file export_nlp_solver.hpp.
|
protected |
Definition at line 278 of file export_nlp_solver.hpp.
|
protected |
Definition at line 269 of file export_nlp_solver.hpp.
|
protected |
Definition at line 269 of file export_nlp_solver.hpp.
|
protected |
Definition at line 246 of file export_nlp_solver.hpp.
|
protected |
Definition at line 302 of file export_nlp_solver.hpp.
|
protected |
Definition at line 300 of file export_nlp_solver.hpp.
|
protected |
Definition at line 301 of file export_nlp_solver.hpp.
|
protected |
Definition at line 301 of file export_nlp_solver.hpp.
|
protected |
Definition at line 301 of file export_nlp_solver.hpp.
|
protected |
Definition at line 313 of file export_nlp_solver.hpp.
|
protected |
Definition at line 314 of file export_nlp_solver.hpp.
|
protected |
Definition at line 314 of file export_nlp_solver.hpp.
|
protected |
Definition at line 314 of file export_nlp_solver.hpp.
|
protected |
Definition at line 311 of file export_nlp_solver.hpp.
|
protected |
Definition at line 311 of file export_nlp_solver.hpp.
|
protected |
Definition at line 273 of file export_nlp_solver.hpp.
|
protected |
Definition at line 273 of file export_nlp_solver.hpp.
|
protected |
Definition at line 276 of file export_nlp_solver.hpp.
|
protected |
Definition at line 276 of file export_nlp_solver.hpp.
|
protected |
Definition at line 274 of file export_nlp_solver.hpp.
|
protected |
Definition at line 274 of file export_nlp_solver.hpp.
|
protected |
Definition at line 346 of file export_nlp_solver.hpp.
|
protected |
Definition at line 345 of file export_nlp_solver.hpp.
|
protected |
Definition at line 275 of file export_nlp_solver.hpp.
|
protected |
Definition at line 343 of file export_nlp_solver.hpp.
|
protected |
Definition at line 324 of file export_nlp_solver.hpp.
|
protected |
Definition at line 323 of file export_nlp_solver.hpp.
|
protected |
Definition at line 242 of file export_nlp_solver.hpp.
|
protected |
Definition at line 245 of file export_nlp_solver.hpp.
|
protected |
Definition at line 286 of file export_nlp_solver.hpp.
|
protected |
Definition at line 298 of file export_nlp_solver.hpp.
|
protected |
Definition at line 309 of file export_nlp_solver.hpp.
|
protected |
Definition at line 331 of file export_nlp_solver.hpp.
|
protected |
Definition at line 243 of file export_nlp_solver.hpp.
|
protected |
Definition at line 343 of file export_nlp_solver.hpp.
|
protected |
Definition at line 287 of file export_nlp_solver.hpp.
|
protected |
Definition at line 260 of file export_nlp_solver.hpp.
|
protected |
Definition at line 260 of file export_nlp_solver.hpp.
|
protected |
Definition at line 244 of file export_nlp_solver.hpp.