ocra-recipes
Doxygen documentation for the ocra-recipes repository
|
Solver class that only consider one level of importance for all tasks using QPOASES. More...
#include <OneLevelSolver.h>
Public Member Functions | |
virtual OneLevelSolver::Ptr | clone () const |
OneLevelSolverWithQPOASES () | |
virtual | ~OneLevelSolverWithQPOASES () |
Public Member Functions inherited from ocra::OneLevelSolver | |
OneLevelSolver () | |
virtual | ~OneLevelSolver () |
virtual void | printValuesAtSolution () |
void | addObjective (ObjectiveType &obj) |
void | removeObjective (ObjectiveType &obj) |
void | addConstraint (ocra::LinearConstraint &constraint) |
void | removeConstraint (ocra::LinearConstraint &constraint) |
void | writePerformanceInStream (std::ostream &myOstream, bool addCommaAtEnd) |
virtual void | setObjectiveLevel (ocra::GenericObjective &obj, int level) |
virtual std::string | toString () |
const std::vector< ObjectiveType * > & | getObjectives () |
const Eigen::MatrixXd & | getQuadraticMatrix () |
const Eigen::VectorXd & | getQuadraticVector () |
Public Member Functions inherited from ocra::Solver | |
const std::vector< int > & | findMapping (Variable &var) |
virtual | ~Solver () |
const OptimizationResult & | solve () |
const OptimizationResult & | getLastResult () const |
void | printStatus (std::ostream &os) |
virtual const std::string & | getMoreInfo () const |
void | setMemoryLevel (int level) |
void | setAutoDumpFile (const std::string &file) |
void | activateAutoDump () |
void | deactivateAutoDump () |
void | dump (const std::string &file="") const |
int | n () |
Variable & | getProblemVariable () |
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 void | doSolve () |
virtual void | updateObjectiveEquations () |
virtual void | updateConstraintEquations () |
Protected Member Functions inherited from ocra::OneLevelSolver | |
virtual void | doPrepare () |
virtual void | doConclude () |
virtual void | prepareMatrices () |
void | reduceConstraints (const Eigen::MatrixXd &A, const Eigen::VectorXd &b, Eigen::MatrixXd &Ar, Eigen::VectorXd &br, double tolerance=1e-6) |
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 | onConstraintResize (int timestamp) |
virtual void | onObjectiveResize (int timestamp) |
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 () | |
Static Protected Member Functions | |
static ocra::eReturnInfo | toOcraRetValue (const qpOASES::returnValue &ret) |
Protected Attributes | |
std::unique_ptr< qpOASES::SQProblem > | sqp_prob |
qpOASES::Options | sqp_options |
std::vector< qpOASES::real_t > | H |
qpOASES::real_t * | g |
qpOASES::real_t * | lb |
qpOASES::real_t * | ub |
qpOASES::real_t * | A |
qpOASES::real_t * | lbA |
qpOASES::real_t * | ubA |
Eigen::VectorXd | _xl |
Eigen::VectorXd | _xu |
MatrixXdRm | _AandG |
MatrixXdRm | _C_row_major |
Eigen::MatrixXd | _RegTerm |
Eigen::VectorXd | _lbAandG |
Eigen::VectorXd | _ubAandG |
Eigen::VectorXd | _lbA |
Eigen::VectorXd | _lbG |
Eigen::VectorXd | _ubA |
Eigen::VectorXd | _ubG |
int | _nWSR_every_run |
int | nWSR |
Protected Attributes inherited from ocra::OneLevelSolver | |
std::vector< ObjectiveType * > | _objectives |
std::vector< ocra::LinearConstraint * > | _equalityConstraints |
Eigen::MatrixXd | _A |
Eigen::VectorXd | _b |
Eigen::MatrixXd | _Atotal |
Eigen::VectorXd | _btotal |
int | ne |
std::vector< ocra::LinearConstraint * > | _inequalityConstraints |
Eigen::MatrixXd | _G |
Eigen::VectorXd | _h |
int | ni |
Eigen::VectorXd | Xsolution |
Eigen::MatrixXd | _C |
Eigen::VectorXd | _d |
Protected Attributes inherited from ocra::Solver | |
OptimizationResult | _result |
Additional Inherited Members | |
Public Types inherited from ocra::OneLevelSolver | |
using | ObjectiveType = ocra::QuadraticObjective |
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 |
Solver class that only consider one level of importance for all tasks using QPOASES.
It uses a linear quadratic program which comes from https://projects.coin-or.org/qpOASES .
QPOASES solve the following problem:
Definition at line 184 of file OneLevelSolver.h.
OneLevelSolverWithQPOASES::OneLevelSolverWithQPOASES | ( | ) |
Definition at line 395 of file OneLevelSolver.cpp.
|
inlinevirtual |
Definition at line 191 of file OneLevelSolver.h.
|
inlinevirtual |
retuns a pointer to a new instance, very usefull in Hocra
Implements ocra::OneLevelSolver.
Definition at line 188 of file OneLevelSolver.h.
|
protectedvirtual |
Implements ocra::OneLevelSolver.
Definition at line 560 of file OneLevelSolver.cpp.
|
staticprotected |
Definition at line 547 of file OneLevelSolver.cpp.
|
protectedvirtual |
Implements ocra::OneLevelSolver.
Definition at line 406 of file OneLevelSolver.cpp.
|
protectedvirtual |
Implements ocra::OneLevelSolver.
Definition at line 519 of file OneLevelSolver.cpp.
|
protected |
Definition at line 209 of file OneLevelSolver.h.
|
protected |
Definition at line 209 of file OneLevelSolver.h.
|
protected |
Definition at line 212 of file OneLevelSolver.h.
|
protected |
Definition at line 211 of file OneLevelSolver.h.
|
protected |
Definition at line 212 of file OneLevelSolver.h.
|
protected |
Definition at line 214 of file OneLevelSolver.h.
|
protected |
Definition at line 210 of file OneLevelSolver.h.
|
protected |
Definition at line 212 of file OneLevelSolver.h.
|
protected |
Definition at line 211 of file OneLevelSolver.h.
|
protected |
Definition at line 212 of file OneLevelSolver.h.
|
protected |
Definition at line 206 of file OneLevelSolver.h.
|
protected |
Definition at line 207 of file OneLevelSolver.h.
|
protected |
Definition at line 201 of file OneLevelSolver.h.
|
protected |
Definition at line 198 of file OneLevelSolver.h.
|
protected |
Definition at line 197 of file OneLevelSolver.h.
|
protected |
Definition at line 199 of file OneLevelSolver.h.
|
protected |
Definition at line 202 of file OneLevelSolver.h.
|
protected |
Definition at line 214 of file OneLevelSolver.h.
|
protected |
Definition at line 195 of file OneLevelSolver.h.
|
protected |
Definition at line 191 of file OneLevelSolver.h.
|
protected |
Definition at line 200 of file OneLevelSolver.h.
|
protected |
Definition at line 203 of file OneLevelSolver.h.