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

CmlQuadraticSolver class. More...

#include <CmlQuadraticSolver.h>

Inheritance diagram for ocra::CmlQuadraticSolver:
[legend]
Collaboration diagram for ocra::CmlQuadraticSolver:
[legend]

Public Types

enum  eCmlQPSolverType { CMLQPSOLVER_LEMKE, CMLQPSOLVER_GAUSS_SEIDEL }
 

Public Member Functions

 CmlQuadraticSolver (int type=xde::cmlQPSolver::LEMKE_SOLVER)
 
void setTolerance (double epsilon)
 
void setMaxIteration (cfl_size_t maxIter)
 
cfl_size_t getMaxIteration (void) const
 
virtual const std::string & getMoreInfo (void) const
 
virtual void addLinearEqualityConstraint (LinearConstraint *constraint)
 
virtual void addLinearInequalityConstraint (LinearConstraint *constraint)
 
virtual void removeConstraint (LinearConstraint *constraint)
 
virtual void setObjective (QuadraticFunction *obj, real weight=1.)
 
virtual void addObjective (QuadraticFunction *obj, real weight=1.)
 
virtual void removeObjective (QuadraticFunction *obj)
 
virtual void printValuesAtSolution (void)
 
bool checkConstraints (void)
 
virtual const MatrixBase & getP (void) const
 
virtual const MatrixBase & getA (void) const
 
virtual const MatrixBase & getC (void) const
 
virtual const VectorBase & getq (void) const
 
virtual const VectorBase & getb (void) const
 
virtual const VectorBase & getd (void) const
 
virtual const VectorBase & getu (void) const
 
virtual const VectorBase & getl (void) const
 
- Public Member Functions inherited from ocra::QuadraticSolver
void printValuesAtSolution ()
 
void addObjective (QuadraticObjective &obj)
 
void removeObjective (QuadraticFunction &obj)
 
void removeObjective (QuadraticObjective &obj)
 
void addConstraint (LinearConstraint &constraint)
 
void removeConstraint (LinearConstraint &constraint)
 
void addBounds (BoundConstraint &constraint)
 
void addBounds (IdentityConstraint &constraint)
 
void removeBounds (BoundConstraint &constraint)
 
void removeBounds (IdentityConstraint &constraint)
 
void clearObjectives ()
 
void clearConstraints ()
 
void clearEqualityConstraints ()
 
void clearInequalityConstraints ()
 
void clearBounds ()
 
std::string toString ()
 
virtual VectorXd getbp () const =0
 
virtual VectorXd getxl () const =0
 
virtual VectorXd getxu () const =0
 
- Public Member Functions inherited from ocra::Solver
const std::vector< int > & findMapping (Variable &var)
 
virtual ~Solver ()
 
const OptimizationResultsolve ()
 
const OptimizationResultgetLastResult () const
 
void printStatus (std::ostream &os)
 
void setMemoryLevel (int level)
 
void setAutoDumpFile (const std::string &file)
 
void activateAutoDump ()
 
void deactivateAutoDump ()
 
void dump (const std::string &file="") const
 
int n ()
 
VariablegetProblemVariable ()
 
void setVariableValue (const VectorXd &value)
 
- Public Member Functions inherited from ocra::ObserverSubject
 ObserverSubject ()
 
virtual ~ObserverSubject ()
 
- Public Member Functions inherited from ocra::Observer
virtual ~Observer ()
 
template<int EVT>
void bind (SubjectBase< EVT > &subject)
 Call this method to automatically propagate observed events to observers connected to the subject given in argument. More...
 
template<int EVT>
void stopPropagation ()
 
- Public Member Functions inherited from ocra::ObserverBase< EVT_RESIZE >
void bind (subject_type &subject)
 Call this method to automatically propagate observed events to observers connected to the subject given in argument. More...
 
- Public Member Functions inherited from ocra::ObserverBase< EVT_CHANGE_DEPENDENCIES >
void bind (subject_type &subject)
 Call this method to automatically propagate observed events to observers connected to the subject given in argument. More...
 
- Public Member Functions inherited from ocra::ObserverBase< EVT_CHANGE_VALUE >
void bind (subject_type &subject)
 Call this method to automatically propagate observed events to observers connected to the subject given in argument. More...
 
- Public Member Functions inherited from ocra::Subject
virtual ~Subject ()
 
template<int EVT, class Derived , class Base >
void connect (Derived &object, void(Base::*newCallback)(int)) const
 Call this method to register a non-static method as a callback. More...
 
template<int EVT>
void connect (void(*newCallback)(int)) const
 Call this method to register a free function as a callback. More...
 
template<int EVT, class Derived , class Base >
void disconnect (Derived &object, void(Base::*callbackToErase)(int)) const
 Disconnect non-static method. More...
 
template<int EVT>
void disconnect (void(*callbackToErase)(int)) const
 Disconnect free function. More...
 
template<int EVT>
void propagate () const
 
template<int EVT>
void propagate (int timestamp) const
 
- Public Member Functions inherited from ocra::SubjectBase< EVT_RESIZE >
void connect (T &object, typename SubjectBaseTraits< EVT, T >::callback_type newCallback) const
 Call this method to register a non-static method as a callback. More...
 
void connect (typename SubjectBaseTraits< EVT, void >::callback_type newCallback) const
 Call this method to register a free function as a callback. More...
 
void disconnect (T &object, typename SubjectBaseTraits< EVT, T >::callback_type callback) const
 Disconnect non-static method. More...
 
void disconnect (typename SubjectBaseTraits< EVT, void >::callback_type callbackToErase) const
 Disconnect free function. More...
 
void propagate (int timestamp) const
 
void propagate () const
 
- Public Member Functions inherited from ocra::SubjectBase< EVT_CHANGE_DEPENDENCIES >
void connect (T &object, typename SubjectBaseTraits< EVT, T >::callback_type newCallback) const
 Call this method to register a non-static method as a callback. More...
 
void connect (typename SubjectBaseTraits< EVT, void >::callback_type newCallback) const
 Call this method to register a free function as a callback. More...
 
void disconnect (T &object, typename SubjectBaseTraits< EVT, T >::callback_type callback) const
 Disconnect non-static method. More...
 
void disconnect (typename SubjectBaseTraits< EVT, void >::callback_type callbackToErase) const
 Disconnect free function. More...
 
void propagate (int timestamp) const
 
void propagate () const
 
- Public Member Functions inherited from ocra::SubjectBase< EVT_CHANGE_VALUE >
void connect (T &object, typename SubjectBaseTraits< EVT, T >::callback_type newCallback) const
 Call this method to register a non-static method as a callback. More...
 
void connect (typename SubjectBaseTraits< EVT, void >::callback_type newCallback) const
 Call this method to register a free function as a callback. More...
 
void disconnect (T &object, typename SubjectBaseTraits< EVT, T >::callback_type callback) const
 Disconnect non-static method. More...
 
void disconnect (typename SubjectBaseTraits< EVT, void >::callback_type callbackToErase) const
 Disconnect free function. More...
 
void propagate (int timestamp) const
 
void propagate () const
 
- Public Member Functions inherited from ocra::NamedInstance
 NamedInstance (const std::string &name)
 
const std::string & getName () const
 
virtual ~NamedInstance ()
 

Protected Member Functions

virtual const Solver::Result & doSolve (void)
 
virtual void doPrepare (void)
 
virtual void recomputeVariable (void)
 
- Protected Member Functions inherited from ocra::QuadraticSolver
 QuadraticSolver (bool boundsAsConstraints=false)
 
void onConstraintResize (int timestamp)
 
void recomputeMP ()
 
- Protected Member Functions inherited from ocra::Solver
 Solver ()
 
void internalAddObjective (const GenericObjective &objective)
 
void internalAddConstraint (const GenericConstraint &constraint)
 
void internalRemoveObjective (const GenericObjective &objective)
 
void internalRemoveConstraint (const GenericConstraint &constraint)
 
virtual void onObjectiveResize (int timestamp)
 
virtual void doConclude ()=0
 
- Protected Member Functions inherited from ocra::ObserverBase< EVT_RESIZE >
void stopPropagation ()
 Call this method from your callbacks to avoid propagation to the bound subject (if any). More...
 
 ObserverBase ()
 
 ~ObserverBase ()
 
- Protected Member Functions inherited from ocra::ObserverBase< EVT_CHANGE_DEPENDENCIES >
void stopPropagation ()
 Call this method from your callbacks to avoid propagation to the bound subject (if any). More...
 
 ObserverBase ()
 
 ~ObserverBase ()
 
- Protected Member Functions inherited from ocra::ObserverBase< EVT_CHANGE_VALUE >
void stopPropagation ()
 Call this method from your callbacks to avoid propagation to the bound subject (if any). More...
 
 ObserverBase ()
 
 ~ObserverBase ()
 
- Protected Member Functions inherited from ocra::SubjectBase< EVT_RESIZE >
 SubjectBase ()
 
 ~SubjectBase ()
 
- Protected Member Functions inherited from ocra::SubjectBase< EVT_CHANGE_DEPENDENCIES >
 SubjectBase ()
 
 ~SubjectBase ()
 
- Protected Member Functions inherited from ocra::SubjectBase< EVT_CHANGE_VALUE >
 SubjectBase ()
 
 ~SubjectBase ()
 

Additional Inherited Members

- Protected Types inherited from ocra::ObserverBase< EVT_RESIZE >
typedef SubjectBase< EVT > subject_type
 
typedef InvokerBase< EVT > invoker_type
 
- Protected Types inherited from ocra::ObserverBase< EVT_CHANGE_DEPENDENCIES >
typedef SubjectBase< EVT > subject_type
 
typedef InvokerBase< EVT > invoker_type
 
- Protected Types inherited from ocra::ObserverBase< EVT_CHANGE_VALUE >
typedef SubjectBase< EVT > subject_type
 
typedef InvokerBase< EVT > invoker_type
 
- Protected Attributes inherited from ocra::QuadraticSolver
std::vector< LinearConstraint * > _equalityConstraints
 
std::vector< LinearConstraint * > _inequalityConstraints
 
std::vector< QuadraticObjective * > _objectives
 
std::vector< DiagonalLinearConstraint * > _bounds
 
size_t _m
 
size_t _p
 
size_t _ps
 
const bool _boundsAsConstraints
 
bool _invalidatedMP
 
- Protected Attributes inherited from ocra::Solver
OptimizationResult _result
 

Detailed Description

CmlQuadraticSolver class.

Warning
None

Wrapping of the QP solver from cml

Definition at line 37 of file CmlQuadraticSolver.h.

Member Enumeration Documentation

Enumerator
CMLQPSOLVER_LEMKE 
CMLQPSOLVER_GAUSS_SEIDEL 

Definition at line 41 of file CmlQuadraticSolver.h.

Constructor & Destructor Documentation

ocra::CmlQuadraticSolver::CmlQuadraticSolver ( int  type = xde::cmlQPSolver::LEMKE_SOLVER)

Member Function Documentation

virtual void ocra::CmlQuadraticSolver::addLinearEqualityConstraint ( LinearConstraint constraint)
virtual
virtual void ocra::CmlQuadraticSolver::addLinearInequalityConstraint ( LinearConstraint constraint)
virtual
virtual void ocra::CmlQuadraticSolver::addObjective ( QuadraticFunction obj,
real  weight = 1. 
)
virtual
bool ocra::CmlQuadraticSolver::checkConstraints ( void  )
virtual void ocra::CmlQuadraticSolver::doPrepare ( void  )
protectedvirtual

Implements ocra::Solver.

virtual const Solver::Result& ocra::CmlQuadraticSolver::doSolve ( void  )
protectedvirtual

Implements ocra::Solver.

virtual const MatrixBase& ocra::CmlQuadraticSolver::getA ( void  ) const
virtual

Implements ocra::QuadraticSolver.

virtual const VectorBase& ocra::CmlQuadraticSolver::getb ( void  ) const
virtual

Implements ocra::QuadraticSolver.

virtual const MatrixBase& ocra::CmlQuadraticSolver::getC ( void  ) const
virtual

Implements ocra::QuadraticSolver.

virtual const VectorBase& ocra::CmlQuadraticSolver::getd ( void  ) const
virtual

Implements ocra::QuadraticSolver.

virtual const VectorBase& ocra::CmlQuadraticSolver::getl ( void  ) const
virtual

Implements ocra::QuadraticSolver.

cfl_size_t ocra::CmlQuadraticSolver::getMaxIteration ( void  ) const
virtual const std::string& ocra::CmlQuadraticSolver::getMoreInfo ( void  ) const
virtual

Reimplemented from ocra::Solver.

virtual const MatrixBase& ocra::CmlQuadraticSolver::getP ( void  ) const
virtual

Implements ocra::QuadraticSolver.

virtual const VectorBase& ocra::CmlQuadraticSolver::getq ( void  ) const
virtual

Implements ocra::QuadraticSolver.

virtual const VectorBase& ocra::CmlQuadraticSolver::getu ( void  ) const
virtual

Implements ocra::QuadraticSolver.

virtual void ocra::CmlQuadraticSolver::printValuesAtSolution ( void  )
virtual

Implements ocra::Solver.

virtual void ocra::CmlQuadraticSolver::recomputeVariable ( void  )
protectedvirtual
virtual void ocra::CmlQuadraticSolver::removeConstraint ( LinearConstraint constraint)
virtual
virtual void ocra::CmlQuadraticSolver::removeObjective ( QuadraticFunction obj)
virtual
void ocra::CmlQuadraticSolver::setMaxIteration ( cfl_size_t  maxIter)
virtual void ocra::CmlQuadraticSolver::setObjective ( QuadraticFunction obj,
real  weight = 1. 
)
virtual
void ocra::CmlQuadraticSolver::setTolerance ( double  epsilon)

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