- 3.0.2 optimal control module.
|
This class sets up the constraints and its first order derivatives described previously. More...
Public Types | |
using | VectorXs = Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 > |
using | VectorXs = Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 > |
Public Types inherited from ct::optcon::tpl::DiscreteConstraintBase< SCALAR > | |
using | VectorXs = Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 > |
Public Member Functions | |
ExampleConstraints (std::shared_ptr< tpl::OptVector< SCALAR >> optVector) | |
~ExampleConstraints () override=default | |
VectorXs | getLowerBound () override |
Returns the lower bound of the constraint. More... | |
VectorXs | getUpperBound () override |
Returns the upper bound of the constraint. More... | |
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 | getConstraintSize () override |
Returns size of the constraint vector. 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... | |
void | sparseHessianValues (const Eigen::VectorXd &optVec, const Eigen::VectorXd &lambda, Eigen::VectorXd &sparseHes) override |
Returns the non zero elements (values) of the Hessian matrix of this constraint. More... | |
void | genSparsityPatternHessian (Eigen::VectorXi &iRow_vec, Eigen::VectorXi &jCol_vec) override |
Returns the sparsity structure of the constraint hessian. More... | |
ExampleConstraints (std::shared_ptr< tpl::OptVector< SCALAR >> optVector) | |
~ExampleConstraints () override=default | |
VectorXs | getLowerBound () override |
Returns the lower bound of the constraint. More... | |
VectorXs | getUpperBound () override |
Returns the upper bound of the constraint. More... | |
VectorXs | eval () override |
Evaluates the constraint violation. More... | |
size_t | getConstraintSize () override |
Returns size of the constraint vector. 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 | evalSparseJacobian () override |
Returns the non zero elements of the eval method with respect to the optimization variables. More... | |
void | genSparsityPatternHessian (Eigen::VectorXi &iRow_vec, Eigen::VectorXi &jCol_vec) override |
void | sparseHessianValues (const Eigen::VectorXd &optVec, const Eigen::VectorXd &lambda, Eigen::VectorXd &sparseHes) override |
Public Member Functions inherited from ct::optcon::tpl::DiscreteConstraintBase< SCALAR > | |
DiscreteConstraintBase ()=default | |
Default constructor. More... | |
virtual | ~DiscreteConstraintBase ()=default |
Destructor. More... | |
Eigen::VectorXi & | iRowHessian () |
Eigen::VectorXi & | jColHessian () |
Static Public Attributes | |
static const size_t | dimConstraints = 2 |
static const size_t | nnzJac = 6 |
static const size_t | nnzHes = 3 |
Additional Inherited Members | |
Protected Member Functions inherited from ct::optcon::tpl::DiscreteConstraintBase< SCALAR > | |
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... | |
Protected Attributes inherited from ct::optcon::tpl::DiscreteConstraintBase< SCALAR > | |
Eigen::VectorXi | iRowHessian_ |
Eigen::VectorXi | jColHessian_ |
This class sets up the constraints and its first order derivatives described previously.
SCALAR | Scalar type |
using ExampleConstraints< SCALAR >::VectorXs = Eigen::Matrix<SCALAR, Eigen::Dynamic, 1> |
using ExampleConstraints< SCALAR >::VectorXs = Eigen::Matrix<SCALAR, Eigen::Dynamic, 1> |
|
inline |
|
overridedefault |
|
inline |
|
overridedefault |
|
inlineoverridevirtual |
Returns the lower bound of the constraint.
Implements ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
Returns the upper bound of the constraint.
Implements ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
Evaluates the constraint violation.
Implements ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
Returns the non zero elements of the eval method with respect to the optimization variables.
Implements ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
Returns size of the constraint vector.
Implements ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
Returns the number of non zero elements of the jacobian.
Implements ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
Returns the sparsity structure of the constraint jacobian.
[out] | iRow_vec | A vector containing the row indices of the non zero elements of the constraint jacobian |
[out] | jCol_vec | A vector containing the column indices of the non zero elements of the constraint jacobian |
Implements ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
Returns the non zero elements (values) of the Hessian matrix of this constraint.
[in] | optVec | A vector holding the current optimization variable vector |
[in] | lambda | A vector holding the current constraint multipliers (one scalar for each row of constraints) |
[out] | sparseHes | The sparse hessian values |
Reimplemented from ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
Returns the sparsity structure of the constraint hessian.
[out] | iRow_vec | A vector containing the row indices of the non zero elements of the constraint hessian |
[out] | jCol_vec | A vector containing the column indices of the non zero elements of the constraint hessian |
Reimplemented from ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
Returns the lower bound of the constraint.
Implements ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
Returns the upper bound of the constraint.
Implements ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
Evaluates the constraint violation.
Implements ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
Returns size of the constraint vector.
Implements ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
Returns the number of non zero elements of the jacobian.
Implements ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
Returns the sparsity structure of the constraint jacobian.
[out] | iRow_vec | A vector containing the row indices of the non zero elements of the constraint jacobian |
[out] | jCol_vec | A vector containing the column indices of the non zero elements of the constraint jacobian |
Implements ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
Returns the non zero elements of the eval method with respect to the optimization variables.
Implements ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
generate block-diagonal sparsity pattern for Hessian
Reimplemented from ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
inlineoverridevirtual |
Reimplemented from ct::optcon::tpl::DiscreteConstraintBase< SCALAR >.
|
static |
|
static |
|
static |