ocra-recipes
Doxygen documentation for the ocra-recipes repository
Classes | Public Types | Public Member Functions | List of all members
ocra::FSQPConstraintManager Class Reference

FSQPConstraintManager class. More...

#include <FSQPConstraintManager.h>

Classes

struct  Mapping
 

Public Types

typedef CwiseUnaryOp< internal::scalar_multiple_op< double >, MatrixXdRowScalarMultMatrixXdRow
 

Public Member Functions

 FSQPConstraintManager ()
 
void addConstraint (LinearConstraint &constraint)
 
void addConstraint (GenericConstraint &constraint)
 
void removeConstraint (LinearConstraint &constraint)
 
void removeConstraint (GenericConstraint &constraint)
 
double getValue (int i) const
 
const ScalarMultMatrixXdRow getGradient (int i) const
 
const ScalarMultMatrixXdRow getGradient (const std::pair< GenericConstraint *, int > &p) const
 
int nineqn () const
 
int nineq () const
 
int neqn () const
 
int neq () const
 
void updateMapping () const
 
void invalidateMapping ()
 
std::pair< GenericConstraint *, int > operator[] (int i) const
 

Detailed Description

FSQPConstraintManager class.

Warning
None

The aim of this class is to maintain a mapping between indices and couple (constraint, line of this constraint) that is coherent with fsqp requirement: an ocra constraint is considered as a set of monodimensional constraints and all this 'atomic' constraints are sorted according to their type. Non-linear inequalities come first, then linear inequalities, non-linear equalities, and finally linear equalities. This mapping is available with the [] operator. manager[i] returns a couple (c,j) such that the ith constraint for fsqp is the jth line of the constraint c. If the constraint is of the type CSTR_LOWER_AND_GREATER, the index j will range from 0 to 2d-1 included, where d is the dimension of the function the constraint is based upon. The indices from 0 to d-1 correspond to the "greater than" part of the constraint, those from d to 2d-1 correspond to to the lower part.

Definition at line 34 of file FSQPConstraintManager.h.

Member Typedef Documentation

typedef CwiseUnaryOp<internal::scalar_multiple_op<double>, MatrixXdRow> ocra::FSQPConstraintManager::ScalarMultMatrixXdRow

Definition at line 38 of file FSQPConstraintManager.h.

Constructor & Destructor Documentation

ocra::FSQPConstraintManager::FSQPConstraintManager ( )

Definition at line 22 of file FSQPConstraintManager.cpp.

Member Function Documentation

void ocra::FSQPConstraintManager::addConstraint ( LinearConstraint constraint)

Definition at line 32 of file FSQPConstraintManager.cpp.

void ocra::FSQPConstraintManager::addConstraint ( GenericConstraint constraint)

Definition at line 47 of file FSQPConstraintManager.cpp.

const FSQPConstraintManager::ScalarMultMatrixXdRow ocra::FSQPConstraintManager::getGradient ( int  i) const

Definition at line 199 of file FSQPConstraintManager.cpp.

const FSQPConstraintManager::ScalarMultMatrixXdRow ocra::FSQPConstraintManager::getGradient ( const std::pair< GenericConstraint *, int > &  p) const

Definition at line 205 of file FSQPConstraintManager.cpp.

double ocra::FSQPConstraintManager::getValue ( int  i) const

Definition at line 172 of file FSQPConstraintManager.cpp.

void ocra::FSQPConstraintManager::invalidateMapping ( )

Definition at line 143 of file FSQPConstraintManager.cpp.

int ocra::FSQPConstraintManager::neq ( ) const
inline

Definition at line 72 of file FSQPConstraintManager.h.

int ocra::FSQPConstraintManager::neqn ( ) const
inline

Definition at line 71 of file FSQPConstraintManager.h.

int ocra::FSQPConstraintManager::nineq ( ) const
inline

Definition at line 70 of file FSQPConstraintManager.h.

int ocra::FSQPConstraintManager::nineqn ( ) const
inline

Definition at line 69 of file FSQPConstraintManager.h.

std::pair< GenericConstraint *, int > ocra::FSQPConstraintManager::operator[] ( int  i) const

Definition at line 148 of file FSQPConstraintManager.cpp.

void ocra::FSQPConstraintManager::removeConstraint ( LinearConstraint constraint)

Definition at line 61 of file FSQPConstraintManager.cpp.

void ocra::FSQPConstraintManager::removeConstraint ( GenericConstraint constraint)

Definition at line 83 of file FSQPConstraintManager.cpp.

void ocra::FSQPConstraintManager::updateMapping ( ) const

Definition at line 105 of file FSQPConstraintManager.cpp.


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