class
ImplicitTrapezoidalBase classes
- class FixedStepIntegrator
Constructors, destructors, conversion operators
- ImplicitTrapezoidal()
-
ImplicitTrapezoidal(const std::shared_ptr<iDynTree::
optimalcontrol:: DynamicalSystem> dynamicalSystem) - ~ImplicitTrapezoidal() override
Public functions
- auto evaluateCollocationConstraint(double time, const std::vector<VectorDynSize>& collocationPoints, const std::vector<VectorDynSize>& controlInputs, double dT, VectorDynSize& constraintValue) -> bool override
- Evaluate the collocation constraint.
- auto evaluateCollocationConstraintJacobian(double time, const std::vector<VectorDynSize>& collocationPoints, const std::vector<VectorDynSize>& controlInputs, double dT, std::vector<MatrixDynSize>& stateJacobianValues, std::vector<MatrixDynSize>& controlJacobianValues) -> bool override
- auto getCollocationConstraintJacobianStateSparsity(std::vector<SparsityStructure>& stateJacobianSparsity) -> bool override
- auto getCollocationConstraintJacobianControlSparsity(std::vector<SparsityStructure>& controlJacobianSparsity) -> bool override
- auto evaluateCollocationConstraintSecondDerivatives(double time, const std::vector<VectorDynSize>& collocationPoints, const std::vector<VectorDynSize>& controlInputs, double dT, const VectorDynSize& lambda, CollocationHessianMap& stateSecondDerivative, CollocationHessianMap& controlSecondDerivative, CollocationHessianMap& stateControlSecondDerivative) -> bool override
- auto getCollocationConstraintSecondDerivativeWRTStateSparsity(CollocationHessianSparsityMap& stateDerivativeSparsity) -> bool override
- auto getCollocationConstraintSecondDerivativeWRTControlSparsity(CollocationHessianSparsityMap& controlDerivativeSparsity) -> bool override
- auto getCollocationConstraintSecondDerivativeWRTStateControlSparsity(CollocationHessianSparsityMap& stateControlDerivativeSparsity) -> bool override
Private functions
- auto allocateBuffers() -> bool override
- auto oneStepIntegration(double t0, double dT, const VectorDynSize& x0, VectorDynSize& x) -> bool override
Function documentation
bool iDynTree:: optimalcontrol:: integrators:: ImplicitTrapezoidal:: evaluateCollocationConstraint(double time,
const std::vector<VectorDynSize>& collocationPoints,
const std::vector<VectorDynSize>& controlInputs,
double dT,
VectorDynSize& constraintValue) override
Evaluate the collocation constraint.
Parameters | |
---|---|
time in | Instant at which the collocation constraint is evaluated |
collocationPoints in | A vector containing and . Notice that corresponds to the state at instant (time + dT). |
controlInputs in | A vector containing and . Notice that is supposed to be applied at instant (time + dT). |
dT in | The time distance between and . |
constraintValue out | The result of . |
Returns | True if successfull, false otherwise (or if not implemented). |
In some optimal control solvers, like the MultipleShootingSolver, we need to discretize the dynamical system associated to the optimal control problem. This function evaluates the discretization error according to specified integration method. The Integrator, when integrating a dynamical system, is performing the following discretization:
where is the discretized output. For example, using forward euler, we would have
This function returns the result of .