- 3.0.2 optimal control module.
|
Describes a cost function with a quadratic approximation, i.e. one that can compute first and second order derivatives with respect to state and control input. This does NOT mean it has to be a purely quadratic cost function. If you are looking for a purely quadratic cost function, check CostFunctionQuadraticSimple. More...
#include <CostFunctionQuadratic.hpp>
Public Types | |
typedef Eigen::Matrix< SCALAR, CONTROL_DIM, CONTROL_DIM > | control_matrix_t |
typedef Eigen::Matrix< SCALAR, CONTROL_DIM, STATE_DIM > | control_state_matrix_t |
typedef core::StateVector< STATE_DIM, SCALAR > | state_vector_t |
typedef core::ControlVector< CONTROL_DIM, SCALAR > | control_vector_t |
typedef CostFunction< STATE_DIM, CONTROL_DIM, SCALAR > | BASE |
Public Types inherited from ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR > | |
typedef core::ControlVector< CONTROL_DIM, SCALAR > | control_vector_t |
Public Member Functions | |
CostFunctionQuadratic () | |
CostFunctionQuadratic (const CostFunctionQuadratic &arg) | |
virtual CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR > * | clone () const =0 |
virtual | ~CostFunctionQuadratic () |
virtual size_t | addIntermediateTerm (std::shared_ptr< TermBase< STATE_DIM, CONTROL_DIM, SCALAR >> term, bool verbose=false) |
Adds an intermediate term. More... | |
virtual size_t | addFinalTerm (std::shared_ptr< TermBase< STATE_DIM, CONTROL_DIM, SCALAR >> term, bool verbose=false) |
Adds a final term. More... | |
virtual void | loadFromConfigFile (const std::string &filename, bool verbose=false) |
Loads cost function from config file. More... | |
virtual state_vector_t | stateDerivativeIntermediate ()=0 |
Computes intermediate-cost first-order derivative with respect to state. More... | |
virtual state_vector_t | stateDerivativeTerminal ()=0 |
virtual state_matrix_t | stateSecondDerivativeIntermediate ()=0 |
Computes intermediate-cost second-order derivative with respect to state. More... | |
virtual state_matrix_t | stateSecondDerivativeTerminal ()=0 |
Computes final-cost second-order derivative with respect to state. More... | |
virtual control_vector_t | controlDerivativeIntermediate ()=0 |
Computes intermediate-cost first-order derivative with respect to control. More... | |
virtual control_vector_t | controlDerivativeTerminal () |
Computes terminal-cost first-order derivative with respect to control. More... | |
virtual control_matrix_t | controlSecondDerivativeIntermediate ()=0 |
Computes intermediate-cost second-order derivative with respect to input. More... | |
virtual control_matrix_t | controlSecondDerivativeTerminal () |
Computes final-cost second-order derivative with respect to input. More... | |
virtual control_state_matrix_t | stateControlDerivativeIntermediate ()=0 |
Computes intermediate-cost derivative with respect to state and control. More... | |
virtual control_state_matrix_t | stateControlDerivativeTerminal () |
Computes final-cost derivative with respect to state and control. More... | |
virtual void | updateReferenceState (const state_vector_t &x_ref) |
update the reference state for intermediate cost terms More... | |
virtual void | updateFinalState (const state_vector_t &x_final) |
update the reference state for final cost terms More... | |
virtual void | updateReferenceControl (const control_vector_t &u_ref) |
update the reference control for intermediate cost terms More... | |
bool | stateDerivativeIntermediateTest (bool verbose=false) |
compare the state derivative against numerical differentiation More... | |
bool | controlDerivativeIntermediateTest (bool verbose=false) |
compare the control derivative against numerical differentiation More... | |
std::shared_ptr< TermBase< STATE_DIM, CONTROL_DIM, SCALAR > > | getIntermediateTermById (const size_t id) |
std::shared_ptr< TermBase< STATE_DIM, CONTROL_DIM, SCALAR > > | getFinalTermById (const size_t id) |
std::shared_ptr< TermBase< STATE_DIM, CONTROL_DIM, SCALAR > > | getIntermediateTermByName (const std::string &name) |
std::shared_ptr< TermBase< STATE_DIM, CONTROL_DIM, SCALAR > > | getFinalTermByName (const std::string &name) |
virtual void | initialize () |
initialize the cost function (e.g. to be used in CostFunctionAD) More... | |
Public Member Functions inherited from ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR > | |
CostFunction () | |
Default constructor. More... | |
virtual | ~CostFunction () |
Destructor. More... | |
CostFunction (const CostFunction &arg) | |
Copy constructor. More... | |
virtual void | setCurrentStateAndControl (const state_vector_t &x, const control_vector_t &u, const SCALAR &t=SCALAR(0.0)) |
virtual void | getCurrentStateAndControl (Eigen::Matrix< SCALAR, STATE_DIM, 1 > &x, Eigen::Matrix< SCALAR, CONTROL_DIM, 1 > &u, SCALAR &t) const |
sets current state, control and time More... | |
virtual SCALAR | evaluateIntermediate ()=0 |
evaluate intermediate costs More... | |
virtual SCALAR | evaluateTerminal ()=0 |
evaluate terminal costs More... | |
virtual void | shiftTime (const SCALAR t) |
Public Attributes | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef Eigen::Matrix< SCALAR, STATE_DIM, STATE_DIM > | state_matrix_t |
Public Attributes inherited from ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR > | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef core::StateVector< STATE_DIM, SCALAR > | state_vector_t |
Protected Member Functions | |
SCALAR | evaluateIntermediateBase () |
evaluate intermediate analytical cost terms More... | |
SCALAR | evaluateTerminalBase () |
evaluate terminal analytical cost terms More... | |
state_vector_t | stateDerivativeIntermediateBase () |
evaluate intermediate analytical state derivatives More... | |
state_vector_t | stateDerivativeTerminalBase () |
evaluate terminal analytical state derivatives More... | |
state_matrix_t | stateSecondDerivativeIntermediateBase () |
evaluate intermediate analytical state second derivatives More... | |
state_matrix_t | stateSecondDerivativeTerminalBase () |
evaluate terminal analytical state second derivatives More... | |
control_vector_t | controlDerivativeIntermediateBase () |
evaluate intermediate analytical control derivatives More... | |
control_vector_t | controlDerivativeTerminalBase () |
evaluate terminal analytical control derivatives More... | |
control_matrix_t | controlSecondDerivativeIntermediateBase () |
evaluate intermediate analytical control second derivatives More... | |
control_matrix_t | controlSecondDerivativeTerminalBase () |
evaluate terminal analytical control second derivatives More... | |
control_state_matrix_t | stateControlDerivativeIntermediateBase () |
evaluate intermediate analytical control mixed state control derivatives More... | |
control_state_matrix_t | stateControlDerivativeTerminalBase () |
evaluate terminal analytical control mixed state control derivatives More... | |
state_vector_t | stateDerivativeIntermediateNumDiff () |
compute the state derivative by numerical differentiation (can be used for testing) More... | |
control_vector_t | controlDerivativeIntermediateNumDiff () |
compute the control derivative by numerical differentiation (can be used for testing) More... | |
Protected Attributes | |
SCALAR | eps_ |
stepsize for numerical differentiation More... | |
bool | doubleSidedDerivative_ = true |
use double sided derivatives in numerical differentiation More... | |
std::vector< std::shared_ptr< TermBase< STATE_DIM, CONTROL_DIM, SCALAR > > > | intermediateCostAnalytical_ |
std::vector< std::shared_ptr< TermBase< STATE_DIM, CONTROL_DIM, SCALAR > > > | finalCostAnalytical_ |
Protected Attributes inherited from ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR > | |
state_vector_t | x_ |
control_vector_t | u_ |
SCALAR | t_ |
SCALAR | t_shift_ |
Describes a cost function with a quadratic approximation, i.e. one that can compute first and second order derivatives with respect to state and control input. This does NOT mean it has to be a purely quadratic cost function. If you are looking for a purely quadratic cost function, check CostFunctionQuadraticSimple.
A cost function is assumed to be a sum of intermediate and final terms, i.e. These terms can have arbitrary form.
typedef Eigen::Matrix<SCALAR, CONTROL_DIM, CONTROL_DIM> ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::control_matrix_t |
typedef Eigen::Matrix<SCALAR, CONTROL_DIM, STATE_DIM> ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::control_state_matrix_t |
typedef core::StateVector<STATE_DIM, SCALAR> ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::state_vector_t |
typedef core::ControlVector<CONTROL_DIM, SCALAR> ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::control_vector_t |
typedef CostFunction<STATE_DIM, CONTROL_DIM, SCALAR> ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::BASE |
ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::CostFunctionQuadratic | ( | ) |
Constructor
ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::CostFunctionQuadratic | ( | const CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR > & | arg | ) |
Copy constructor
arg | other cost function |
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::finalCostAnalytical_, i, and ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::intermediateCostAnalytical_.
|
virtual |
Destructor
References ct::optcon::example::verbose.
|
pure virtual |
Clones the cost function.
Implements ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >.
Implemented in ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >, and ct::optcon::CostFunctionQuadraticSimple< STATE_DIM, CONTROL_DIM, SCALAR >.
|
virtual |
Adds an intermediate term.
term | intermediate term |
verbose | verbosity flag which enables printout |
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::intermediateCostAnalytical_.
Referenced by ct::optcon::example::TEST().
|
virtual |
Adds a final term.
term | final term |
verbose | verbosity flag which enables printout |
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::finalCostAnalytical_.
Referenced by ct::optcon::example::TEST().
|
virtual |
Loads cost function from config file.
filename | config file location |
verbose | verbosity flag which enables printout |
Reimplemented in ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >.
|
pure virtual |
Computes intermediate-cost first-order derivative with respect to state.
Implemented in ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >, and ct::optcon::CostFunctionQuadraticSimple< STATE_DIM, CONTROL_DIM, SCALAR >.
Referenced by ct::optcon::example::compareCostFunctionOutput(), ct::optcon::example::printCostFunctionOutput(), ct::optcon::LQOCProblem< STATE_DIM, CONTROL_DIM, SCALAR >::setFromTimeInvariantLinearQuadraticProblem(), and ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeIntermediateTest().
|
pure virtual |
Computes terminal-cost first-order derivative with respect to state
Implemented in ct::optcon::CostFunctionQuadraticSimple< STATE_DIM, CONTROL_DIM, SCALAR >, and ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >.
Referenced by ct::optcon::example::compareCostFunctionOutput(), ct::optcon::example::printCostFunctionOutput(), and ct::optcon::LQOCProblem< STATE_DIM, CONTROL_DIM, SCALAR >::setFromTimeInvariantLinearQuadraticProblem().
|
pure virtual |
Computes intermediate-cost second-order derivative with respect to state.
Implemented in ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >, and ct::optcon::CostFunctionQuadraticSimple< STATE_DIM, CONTROL_DIM, SCALAR >.
Referenced by ct::optcon::example::compareCostFunctionOutput(), ct::optcon::example::printCostFunctionOutput(), and ct::optcon::LQOCProblem< STATE_DIM, CONTROL_DIM, SCALAR >::setFromTimeInvariantLinearQuadraticProblem().
|
pure virtual |
Computes final-cost second-order derivative with respect to state.
Implemented in ct::optcon::CostFunctionQuadraticSimple< STATE_DIM, CONTROL_DIM, SCALAR >, and ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >.
Referenced by ct::optcon::example::compareCostFunctionOutput(), ct::optcon::example::printCostFunctionOutput(), and ct::optcon::LQOCProblem< STATE_DIM, CONTROL_DIM, SCALAR >::setFromTimeInvariantLinearQuadraticProblem().
|
pure virtual |
Computes intermediate-cost first-order derivative with respect to control.
Implemented in ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >, and ct::optcon::CostFunctionQuadraticSimple< STATE_DIM, CONTROL_DIM, SCALAR >.
Referenced by ct::optcon::example::compareCostFunctionOutput(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlDerivativeIntermediateTest(), ct::optcon::example::printCostFunctionOutput(), and ct::optcon::LQOCProblem< STATE_DIM, CONTROL_DIM, SCALAR >::setFromTimeInvariantLinearQuadraticProblem().
|
virtual |
Computes terminal-cost first-order derivative with respect to control.
Not available for all cost functions. Throws an exception if not available.
Reimplemented in ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >.
Referenced by ct::optcon::example::compareCostFunctionOutput(), and ct::optcon::example::printCostFunctionOutput().
|
pure virtual |
Computes intermediate-cost second-order derivative with respect to input.
Implemented in ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >, and ct::optcon::CostFunctionQuadraticSimple< STATE_DIM, CONTROL_DIM, SCALAR >.
Referenced by ct::optcon::example::compareCostFunctionOutput(), ct::optcon::example::printCostFunctionOutput(), and ct::optcon::LQOCProblem< STATE_DIM, CONTROL_DIM, SCALAR >::setFromTimeInvariantLinearQuadraticProblem().
|
virtual |
Computes final-cost second-order derivative with respect to input.
Not available for all cost functions. Throws an exception if not available.
Reimplemented in ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >.
Referenced by ct::optcon::example::compareCostFunctionOutput(), and ct::optcon::example::printCostFunctionOutput().
|
pure virtual |
Computes intermediate-cost derivative with respect to state and control.
Implemented in ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >, and ct::optcon::CostFunctionQuadraticSimple< STATE_DIM, CONTROL_DIM, SCALAR >.
Referenced by ct::optcon::example::compareCostFunctionOutput(), ct::optcon::example::printCostFunctionOutput(), and ct::optcon::LQOCProblem< STATE_DIM, CONTROL_DIM, SCALAR >::setFromTimeInvariantLinearQuadraticProblem().
|
virtual |
Computes final-cost derivative with respect to state and control.
Reimplemented in ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >.
Referenced by ct::optcon::example::compareCostFunctionOutput(), and ct::optcon::example::printCostFunctionOutput().
|
virtual |
update the reference state for intermediate cost terms
Reimplemented in ct::optcon::CostFunctionQuadraticSimple< STATE_DIM, CONTROL_DIM, SCALAR >.
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::intermediateCostAnalytical_.
|
virtual |
update the reference state for final cost terms
Reimplemented in ct::optcon::CostFunctionQuadraticSimple< STATE_DIM, CONTROL_DIM, SCALAR >.
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::finalCostAnalytical_.
|
virtual |
update the reference control for intermediate cost terms
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::intermediateCostAnalytical_.
bool ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeIntermediateTest | ( | bool | verbose = false | ) |
compare the state derivative against numerical differentiation
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeIntermediate(), and ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeIntermediateNumDiff().
bool ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlDerivativeIntermediateTest | ( | bool | verbose = false | ) |
compare the control derivative against numerical differentiation
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlDerivativeIntermediate(), and ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlDerivativeIntermediateNumDiff().
std::shared_ptr< TermBase< STATE_DIM, CONTROL_DIM, SCALAR > > ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::getIntermediateTermById | ( | const size_t | id | ) |
std::shared_ptr< TermBase< STATE_DIM, CONTROL_DIM, SCALAR > > ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::getFinalTermById | ( | const size_t | id | ) |
std::shared_ptr< TermBase< STATE_DIM, CONTROL_DIM, SCALAR > > ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::getIntermediateTermByName | ( | const std::string & | name | ) |
std::shared_ptr< TermBase< STATE_DIM, CONTROL_DIM, SCALAR > > ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::getFinalTermByName | ( | const std::string & | name | ) |
|
virtual |
initialize the cost function (e.g. to be used in CostFunctionAD)
do nothing at all
|
protected |
evaluate intermediate analytical cost terms
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::intermediateCostAnalytical_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::t_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::u_, and ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::x_.
Referenced by ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::evaluateIntermediate().
|
protected |
evaluate terminal analytical cost terms
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::finalCostAnalytical_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::t_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::u_, and ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::x_.
Referenced by ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::evaluateTerminal().
|
protected |
evaluate intermediate analytical state derivatives
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::intermediateCostAnalytical_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::t_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::u_, and ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::x_.
Referenced by ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeIntermediate().
|
protected |
evaluate terminal analytical state derivatives
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::finalCostAnalytical_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::t_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::u_, and ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::x_.
Referenced by ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeTerminal().
|
protected |
evaluate intermediate analytical state second derivatives
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::intermediateCostAnalytical_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::t_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::u_, and ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::x_.
Referenced by ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::stateSecondDerivativeIntermediate().
|
protected |
evaluate terminal analytical state second derivatives
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::finalCostAnalytical_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::t_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::u_, and ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::x_.
Referenced by ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::stateSecondDerivativeTerminal().
|
protected |
evaluate intermediate analytical control derivatives
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::intermediateCostAnalytical_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::t_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::u_, and ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::x_.
Referenced by ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::controlDerivativeIntermediate().
|
protected |
evaluate terminal analytical control derivatives
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::finalCostAnalytical_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::t_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::u_, and ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::x_.
Referenced by ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::controlDerivativeTerminal().
|
protected |
evaluate intermediate analytical control second derivatives
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::intermediateCostAnalytical_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::t_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::u_, and ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::x_.
Referenced by ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::controlSecondDerivativeIntermediate().
|
protected |
evaluate terminal analytical control second derivatives
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::finalCostAnalytical_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::t_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::u_, and ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::x_.
Referenced by ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::controlSecondDerivativeTerminal().
|
protected |
evaluate intermediate analytical control mixed state control derivatives
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::intermediateCostAnalytical_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::t_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::u_, and ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::x_.
Referenced by ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::stateControlDerivativeIntermediate().
|
protected |
evaluate terminal analytical control mixed state control derivatives
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::finalCostAnalytical_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::t_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::u_, and ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::x_.
Referenced by ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::stateControlDerivativeTerminal().
|
protected |
compute the state derivative by numerical differentiation (can be used for testing)
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::doubleSidedDerivative_, ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::eps_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::evaluateIntermediate(), ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::getCurrentStateAndControl(), i, and ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::setCurrentStateAndControl().
Referenced by ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeIntermediateTest().
|
protected |
compute the control derivative by numerical differentiation (can be used for testing)
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::doubleSidedDerivative_, ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::eps_, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::evaluateIntermediate(), ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::getCurrentStateAndControl(), i, and ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::setCurrentStateAndControl().
Referenced by ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlDerivativeIntermediateTest().
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef Eigen::Matrix<SCALAR, STATE_DIM, STATE_DIM> ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::state_matrix_t |
|
protected |
stepsize for numerical differentiation
Referenced by ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlDerivativeIntermediateNumDiff(), and ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeIntermediateNumDiff().
|
protected |
use double sided derivatives in numerical differentiation
Referenced by ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlDerivativeIntermediateNumDiff(), and ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeIntermediateNumDiff().
|
protected |
list of intermediate cost terms for which analytic derivatives are available
Referenced by ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::addIntermediateTerm(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlDerivativeIntermediateBase(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlSecondDerivativeIntermediateBase(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::CostFunctionQuadratic(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::evaluateIntermediateBase(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::getIntermediateTermById(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::getIntermediateTermByName(), ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::loadFromConfigFile(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateControlDerivativeIntermediateBase(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeIntermediateBase(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateSecondDerivativeIntermediateBase(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::updateReferenceControl(), and ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::updateReferenceState().
|
protected |
list of final cost terms for which analytic derivatives are available
Referenced by ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::addFinalTerm(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlDerivativeTerminalBase(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlSecondDerivativeTerminalBase(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::CostFunctionQuadratic(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::evaluateTerminalBase(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::getFinalTermById(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::getFinalTermByName(), ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::loadFromConfigFile(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateControlDerivativeTerminalBase(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeTerminalBase(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateSecondDerivativeTerminalBase(), and ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::updateFinalState().