A state barrier term (could also be considered a soft constraint) Note that this term explicitly excludes controls, as there are better ways to limit control effort in a "soft" way, e.g. through the use of sigmoid functions.
More...
|
typedef Eigen::Matrix< SCALAR_EVAL, STATE_DIM, STATE_DIM > | state_matrix_t |
|
typedef Eigen::Matrix< SCALAR_EVAL, CONTROL_DIM, CONTROL_DIM > | control_matrix_t |
|
typedef Eigen::Matrix< SCALAR_EVAL, CONTROL_DIM, STATE_DIM > | control_state_matrix_t |
|
typedef Eigen::Matrix< SCALAR_EVAL, STATE_DIM, STATE_DIM > | state_matrix_double_t |
|
typedef Eigen::Matrix< SCALAR_EVAL, CONTROL_DIM, CONTROL_DIM > | control_matrix_double_t |
|
typedef Eigen::Matrix< SCALAR_EVAL, CONTROL_DIM, STATE_DIM > | control_state_matrix_double_t |
|
typedef Eigen::Matrix< SCALAR_EVAL, STATE_DIM, STATE_DIM > | state_matrix_t |
|
typedef Eigen::Matrix< SCALAR_EVAL, CONTROL_DIM, CONTROL_DIM > | control_matrix_t |
|
typedef Eigen::Matrix< SCALAR_EVAL, CONTROL_DIM, STATE_DIM > | control_state_matrix_t |
|
typedef Eigen::Matrix< SCALAR_EVAL, STATE_DIM, STATE_DIM > | state_matrix_double_t |
|
typedef Eigen::Matrix< SCALAR_EVAL, CONTROL_DIM, CONTROL_DIM > | control_matrix_double_t |
|
typedef Eigen::Matrix< SCALAR_EVAL, CONTROL_DIM, STATE_DIM > | control_state_matrix_double_t |
|
|
| TermStateBarrier () |
|
| TermStateBarrier (const state_vector_t &ub, const state_vector_t &lb, const state_vector_t &alpha) |
|
| TermStateBarrier (const TermStateBarrier &arg) |
|
virtual | ~TermStateBarrier () |
|
TermStateBarrier< STATE_DIM, CONTROL_DIM, SCALAR_EVAL, SCALAR > * | clone () const override |
| Deep-copy term. More...
|
|
virtual SCALAR | evaluate (const Eigen::Matrix< SCALAR, STATE_DIM, 1 > &x, const Eigen::Matrix< SCALAR, CONTROL_DIM, 1 > &u, const SCALAR &t) override |
| Evaluates the term at x, u, t. More...
|
|
virtual void | loadConfigFile (const std::string &filename, const std::string &termName, bool verbose=false) override |
| load the term from config file, where the bounds are stored as matrices More...
|
|
| TermBase (std::string name="Unnamed") |
| Default constructor. More...
|
|
| TermBase (const TermBase &arg) |
| Copy Cunstructor. More...
|
|
virtual | ~TermBase () |
| Destructor. More...
|
|
SCALAR_EVAL | eval (const Eigen::Matrix< SCALAR_EVAL, STATE_DIM, 1 > &x, const Eigen::Matrix< SCALAR_EVAL, CONTROL_DIM, 1 > &u, const SCALAR_EVAL &t) |
| Gets called by the analytical costfunction. Adds time dependent activations on top of the term. More...
|
|
virtual bool | isActiveAtTime (SCALAR_EVAL t) |
| Returns if term is non-zero at a specific time By default, all terms are evaluated at all times. However, if a term is not active at a certain time, you can overload this function to spare evaluations of the term and its derivatives. More...
|
|
SCALAR_EVAL | computeActivation (SCALAR_EVAL t) |
| compute time activation More...
|
|
virtual core::StateVector< STATE_DIM, SCALAR_EVAL > | stateDerivative (const core::StateVector< STATE_DIM, SCALAR_EVAL > &x, const core::ControlVector< CONTROL_DIM, SCALAR_EVAL > &u, const SCALAR_EVAL &t) |
| compute derivative of this cost term w.r.t. the state More...
|
|
virtual state_matrix_t | stateSecondDerivative (const core::StateVector< STATE_DIM, SCALAR_EVAL > &x, const core::ControlVector< CONTROL_DIM, SCALAR_EVAL > &u, const SCALAR_EVAL &t) |
| compute second order derivative of this cost term w.r.t. the state More...
|
|
virtual core::ControlVector< CONTROL_DIM, SCALAR_EVAL > | controlDerivative (const core::StateVector< STATE_DIM, SCALAR_EVAL > &x, const core::ControlVector< CONTROL_DIM, SCALAR_EVAL > &u, const SCALAR_EVAL &t) |
| compute derivative of this cost term w.r.t. the control input More...
|
|
virtual control_matrix_t | controlSecondDerivative (const core::StateVector< STATE_DIM, SCALAR_EVAL > &x, const core::ControlVector< CONTROL_DIM, SCALAR_EVAL > &u, const SCALAR_EVAL &t) |
| compute second order derivative of this cost term w.r.t. the control input More...
|
|
virtual control_state_matrix_t | stateControlDerivative (const core::StateVector< STATE_DIM, SCALAR_EVAL > &x, const core::ControlVector< CONTROL_DIM, SCALAR_EVAL > &u, const SCALAR_EVAL &t) |
| compute the cross-term derivative (state-control) of this cost function term More...
|
|
void | setTimeActivation (std::shared_ptr< ct::core::tpl::ActivationBase< SCALAR_EVAL >> c_i, bool verbose=false) |
| set the time activation functions for this term More...
|
|
void | loadTimeActivation (const std::string &filename, const std::string &termName, bool verbose=false) |
| load the time activation functions for this term from file More...
|
|
const std::string & | getName () const |
| Returns the name of the term. More...
|
|
void | setName (const std::string &termName) |
| Sets the name of the term. More...
|
|
virtual void | updateReferenceState (const Eigen::Matrix< SCALAR_EVAL, STATE_DIM, 1 > &newRefState) |
| updates the reference state for this term More...
|
|
virtual void | updateReferenceControl (const Eigen::Matrix< SCALAR_EVAL, CONTROL_DIM, 1 > &newRefControl) |
| updates the reference control for this term More...
|
|
virtual Eigen::Matrix< SCALAR_EVAL, STATE_DIM, 1 > | getReferenceState () const |
| retrieve this term's current reference state More...
|
|
template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR_EVAL = double, typename SCALAR = SCALAR_EVAL>
class ct::optcon::TermStateBarrier< STATE_DIM, CONTROL_DIM, SCALAR_EVAL, SCALAR >
A state barrier term (could also be considered a soft constraint) Note that this term explicitly excludes controls, as there are better ways to limit control effort in a "soft" way, e.g. through the use of sigmoid functions.
- Todo:
- implement sigmoid barriers