- 3.0.2 optimal control module.
|
A container for switching linear constraint containers. More...
#include <SwitchedLinearConstraintContainer.h>
Public Member Functions | |
SwitchedLinearConstraintContainer (const SwitchedLinearConstraintContainers &switchedLinearConstraintContainers, const ModeSequence_t &continuousModeSequence) | |
Default constructor. More... | |
SwitchedLinearConstraintContainer (const SwitchedLinearConstraintContainer &arg) | |
Copy constructor. More... | |
virtual | ~SwitchedLinearConstraintContainer () |
Destructor. More... | |
virtual SwitchedLinearConstraintContainer_Raw_Ptr_t | clone () const override |
virtual VectorXs | evaluateIntermediate () override |
Evaluates the intermediate constraints. More... | |
virtual VectorXs | evaluateTerminal () override |
Evaluates the terminal constraints. More... | |
virtual size_t | getIntermediateConstraintsCount () override |
Retrieves the number of intermediate constraints. More... | |
virtual size_t | getTerminalConstraintsCount () override |
Retrieves the number of final constraints. More... | |
virtual VectorXs | jacobianStateSparseIntermediate () override |
Evaluates the constraint jacobian wrt the state using sparse representation. More... | |
virtual MatrixXs | jacobianStateIntermediate () override |
Evaluates the constraint jacobian wrt the state. More... | |
virtual VectorXs | jacobianStateSparseTerminal () override |
Evaluates the constraint jacobian wrt the state using sparse representation. More... | |
virtual MatrixXs | jacobianStateTerminal () override |
Evaluates the constraint jacobian wrt the state. More... | |
virtual VectorXs | jacobianInputSparseIntermediate () override |
Evaluates the constraint jacobian wrt the control input using sparse representation. More... | |
virtual MatrixXs | jacobianInputIntermediate () override |
Evaluates the constraint jacobian wrt the control input. More... | |
virtual VectorXs | jacobianInputSparseTerminal () override |
Evaluates the constraint jacobian wrt the control input using sparse representation. More... | |
virtual MatrixXs | jacobianInputTerminal () override |
Evaluates the constraint jacobian wrt the control input. More... | |
virtual void | sparsityPatternStateIntermediate (Eigen::VectorXi &iRows, Eigen::VectorXi &jCols) override |
Returns the sparsity pattern for the jacobian wrt state. More... | |
virtual void | sparsityPatternStateTerminal (Eigen::VectorXi &iRows, Eigen::VectorXi &jCols) override |
Returns the sparsity pattern for the jacobian wrt state. More... | |
virtual void | sparsityPatternInputIntermediate (Eigen::VectorXi &iRows, Eigen::VectorXi &jCols) override |
Returns the sparsity pattern for the jacobian wrt control. More... | |
virtual void | sparsityPatternInputTerminal (Eigen::VectorXi &iRows, Eigen::VectorXi &jCols) override |
Returns the sparsity pattern for the jacobian wrt control. More... | |
virtual size_t | getJacobianStateNonZeroCountIntermediate () override |
Returns the number of non zero elements in the constraint jacobian wrt state. More... | |
virtual size_t | getJacobianStateNonZeroCountTerminal () override |
Returns the number of non zero elements in the constraint jacobian wrt state. More... | |
virtual size_t | getJacobianInputNonZeroCountIntermediate () override |
Returns the number of non zero elements in the constraint jacobian wrt input. More... | |
virtual size_t | getJacobianInputNonZeroCountTerminal () override |
Returns the number of non zero elements in the constraint jacobian wrt input. More... | |
virtual bool | initializeIntermediate () override |
Initializes the intermediate constraints. More... | |
virtual bool | initializeTerminal () override |
Initializes the terminal constraints. More... | |
Public Member Functions inherited from ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR > | |
LinearConstraintContainer () | |
Default constructor. More... | |
LinearConstraintContainer (const LinearConstraintContainer &arg) | |
Copy constructor. More... | |
virtual | ~LinearConstraintContainer () |
Destructor. More... | |
size_t | getJacNonZeroCount () |
Returns the number of non zeros in the constraint jacobian wrt to state and input. More... | |
void | initialize () |
Initializes the constraint container. More... | |
bool | isInitialized () |
Checks if the constraint container is initialized. More... | |
void | printout () |
Print out sparsity patterns, jacobians, etc. Serves for quick visual inspection. More... | |
Public Member Functions inherited from ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR > | |
ConstraintContainerBase () | |
Default constructor. More... | |
ConstraintContainerBase (const ConstraintContainerBase &arg) | |
copy constructor More... | |
virtual | ~ConstraintContainerBase () |
Destructor. More... | |
virtual void | setCurrentStateAndControl (const state_vector_t &x, const input_vector_t &u, const SCALAR t=SCALAR(0.0)) |
size_t | getConstraintsCount () |
Retrieves the total number of constraints. More... | |
VectorXs | getLowerBoundsIntermediate () const |
Retrieves the lower constraint bound on the intermediate constraints. More... | |
VectorXs | getLowerBoundsTerminal () const |
Retrieves the lower constraint bound on the terminal constraints. More... | |
VectorXs | getUpperBoundsIntermediate () const |
Retrieves the upper constraint bound on the intermediate constraints. More... | |
VectorXs | getUpperBoundsTerminal () const |
Retrieves the upper constraint bound on the terminal constraints. More... | |
VectorXs | getUpperBoundsViolationIntermediate () |
Retrieves the violation of the upper constraint bound on the intermediate constraints. More... | |
VectorXs | getLowerBoundsViolationIntermediate () |
Retrieves the violation of the lower constraint bound on the intermediate constraints. More... | |
VectorXs | getUpperBoundsViolationTerminal () |
Retrieves the violation of the upper constraint bound on the terminal constraints. More... | |
VectorXs | getLowerBoundsViolationTerminal () |
Retrieves the violation of the lower constraint bound on the terminal constraints. More... | |
VectorXs | getTotalBoundsViolationIntermediate () |
Retrieves the total violation of the constraints bounds on the intermediate constraints. More... | |
VectorXs | getTotalBoundsViolationTerminal () |
Retrieves the total violation of the constraints bounds on the terminal constraints. More... | |
Public Attributes | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef core::StateVector< STATE_DIM, SCALAR > | state_vector_t |
Public Attributes inherited from ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR > | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef core::StateVector< STATE_DIM, SCALAR > | state_vector_t |
Public Attributes inherited from ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR > | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef core::StateVector< STATE_DIM, SCALAR > | state_vector_t |
Additional Inherited Members | |
Protected Attributes inherited from ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR > | |
bool | initializedIntermediate_ |
bool | initializedTerminal_ |
Protected Attributes inherited from ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR > | |
state_vector_t | x_ |
input_vector_t | u_ |
SCALAR | t_ |
VectorXs | lowerBoundsIntermediate_ |
VectorXs | lowerBoundsTerminal_ |
VectorXs | upperBoundsIntermediate_ |
VectorXs | upperBoundsTerminal_ |
A container for switching linear constraint containers.
STATE_DIM | Dimension of the state vector |
CONTROL_DIM | Dimension of the control input vector |
typedef core::ControlVector<CONTROL_DIM, SCALAR> ct::optcon::SwitchedLinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >::input_vector_t |
typedef SwitchedLinearConstraintContainer<STATE_DIM, CONTROL_DIM, SCALAR>* ct::optcon::SwitchedLinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >::SwitchedLinearConstraintContainer_Raw_Ptr_t |
typedef std::shared_ptr<LinearConstraintContainer<STATE_DIM, CONTROL_DIM, SCALAR> > ct::optcon::SwitchedLinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >::LinearConstraintContainer_Ptr_t |
typedef core::Switched<LinearConstraintContainer_Ptr_t> ct::optcon::SwitchedLinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >::SwitchedLinearConstraintContainers |
typedef Eigen::Matrix<SCALAR, Eigen::Dynamic, 1> ct::optcon::SwitchedLinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >::VectorXs |
typedef Eigen::Matrix<SCALAR, Eigen::Dynamic, Eigen::Dynamic> ct::optcon::SwitchedLinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >::MatrixXs |
typedef core::PhaseSequence<std::size_t, SCALAR> ct::optcon::SwitchedLinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >::ModeSequence_t |
ct::optcon::SwitchedLinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >::SwitchedLinearConstraintContainer | ( | const SwitchedLinearConstraintContainers & | switchedLinearConstraintContainers, |
const ModeSequence_t & | continuousModeSequence | ||
) |
Default constructor.
Referenced by ct::optcon::SwitchedLinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >::clone().
ct::optcon::SwitchedLinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >::SwitchedLinearConstraintContainer | ( | const SwitchedLinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR > & | arg | ) |
Copy constructor.
[in] | arg | The object to be copied |
References ct::core::PhaseSequence< Phase, Time >::getFinalPhase().
|
virtual |
Destructor.
|
overridevirtual |
Clones the linear constraint class
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Evaluates the intermediate constraints.
Implements ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Evaluates the terminal constraints.
Implements ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Retrieves the number of intermediate constraints.
Implements ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Retrieves the number of final constraints.
Implements ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Evaluates the constraint jacobian wrt the state using sparse representation.
jacVec | The sparse jacobian vector |
count | The size of jacVec |
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Evaluates the constraint jacobian wrt the state.
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Evaluates the constraint jacobian wrt the state using sparse representation.
jacVec | The sparse jacobian vector |
count | The size of jacVec |
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Evaluates the constraint jacobian wrt the state.
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Evaluates the constraint jacobian wrt the control input using sparse representation.
jacVec | The sparse jacobian vector |
count | The size of jacVec |
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Evaluates the constraint jacobian wrt the control input.
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Evaluates the constraint jacobian wrt the control input using sparse representation.
jacVec | The sparse jacobian vector |
count | The size of jacVec |
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Evaluates the constraint jacobian wrt the control input.
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Returns the sparsity pattern for the jacobian wrt state.
iRows | The vector of the row indices containing non zero elements in the constraint jacobian |
jCols | The vector of the column indices containing non zero elements in the constraint jacobian |
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Returns the sparsity pattern for the jacobian wrt state.
iRows | The vector of the row indices containing non zero elements in the constraint jacobian |
jCols | The vector of the column indices containing non zero elements in the constraint jacobian |
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Returns the sparsity pattern for the jacobian wrt control.
iRows | The vector of the row indices containing non zero elements in the constraint jacobian |
jCols | The vector of the column indices containing non zero elements in the constraint jacobian |
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Returns the sparsity pattern for the jacobian wrt control.
iRows | The vector of the row indices containing non zero elements in the constraint jacobian |
jCols | The vector of the column indices containing non zero elements in the constraint jacobian |
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Returns the number of non zero elements in the constraint jacobian wrt state.
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Returns the number of non zero elements in the constraint jacobian wrt state.
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Returns the number of non zero elements in the constraint jacobian wrt input.
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Returns the number of non zero elements in the constraint jacobian wrt input.
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Initializes the intermediate constraints.
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
|
overridevirtual |
Initializes the terminal constraints.
Implements ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >.
References ct::core::PhaseSequence< Phase, Time >::getPhaseFromTime(), ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::lowerBoundsIntermediate_, ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::lowerBoundsTerminal_, ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::t_, ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::u_, ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::upperBoundsIntermediate_, ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::upperBoundsTerminal_, and ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::x_.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef core::StateVector<STATE_DIM, SCALAR> ct::optcon::SwitchedLinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >::state_vector_t |