The class takes continuous constraints defined with the constraint toolbox and discretizes them over the DMS shots. These discretized constraints can then be used in the NLP module.
More...
|
| ConstraintDiscretizer ()=default |
| Default constructor. More...
|
|
| ~ConstraintDiscretizer () override=default |
| Destructor. More...
|
|
| ConstraintDiscretizer (std::shared_ptr< OptVectorDms< STATE_DIM, CONTROL_DIM, SCALAR >> w, std::shared_ptr< SplinerBase< control_vector_t, SCALAR >> controlSpliner, std::shared_ptr< tpl::TimeGrid< SCALAR >> timeGrid, size_t N) |
| Custom constructor. More...
|
|
void | setBoxConstraints (std::shared_ptr< LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >> boxConstraints) |
|
void | setGeneralConstraints (std::shared_ptr< LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >> generalConstraints) |
|
VectorXs | eval () override |
| Evaluates the constraint violation. More...
|
|
VectorXs | evalSparseJacobian () override |
| Returns the non zero elements of the eval method with respect to the optimization variables. More...
|
|
size_t | getNumNonZerosJacobian () override |
| Returns the number of non zero elements of the jacobian. More...
|
|
void | genSparsityPattern (Eigen::VectorXi &iRow_vec, Eigen::VectorXi &jCol_vec) override |
| Returns the sparsity structure of the constraint jacobian. More...
|
|
VectorXs | getLowerBound () override |
| Returns the lower bound of the constraint. More...
|
|
VectorXs | getUpperBound () override |
| Returns the upper bound of the constraint. More...
|
|
size_t | getConstraintSize () override |
| Returns size of the constraint vector. More...
|
|
| DiscreteConstraintBase ()=default |
| Default constructor. More...
|
|
virtual | ~DiscreteConstraintBase ()=default |
| Destructor. More...
|
|
virtual void | genSparsityPatternHessian (Eigen::VectorXi &iRow_vec, Eigen::VectorXi &jCol_vec) |
| Returns the sparsity structure of the constraint hessian. More...
|
|
virtual void | sparseHessianValues (const Eigen::VectorXd &optVec, const Eigen::VectorXd &lambda, Eigen::VectorXd &sparseHes) |
| Returns the non zero elements (values) of the Hessian matrix of this constraint. More...
|
|
Eigen::VectorXi & | iRowHessian () |
|
Eigen::VectorXi & | jColHessian () |
|
|
size_t | genDiagonalIndices (const size_t col_start, const size_t num_elements, Eigen::VectorXi &iRow_vec, Eigen::VectorXi &jCol_vec, const size_t indexNumber) |
| This method generates Row and Column vectors which indicate the sparsity pattern of the constraint jacobian for a quadratic matrix block containing diagonal entries only. More...
|
|
size_t | genBlockIndices (const size_t col_start, const size_t num_rows, const size_t num_cols, Eigen::VectorXi &iRow_vec, Eigen::VectorXi &jCol_vec, const size_t indexNumber) |
| This method generates Row and Column vectors which indicate the sparsity pattern of the constraint jacobian for an arbitrary dense matrix block. More...
|
|
Eigen::VectorXi | iRowHessian_ |
|
Eigen::VectorXi | jColHessian_ |
|
template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
class ct::optcon::ConstraintDiscretizer< STATE_DIM, CONTROL_DIM, SCALAR >
The class takes continuous constraints defined with the constraint toolbox and discretizes them over the DMS shots. These discretized constraints can then be used in the NLP module.
- Template Parameters
-
STATE_DIM | The state dimension |
CONTROL_DIM | The input dimension |