DirectTrajectoryOptimization  v0.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
DirectTrajectoryOptimization::BaseClass::GenericConstraintsBase Class Referenceabstract

Base Class to define vector of constraints and its derivatives. More...

#include <GenericConstraintsBase.hpp>

Inheritance diagram for DirectTrajectoryOptimization::BaseClass::GenericConstraintsBase:
DirectTrajectoryOptimization::BaseClass::NumDiffDerivativesBase DirectTrajectoryOptimization::ShootingConstraint< DIMENSIONS >

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW GenericConstraintsBase (int num_eq, int num_var)
 Generic Constraint Constructor. More...
 
virtual Eigen::VectorXd Evalfx (const Eigen::VectorXd &input)=0
 To be overloaded by the derived class. More...
 
virtual void fx (const Eigen::VectorXd &in, Eigen::VectorXd &out) override
 Overload this method in the derived class to obtain numerical approximation of the gradient.
 
virtual Eigen::MatrixXd EvalFxJacobian (const Eigen::VectorXd &input)
 To be overloaded by the derived class in case NumDiff is not required. More...
 
Eigen::VectorXd GetConstraintsLowerBound ()
 Method to get the lower bound of the constraint. More...
 
Eigen::VectorXd GetConstraintsUpperBound ()
 Method to get the upper bound of the constraint. More...
 
void SetConstraintsLowerBound (const Eigen::VectorXd &g_lb_candidate)
 Method to set the lower bound of the constraint. More...
 
void setConstraintsUpperBound (const Eigen::VectorXd &g_ub_candidate)
 Method to set the upper bound of the constraint. More...
 
void initialize_num_diff ()
 Overload this method to define the local pointers. More...
 

Additional Inherited Members

- Public Attributes inherited from DirectTrajectoryOptimization::BaseClass::NumDiffDerivativesBase
std::shared_ptr< FunctionOperator > numdifoperator
 
std::shared_ptr
< Eigen::NumericalDiff
< FunctionOperator > > 
numDiff
 

Detailed Description

Base Class to define vector of constraints and its derivatives.

Constructor & Destructor Documentation

EIGEN_MAKE_ALIGNED_OPERATOR_NEW DirectTrajectoryOptimization::BaseClass::GenericConstraintsBase::GenericConstraintsBase ( int  num_eq,
int  num_var 
)
inline

Generic Constraint Constructor.

Parameters
[in]num_eqThe size of the vector of constraints
[in]num_varThe number of variables

Member Function Documentation

virtual Eigen::VectorXd DirectTrajectoryOptimization::BaseClass::GenericConstraintsBase::Evalfx ( const Eigen::VectorXd &  input)
pure virtual

To be overloaded by the derived class.

Constraint function to be evaluated

Implemented in DirectTrajectoryOptimization::ShootingConstraint< DIMENSIONS >.

Referenced by fx().

Eigen::MatrixXd DirectTrajectoryOptimization::BaseClass::GenericConstraintsBase::EvalFxJacobian ( const Eigen::VectorXd &  input)
virtual

To be overloaded by the derived class in case NumDiff is not required.

Returns
The Jacobian matrix of the constraint

References DirectTrajectoryOptimization::BaseClass::NumDiffDerivativesBase::numDiff.

Eigen::VectorXd DirectTrajectoryOptimization::BaseClass::GenericConstraintsBase::GetConstraintsLowerBound ( )
inline

Method to get the lower bound of the constraint.

Returns
The vector of lower bounds of the constraint set
Eigen::VectorXd DirectTrajectoryOptimization::BaseClass::GenericConstraintsBase::GetConstraintsUpperBound ( )
inline

Method to get the upper bound of the constraint.

Returns
The vector of upper bounds of the constraint set
void DirectTrajectoryOptimization::BaseClass::GenericConstraintsBase::initialize_num_diff ( )
virtual

Overload this method to define the local pointers.

numdifoperator and numDiff need to be defined in this method

Implements DirectTrajectoryOptimization::BaseClass::NumDiffDerivativesBase.

References DirectTrajectoryOptimization::BaseClass::NumDiffDerivativesBase::numDiff, and DirectTrajectoryOptimization::BaseClass::NumDiffDerivativesBase::numdifoperator.

void DirectTrajectoryOptimization::BaseClass::GenericConstraintsBase::SetConstraintsLowerBound ( const Eigen::VectorXd &  g_lb_candidate)

Method to set the lower bound of the constraint.

Parameters
[in]g_lb_candidateEigen vector of dynamic size
void DirectTrajectoryOptimization::BaseClass::GenericConstraintsBase::setConstraintsUpperBound ( const Eigen::VectorXd &  g_ub_candidate)

Method to set the upper bound of the constraint.

Parameters
[in]g_ub_candidateEigen vector of dynamic size

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