Allows to export automatically generated algorithms for fast model predictive control. More...
#include <export_algorithm.hpp>
Protected Attributes | |
std::string | commonHeaderName |
uint | N |
uint | NDX |
uint | NOD |
uint | NP |
uint | NU |
uint | NX |
uint | NXA |
uint | NY |
uint | NYN |
Protected Attributes inherited from AlgorithmicBase | |
int | outputLoggingIdx |
BooleanType | useModuleStandalone |
UserInteraction * | userInteraction |
Allows to export automatically generated algorithms for fast model predictive control.
The class ExportAlgorithm allows to export automatically generated algorithms for fast model predictive control.
Definition at line 61 of file export_algorithm.hpp.
BEGIN_NAMESPACE_ACADO ExportAlgorithm::ExportAlgorithm | ( | UserInteraction * | _userInteraction = 0 , |
const std::string & | _commonHeaderName = std::string() |
||
) |
Default constructor.
@param[in] _userInteraction Pointer to corresponding user interface. @param[in] _commonHeaderName Name of common header file to be included.
Definition at line 45 of file export_algorithm.cpp.
|
virtual |
Destructor.
Definition at line 54 of file export_algorithm.cpp.
|
pure virtual |
Exports source code of the auto-generated algorithm into the given directory.
@param[in] code Code block containing the auto-generated algorithm. \return SUCCESSFUL_RETURN
Implemented in IntegratorExport, ImplicitRungeKuttaExport, DiscreteTimeExport, ExportLinearSolver, ExplicitRungeKuttaExport, RungeKuttaExport, ExportIRK3StageSimplifiedNewton, ExportIRK4StageSimplifiedNewton, ExportNLPSolver, AdjointLiftedIRKExport, FeedbackLiftedIRKExport, ForwardBackwardLiftedIRKExport, ForwardLiftedIRKExport, SymmetricLiftedIRKExport, SymmetricIRKExport, ForwardIRKExport, ExportIRK3StageSingleNewton, ExportIRK4StageSingleNewton, ExportCholeskySolver, LiftedERKExport, ThreeSweepsERKExport, AdjointERKExport, ExportGaussElim, ExportHouseholderQR, ExportCholeskyDecomposition, ExportGaussNewtonForces, ExportGaussNewtonQpDunes, ExportGaussNewtonCondensed, ExportGaussNewtonHpmpc, ExportGaussNewtonBlockCN2, ExportGaussNewtonCn2Factorization, ExportGaussNewtonGeneric, ExportGaussNewtonCN2, ExportExactHessianQpDunes, ExportGaussNewtonBlockForces, and ExportGaussNewtonBlockQpDunes.
|
pure virtual |
Adds all data declarations of the auto-generated algorithm to given list of declarations.
@param[in] declarations List of declarations. \return SUCCESSFUL_RETURN
Implemented in IntegratorExport, ImplicitRungeKuttaExport, DiscreteTimeExport, ExportLinearSolver, ExplicitRungeKuttaExport, RungeKuttaExport, NARXExport, ExportIRK3StageSimplifiedNewton, ExportIRK4StageSimplifiedNewton, ExportNLPSolver, AdjointLiftedIRKExport, FeedbackLiftedIRKExport, ForwardBackwardLiftedIRKExport, ForwardLiftedIRKExport, SymmetricLiftedIRKExport, SymmetricIRKExport, LiftedERKExport, ThreeSweepsERKExport, AdjointERKExport, ForwardIRKExport, ExportIRK3StageSingleNewton, ExportIRK4StageSingleNewton, ExportCholeskySolver, ExportCholeskyDecomposition, ExportGaussElim, ExportHouseholderQR, ExportGaussNewtonForces, ExportGaussNewtonQpDunes, ExportGaussNewtonCondensed, ExportGaussNewtonHpmpc, ExportGaussNewtonBlockCN2, ExportGaussNewtonCn2Factorization, ExportGaussNewtonGeneric, and ExportGaussNewtonCN2.
|
pure virtual |
Adds all function (forward) declarations of the auto-generated algorithm to given list of declarations.
@param[in] declarations List of declarations. \return SUCCESSFUL_RETURN
Implemented in IntegratorExport, ImplicitRungeKuttaExport, DiscreteTimeExport, ExportLinearSolver, ExplicitRungeKuttaExport, RungeKuttaExport, ExportIRK3StageSimplifiedNewton, ExportIRK4StageSimplifiedNewton, ExportNLPSolver, AdjointLiftedIRKExport, FeedbackLiftedIRKExport, ForwardBackwardLiftedIRKExport, ForwardLiftedIRKExport, SymmetricLiftedIRKExport, SymmetricIRKExport, ForwardIRKExport, ExportIRK3StageSingleNewton, ExportIRK4StageSingleNewton, ExportCholeskySolver, ExportCholeskyDecomposition, ExportGaussElim, ExportHouseholderQR, ExportGaussNewtonForces, ExportGaussNewtonQpDunes, ExportGaussNewtonCondensed, ExportGaussNewtonHpmpc, ExportGaussNewtonBlockCN2, ExportGaussNewtonCn2Factorization, ExportGaussNewtonGeneric, ExportGaussNewtonCN2, ExportExactHessianQpDunes, and ExportExactHessianCN2.
uint ExportAlgorithm::getN | ( | ) | const |
Returns number of control intervals.
Definition at line 128 of file export_algorithm.cpp.
uint ExportAlgorithm::getNDX | ( | ) | const |
Returns the number of differential states derivatives.
uint ExportAlgorithm::getNOD | ( | ) | const |
Returns number of parameters.
Definition at line 122 of file export_algorithm.cpp.
uint ExportAlgorithm::getNP | ( | ) | const |
Returns number of parameters.
Definition at line 117 of file export_algorithm.cpp.
uint ExportAlgorithm::getNU | ( | ) | const |
Returns number of control inputs.
Definition at line 111 of file export_algorithm.cpp.
uint ExportAlgorithm::getNX | ( | ) | const |
Returns number of differential states.
Definition at line 99 of file export_algorithm.cpp.
uint ExportAlgorithm::getNXA | ( | ) | const |
Returns number of algebraic states.
Definition at line 105 of file export_algorithm.cpp.
uint ExportAlgorithm::getNY | ( | ) | const |
Definition at line 138 of file export_algorithm.cpp.
uint ExportAlgorithm::getNYN | ( | ) | const |
Definition at line 148 of file export_algorithm.cpp.
returnValue ExportAlgorithm::setDimensions | ( | uint | _NX = 0 , |
uint | _NU = 0 , |
||
uint | _NP = 0 , |
||
uint | _NI = 0 , |
||
uint | _NOD = 0 |
||
) |
Sets the variables dimensions (ODE).
@param[in] _NX New number of differential states. @param[in] _NU New number of control inputs. @param[in] _NP New number of parameters. @param[in] _NI New number of control intervals. (using _N resulted in a strange error when compiling with cygwin!)
Definition at line 65 of file export_algorithm.cpp.
returnValue ExportAlgorithm::setDimensions | ( | uint | _NX, |
uint | _NDX, | ||
uint | _NXA, | ||
uint | _NU, | ||
uint | _NP, | ||
uint | _NI, | ||
uint | _NOD | ||
) |
Sets the variables dimensions (DAE).
@param[in] _NX New number of differential states. @param[in] _NDX New number of differential states derivatives. @param[in] _NXA New number of algebraic states. @param[in] _NU New number of control inputs. @param[in] _NP New number of parameters. @param[in] _NI New number of control intervals.
Definition at line 77 of file export_algorithm.cpp.
void ExportAlgorithm::setNY | ( | uint | NY_ | ) |
Definition at line 133 of file export_algorithm.cpp.
void ExportAlgorithm::setNYN | ( | uint | NYN_ | ) |
Definition at line 143 of file export_algorithm.cpp.
|
virtual |
Initializes code export into given file.
\return SUCCESSFUL_RETURN
Reimplemented in DiagonallyImplicitRKExport, LiftedERKExport, ThreeSweepsERKExport, AdjointERKExport, ForwardOverBackwardERKExport, IntegratorExport, ImplicitRungeKuttaExport, ForwardIRKExport, DiscreteTimeExport, AdjointLiftedIRKExport, FeedbackLiftedIRKExport, ForwardBackwardLiftedIRKExport, ForwardLiftedIRKExport, SymmetricLiftedIRKExport, SymmetricIRKExport, RungeKuttaExport, ExportCholeskySolver, ExplicitRungeKuttaExport, NARXExport, ExportLinearSolver, ExportNLPSolver, ExportCholeskyDecomposition, ExportGaussElim, ExportHouseholderQR, ExportIRK3StageSimplifiedNewton, ExportIRK3StageSingleNewton, ExportIRK4StageSimplifiedNewton, ExportIRK4StageSingleNewton, ExportGaussNewtonForces, ExportGaussNewtonQpDunes, ExportExactHessianQpDunes, ExportGaussNewtonBlockForces, ExportGaussNewtonCondensed, ExportGaussNewtonBlockQpDunes, ExportGaussNewtonHpmpc, ExportGaussNewtonBlockCN2, ExportExactHessianCN2, ExportGaussNewtonCn2Factorization, ExportGaussNewtonGeneric, and ExportGaussNewtonCN2.
Definition at line 58 of file export_algorithm.cpp.
|
protected |
Name of common header file.
Definition at line 217 of file export_algorithm.hpp.
|
protected |
Number of control intervals.
Definition at line 212 of file export_algorithm.hpp.
|
protected |
Number of differential states derivatives.
Definition at line 207 of file export_algorithm.hpp.
|
protected |
Number of "online data" values.
Definition at line 211 of file export_algorithm.hpp.
|
protected |
Number of parameters.
Definition at line 210 of file export_algorithm.hpp.
|
protected |
Number of control inputs.
Definition at line 209 of file export_algorithm.hpp.
|
protected |
Number of differential states.
Definition at line 206 of file export_algorithm.hpp.
|
protected |
Number of algebraic states.
Definition at line 208 of file export_algorithm.hpp.
|
protected |
Number of references/measurements, nodes 0,..., N - 1.
Definition at line 214 of file export_algorithm.hpp.
|
protected |
Number of references/measurements, node N.
Definition at line 215 of file export_algorithm.hpp.