- 3.0.2 optimal control module.
ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR > Class Template Referenceabstract

The ConstraintBase Class is the base class for defining the non-linear optimization constraints. More...

#include <ConstraintContainerBase.h>

Inheritance diagram for ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >:
ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR > ct::optcon::ConstraintContainerAnalytical< STATE_DIM, CONTROL_DIM, SCALAR > ct::optcon::SwitchedLinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >

Public Types

typedef core::ControlVector< CONTROL_DIM, SCALARinput_vector_t
 
typedef ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR > * ConstraintBase_Raw_Ptr_t
 
typedef Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 > VectorXs
 

Public Member Functions

 ConstraintContainerBase ()
 Default constructor. More...
 
 ConstraintContainerBase (const ConstraintContainerBase &arg)
 copy constructor More...
 
virtual ~ConstraintContainerBase ()
 Destructor. More...
 
virtual ConstraintBase_Raw_Ptr_t clone () const =0
 
virtual void setCurrentStateAndControl (const state_vector_t &x, const input_vector_t &u, const SCALAR t=SCALAR(0.0))
 
virtual VectorXs evaluateIntermediate ()=0
 Evaluates the intermediate constraints. More...
 
virtual VectorXs evaluateTerminal ()=0
 Evaluates the terminal constraints. More...
 
virtual size_t getIntermediateConstraintsCount ()=0
 Retrieves the number of intermediate constraints. More...
 
virtual size_t getTerminalConstraintsCount ()=0
 Retrieves the number of final constraints. More...
 
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, SCALARstate_vector_t
 

Protected Member Functions

virtual void update ()=0
 Gets called by the setCurrentStateAndControl method. Can be used to update container properties. More...
 

Protected Attributes

state_vector_t x_
 
input_vector_t u_
 
SCALAR t_
 
VectorXs lowerBoundsIntermediate_
 
VectorXs lowerBoundsTerminal_
 
VectorXs upperBoundsIntermediate_
 
VectorXs upperBoundsTerminal_
 

Detailed Description

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
class ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >

The ConstraintBase Class is the base class for defining the non-linear optimization constraints.

  • { list_item_description }
Template Parameters
STATE_DIMDimension of the state vector
CONTROL_DIMDimension of the control input vector
        An example for usage is given in the unit test @ref
        ConstraintTest.h

Member Typedef Documentation

◆ input_vector_t

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef core::ControlVector<CONTROL_DIM, SCALAR> ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::input_vector_t

◆ ConstraintBase_Raw_Ptr_t

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef ConstraintContainerBase<STATE_DIM, CONTROL_DIM, SCALAR>* ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::ConstraintBase_Raw_Ptr_t

◆ VectorXs

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef Eigen::Matrix<SCALAR, Eigen::Dynamic, 1> ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::VectorXs

Constructor & Destructor Documentation

◆ ConstraintContainerBase() [1/2]

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::ConstraintContainerBase ( )

Default constructor.

Default constructor, sets state, control and time to zero

◆ ConstraintContainerBase() [2/2]

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::ConstraintContainerBase ( const ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR > &  arg)

copy constructor

Copy constructor

◆ ~ConstraintContainerBase()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::~ConstraintContainerBase ( )
virtual

Destructor.

Destructor

Member Function Documentation

◆ clone()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
virtual ConstraintBase_Raw_Ptr_t ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::clone ( ) const
pure virtual

◆ setCurrentStateAndControl()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
void ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::setCurrentStateAndControl ( const state_vector_t x,
const input_vector_t u,
const SCALAR  t = SCALAR(0.0) 
)
virtual

This methods updates the current time, state, and input in the class. It also call the user defined update() method, which can be used to make the implementation more efficient by executing shared calculations directly at the time of updating time, state and control.

Parameters
[in]tcurrent time
[in]xstate vector
[in]xinput vector

References t, ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::t_, u, ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::u_, ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::update(), x, and ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::x_.

◆ evaluateIntermediate()

◆ evaluateTerminal()

◆ getIntermediateConstraintsCount()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
virtual size_t ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::getIntermediateConstraintsCount ( )
pure virtual

◆ getTerminalConstraintsCount()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
virtual size_t ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::getTerminalConstraintsCount ( )
pure virtual

◆ getConstraintsCount()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
size_t ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::getConstraintsCount ( )

◆ getLowerBoundsIntermediate()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::VectorXs ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::getLowerBoundsIntermediate ( ) const

Retrieves the lower constraint bound on the intermediate constraints.

Returns
The lower bound on the intermediate constraints

References ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::lowerBoundsIntermediate_.

Referenced by ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >::printout().

◆ getLowerBoundsTerminal()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::VectorXs ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::getLowerBoundsTerminal ( ) const

Retrieves the lower constraint bound on the terminal constraints.

Returns
The lower bound on the terminal constraints

References ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::lowerBoundsTerminal_.

Referenced by ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >::printout().

◆ getUpperBoundsIntermediate()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::VectorXs ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::getUpperBoundsIntermediate ( ) const

Retrieves the upper constraint bound on the intermediate constraints.

Returns
The upper bound on the intermediate constraints

References ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::upperBoundsIntermediate_.

Referenced by ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >::printout().

◆ getUpperBoundsTerminal()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::VectorXs ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::getUpperBoundsTerminal ( ) const

Retrieves the upper constraint bound on the terminal constraints.

Returns
The upper bound on the terminal constraints

References ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::upperBoundsTerminal_.

Referenced by ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >::printout().

◆ getUpperBoundsViolationIntermediate()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::VectorXs ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::getUpperBoundsViolationIntermediate ( )

Retrieves the violation of the upper constraint bound on the intermediate constraints.

Returns
The upper bound violation on intermediate constraints

References ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::evaluateIntermediate(), and ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::upperBoundsIntermediate_.

◆ getLowerBoundsViolationIntermediate()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::VectorXs ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::getLowerBoundsViolationIntermediate ( )

Retrieves the violation of the lower constraint bound on the intermediate constraints.

Returns
The lower bound violation on intermediate constraints

References ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::evaluateIntermediate(), and ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::lowerBoundsIntermediate_.

◆ getUpperBoundsViolationTerminal()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::VectorXs ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::getUpperBoundsViolationTerminal ( )

Retrieves the violation of the upper constraint bound on the terminal constraints.

Returns
The upper bound violation on terminal constraints

References ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::evaluateTerminal(), and ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::upperBoundsTerminal_.

◆ getLowerBoundsViolationTerminal()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::VectorXs ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::getLowerBoundsViolationTerminal ( )

Retrieves the violation of the lower constraint bound on the terminal constraints.

Returns
The lower bound violation on terminal constraints

References ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::evaluateTerminal(), and ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::lowerBoundsTerminal_.

◆ getTotalBoundsViolationIntermediate()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::VectorXs ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::getTotalBoundsViolationIntermediate ( )

◆ getTotalBoundsViolationTerminal()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::VectorXs ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::getTotalBoundsViolationTerminal ( )

◆ update()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
virtual void ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::update ( )
protectedpure virtual

Gets called by the setCurrentStateAndControl method. Can be used to update container properties.

Referenced by ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::setCurrentStateAndControl().

Member Data Documentation

◆ state_vector_t

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef core::StateVector<STATE_DIM, SCALAR> ct::optcon::ConstraintContainerBase< STATE_DIM, CONTROL_DIM, SCALAR >::state_vector_t

◆ x_

◆ u_

◆ t_

◆ lowerBoundsIntermediate_

◆ lowerBoundsTerminal_

◆ upperBoundsIntermediate_

◆ upperBoundsTerminal_


The documentation for this class was generated from the following files: