Drake
Constraint Class Referenceabstract

A constraint is a function + lower and upper bounds. More...

#include <drake/solvers/Constraint.h>

Inheritance diagram for Constraint:
Collaboration diagram for Constraint:

Public Member Functions

 Constraint (size_t num_constraints)
 
template<typename DerivedLB , typename DerivedUB >
 Constraint (size_t num_constraints, Eigen::MatrixBase< DerivedLB > const &lb, Eigen::MatrixBase< DerivedUB > const &ub)
 
virtual ~Constraint ()
 
virtual void eval (const Eigen::Ref< const Eigen::VectorXd > &x, Eigen::VectorXd &y) const =0
 
virtual void eval (const Eigen::Ref< const Drake::TaylorVecXd > &x, Drake::TaylorVecXd &y) const =0
 
Eigen::VectorXd const & lower_bound () const
 
Eigen::VectorXd const & upper_bound () const
 
size_t num_constraints () const
 

Protected Attributes

Eigen::VectorXd lower_bound_
 
Eigen::VectorXd upper_bound_
 

Detailed Description

A constraint is a function + lower and upper bounds.

Some thoughts: It should support evaluating the constraint, adding it to an optimization problem, and have support for constraints that require slack variables (adding additional decision variables to the problem). There should also be some notion of parameterized constraints: e.g. the acceleration constraints in the rigid body dynamics are constraints on vdot and f, but are "parameterized" by q and v.

Constructor & Destructor Documentation

Constraint ( size_t  num_constraints)
inlineexplicit
Constraint ( size_t  num_constraints,
Eigen::MatrixBase< DerivedLB > const &  lb,
Eigen::MatrixBase< DerivedUB > const &  ub 
)
inline
virtual ~Constraint ( )
inlinevirtual

Here is the call graph for this function:

Member Function Documentation

virtual void eval ( const Eigen::Ref< const Eigen::VectorXd > &  x,
Eigen::VectorXd &  y 
) const
pure virtual
virtual void eval ( const Eigen::Ref< const Drake::TaylorVecXd > &  x,
Drake::TaylorVecXd y 
) const
pure virtual
Eigen::VectorXd const& lower_bound ( ) const
inline
size_t num_constraints ( ) const
inline

Here is the caller graph for this function:

Eigen::VectorXd const& upper_bound ( ) const
inline

Member Data Documentation

Eigen::VectorXd lower_bound_
protected
Eigen::VectorXd upper_bound_
protected

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