- 3.0.2 optimal control module.
|
Evaluates the cost at the shots and performs some interpolation in between. More...
#include <CostEvaluatorSimple.h>
Public Types | |
typedef DIMENSIONS::state_vector_t | state_vector_t |
typedef DIMENSIONS::control_vector_t | control_vector_t |
Public Member Functions | |
CostEvaluatorSimple ()=delete | |
CostEvaluatorSimple (std::shared_ptr< ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >> costFct, std::shared_ptr< OptVectorDms< STATE_DIM, CONTROL_DIM, SCALAR >> w, std::shared_ptr< tpl::TimeGrid< SCALAR >> timeGrid, DmsSettings settings) | |
Custom constructor. More... | |
~CostEvaluatorSimple () override=default | |
SCALAR | eval () override |
Evaluates the cost function. More... | |
void | evalGradient (size_t grad_length, Eigen::Map< Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 >> &grad) override |
Evaluates the cost gradient. More... | |
Public Member Functions inherited from ct::optcon::tpl::DiscreteCostEvaluatorBase< SCALAR > | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | DiscreteCostEvaluatorBase ()=default |
Default constructor. More... | |
virtual | ~DiscreteCostEvaluatorBase ()=default |
Destructor. More... | |
virtual void | getSparsityPatternHessian (Eigen::VectorXi &iRow, Eigen::VectorXi &jCol) |
virtual void | sparseHessianValues (const Eigen::VectorXd &optVec, const Eigen::VectorXd &lambda, Eigen::VectorXd &hes) |
Evaluates the cost hessian. More... | |
Public Attributes | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef DmsDimensions< STATE_DIM, CONTROL_DIM, SCALAR > | DIMENSIONS |
Evaluates the cost at the shots and performs some interpolation in between.
STATE_DIM | The state dimension |
CONTROL_DIM | The control dimension |
typedef DIMENSIONS::state_vector_t ct::optcon::CostEvaluatorSimple< STATE_DIM, CONTROL_DIM, SCALAR >::state_vector_t |
typedef DIMENSIONS::control_vector_t ct::optcon::CostEvaluatorSimple< STATE_DIM, CONTROL_DIM, SCALAR >::control_vector_t |
|
delete |
|
inline |
Custom constructor.
[in] | costFct | The cost function |
[in] | w | The optimization variables |
[in] | timeGrid | The time grid |
[in] | settings | The dms settings |
References ct::optcon::CostEvaluatorSimple< STATE_DIM, CONTROL_DIM, SCALAR >::eval(), ct::optcon::CostEvaluatorSimple< STATE_DIM, CONTROL_DIM, SCALAR >::evalGradient(), ct::optcon::DmsSettings::N_, and ct::optcon::CostEvaluatorSimple< STATE_DIM, CONTROL_DIM, SCALAR >::~CostEvaluatorSimple().
|
overridedefault |
|
overridevirtual |
Evaluates the cost function.
Implements ct::optcon::tpl::DiscreteCostEvaluatorBase< SCALAR >.
References i, and ct::optcon::DmsSettings::N_.
Referenced by ct::optcon::CostEvaluatorSimple< STATE_DIM, CONTROL_DIM, SCALAR >::CostEvaluatorSimple().
|
overridevirtual |
Evaluates the cost gradient.
[in] | grad_length | The size of the gradient vector |
[out] | grad | The values of the gradient |
Implements ct::optcon::tpl::DiscreteCostEvaluatorBase< SCALAR >.
References i, ct::optcon::DmsSettings::N_, ct::optcon::DmsSettings::PIECEWISE_LINEAR, ct::optcon::DmsSettings::splineType_, and ct::optcon::DmsSettings::ZERO_ORDER_HOLD.
Referenced by ct::optcon::CostEvaluatorSimple< STATE_DIM, CONTROL_DIM, SCALAR >::CostEvaluatorSimple().
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef DmsDimensions<STATE_DIM, CONTROL_DIM, SCALAR> ct::optcon::CostEvaluatorSimple< STATE_DIM, CONTROL_DIM, SCALAR >::DIMENSIONS |