![]() |
- 3.0.2 optimal control module.
|
Container class for the constraints used in DMS. More...
#include <ConstraintsContainerDms.h>
Public Types | |
| typedef DIMENSIONS::state_vector_t | state_vector_t |
| typedef DIMENSIONS::control_vector_t | control_vector_t |
| typedef DIMENSIONS::state_matrix_t | state_matrix_t |
| typedef DIMENSIONS::control_matrix_t | control_matrix_t |
| typedef DIMENSIONS::state_control_matrix_t | state_control_matrix_t |
| typedef DIMENSIONS::state_matrix_array_t | state_matrix_array_t |
| typedef DIMENSIONS::state_control_matrix_array_t | state_control_matrix_array_t |
Public Types inherited from ct::optcon::tpl::DiscreteConstraintContainerBase< SCALAR > | |
| using | VectorXs = Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 > |
| using | VectorXi = Eigen::Matrix< int, Eigen::Dynamic, 1 > |
| using | MapVecXs = Eigen::Map< VectorXs > |
| using | MapVecXi = Eigen::Map< VectorXi > |
Public Member Functions | |
| ConstraintsContainerDms (std::shared_ptr< OptVectorDms< STATE_DIM, CONTROL_DIM, SCALAR >> w, std::shared_ptr< tpl::TimeGrid< SCALAR >> timeGrid, std::vector< std::shared_ptr< ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >>> shotContainers, std::shared_ptr< ConstraintDiscretizer< STATE_DIM, CONTROL_DIM, SCALAR >> discretizedConstraints, const state_vector_t &x0, const DmsSettings settings) | |
| Custom constructor. More... | |
| ~ConstraintsContainerDms () override=default | |
| Destructor. More... | |
| void | prepareEvaluation () override |
| Gets called before the constraint evaluation. This method should contain all the calculations needed to evaluate the constraints. More... | |
| void | prepareJacobianEvaluation () override |
| Gets called before the constraint jacobian evaluation. This method should contain all the calculations needed to evaluate the constraint jacobian. More... | |
| void | changeInitialConstraint (const state_vector_t &x0) |
| Updates the initial constraint. More... | |
Public Member Functions inherited from ct::optcon::tpl::DiscreteConstraintContainerBase< SCALAR > | |
| DiscreteConstraintContainerBase ()=default | |
| Default constructor. More... | |
| virtual | ~DiscreteConstraintContainerBase ()=default |
| Destructor. More... | |
| void | evalConstraints (MapVecXs &c_nlp) |
| Writes the constraint evaluations into the large constraint optimization vector. More... | |
| void | evalConstraints (VectorXs &c_nlp) |
| void | evalSparseJacobian (MapVecXs &jac_nlp, const int nzz_jac_g) |
| Evaluates the jacobian of the constraints and writes them into the nlp vector. More... | |
| void | getSparsityPattern (Eigen::Map< Eigen::VectorXi > &iRow_nlp, Eigen::Map< Eigen::VectorXi > &jCol_nlp, const int nnz_jac_g) |
| Retrieves the sparsity pattern of the constraint Jacobian and writes them into the nlp vectors. More... | |
| size_t | getConstraintsCount () const |
| Returns the number of constraints in the NLP. More... | |
| size_t | getNonZerosJacobianCount () const |
| Returns the number of non zeros in the constraint jacobian. More... | |
| void | getSparsityPatternHessian (Eigen::VectorXi &iRow, Eigen::VectorXi &jCol, size_t numOptVar) |
| creates the combined hessian sparsity pattern from a number of constraint terms More... | |
| Eigen::VectorXd | sparseHessianValues (const Eigen::VectorXd &optVec, const Eigen::VectorXd &lambda) |
| Evaluates the constraint Hessian. More... | |
| void | getBounds (MapVecXs &lowerBound, MapVecXs &upperBound) |
| Retrieves the constraint bounds and writes them into the vectors used in the NLP. More... | |
Public Attributes | |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef DmsDimensions< STATE_DIM, CONTROL_DIM, SCALAR > | DIMENSIONS |
Additional Inherited Members | |
Protected Attributes inherited from ct::optcon::tpl::DiscreteConstraintContainerBase< SCALAR > | |
| std::vector< std::shared_ptr< DiscreteConstraintBase< SCALAR > > > | constraints_ |
| Container which holds all the constraints of the NLP. More... | |
| std::vector< int > | iRowHessianStdVec_ |
| std::vector< int > | jColHessianStdVec_ |
Container class for the constraints used in DMS.
| STATE_DIM | The state dimension |
| CONTROL_DIM | The control dimension |
| typedef DIMENSIONS::state_vector_t ct::optcon::ConstraintsContainerDms< STATE_DIM, CONTROL_DIM, SCALAR >::state_vector_t |
| typedef DIMENSIONS::control_vector_t ct::optcon::ConstraintsContainerDms< STATE_DIM, CONTROL_DIM, SCALAR >::control_vector_t |
| typedef DIMENSIONS::state_matrix_t ct::optcon::ConstraintsContainerDms< STATE_DIM, CONTROL_DIM, SCALAR >::state_matrix_t |
| typedef DIMENSIONS::control_matrix_t ct::optcon::ConstraintsContainerDms< STATE_DIM, CONTROL_DIM, SCALAR >::control_matrix_t |
| typedef DIMENSIONS::state_control_matrix_t ct::optcon::ConstraintsContainerDms< STATE_DIM, CONTROL_DIM, SCALAR >::state_control_matrix_t |
| typedef DIMENSIONS::state_matrix_array_t ct::optcon::ConstraintsContainerDms< STATE_DIM, CONTROL_DIM, SCALAR >::state_matrix_array_t |
| typedef DIMENSIONS::state_control_matrix_array_t ct::optcon::ConstraintsContainerDms< STATE_DIM, CONTROL_DIM, SCALAR >::state_control_matrix_array_t |
| ConstraintsContainerDms::ConstraintsContainerDms | ( | std::shared_ptr< OptVectorDms< STATE_DIM, CONTROL_DIM, SCALAR >> | w, |
| std::shared_ptr< tpl::TimeGrid< SCALAR >> | timeGrid, | ||
| std::vector< std::shared_ptr< ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >>> | shotContainers, | ||
| std::shared_ptr< ConstraintDiscretizer< STATE_DIM, CONTROL_DIM, SCALAR >> | discretizedConstraints, | ||
| const state_vector_t & | x0, | ||
| const DmsSettings | settings | ||
| ) |
Custom constructor.
| [in] | w | The optimization variables |
| [in] | timeGrid | The time grid |
| [in] | shotContainers | The shot containers |
| [in] | constraintsIntermediate | The intermediate constraints |
| [in] | constraintsFinal | The final constraints |
| [in] | x0 | The initial state |
| [in] | settings | The dms settings |
|
overridedefault |
Destructor.
|
overridevirtual |
Gets called before the constraint evaluation. This method should contain all the calculations needed to evaluate the constraints.
Implements ct::optcon::tpl::DiscreteConstraintContainerBase< SCALAR >.
|
overridevirtual |
Gets called before the constraint jacobian evaluation. This method should contain all the calculations needed to evaluate the constraint jacobian.
Implements ct::optcon::tpl::DiscreteConstraintContainerBase< SCALAR >.
| void ConstraintsContainerDms::changeInitialConstraint | ( | const state_vector_t & | x0 | ) |
Updates the initial constraint.
| [in] | x0 | The new initial state |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef DmsDimensions<STATE_DIM, CONTROL_DIM, SCALAR> ct::optcon::ConstraintsContainerDms< STATE_DIM, CONTROL_DIM, SCALAR >::DIMENSIONS |