solver-HQP-eiquadprog-fast.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2017 CNRS
3 //
4 // This file is part of tsid
5 // tsid is free software: you can redistribute it
6 // and/or modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation, either version
8 // 3 of the License, or (at your option) any later version.
9 // tsid is distributed in the hope that it will be
10 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
11 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // General Lesser Public License for more details. You should have
13 // received a copy of the GNU Lesser General Public License along with
14 // tsid If not, see
15 // <http://www.gnu.org/licenses/>.
16 //
17 
18 #ifndef __invdyn_solvers_hqp_eiquadprog_fast_hpp__
19 #define __invdyn_solvers_hqp_eiquadprog_fast_hpp__
20 
22 #include "eiquadprog/eiquadprog-fast.hpp"
23 
24 namespace tsid
25 {
26  namespace solvers
27  {
31  class TSID_DLLAPI SolverHQuadProgFast : public SolverHQPBase
32  {
33  public:
34  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
35 
41 
42  SolverHQuadProgFast(const std::string & name);
43 
44  void resize(unsigned int n, unsigned int neq, unsigned int nin);
45 
48  const HQPOutput & solve(const HQPData & problemData);
49 
51  double getObjectiveValue();
52 
54  bool setMaximumIterations(unsigned int maxIter);
55 
56  protected:
57 
58  void sendMsg(const std::string & s);
59 
60  // <nVars, nEqCon, 2*nIneqCon>
61  eiquadprog::solvers::EiquadprogFast m_solver;
62 
69  double m_objValue;
70 
72 
75 
76  unsigned int m_neq;
77  unsigned int m_nin;
78  unsigned int m_n;
79  };
80  }
81 }
82 
83 #endif // ifndef __invdyn_solvers_hqp_eiquadprog_fast_hpp__
tsid::solvers::SolverHQuadProgFast::m_CE
Matrix m_CE
Definition: solver-HQP-eiquadprog-fast.hpp:65
tsid::solvers::SolverHQuadProgFast::m_solver
eiquadprog::solvers::EiquadprogFast m_solver
Definition: solver-HQP-eiquadprog-fast.hpp:61
tsid::solvers::SolverHQuadProgFast
Definition: solver-HQP-eiquadprog-fast.hpp:31
tsid::solvers::SolverHQuadProgFast::m_activeSet
Eigen::VectorXi m_activeSet
Definition: solver-HQP-eiquadprog-fast.hpp:73
tsid::math::Vector
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: fwd.hpp:37
tsid::math::Matrix
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
Definition: fwd.hpp:38
tsid::solvers::SolverHQuadProgFast::m_g
Vector m_g
Definition: solver-HQP-eiquadprog-fast.hpp:64
tsid::solvers::SolverHQuadProgFast::Vector
math::Vector Vector
Definition: solver-HQP-eiquadprog-fast.hpp:37
tsid::solvers::SolverHQuadProgFast::m_CI
Matrix m_CI
Definition: solver-HQP-eiquadprog-fast.hpp:67
tsid::math::VectorXi
Eigen::VectorXi VectorXi
Definition: fwd.hpp:39
tsid::solvers::SolverHQuadProgFast::RefVector
math::RefVector RefVector
Definition: solver-HQP-eiquadprog-fast.hpp:38
tsid::math::RefVector
Eigen::Ref< Vector > RefVector
Definition: fwd.hpp:49
tsid::solvers::HQPOutput
Definition: solver-HQP-output.hpp:32
tsid::solvers::SolverHQPBase
Abstract interface for a Quadratic Program (HQP) solver.
Definition: solver-HQP-base.hpp:36
tsid::solvers::SolverHQuadProgFast::m_neq
unsigned int m_neq
Definition: solver-HQP-eiquadprog-fast.hpp:76
tsid::solvers::SolverHQuadProgFast::m_ce0
Vector m_ce0
Definition: solver-HQP-eiquadprog-fast.hpp:66
tsid::solvers::SolverHQuadProgFast::m_activeSetSize
int m_activeSetSize
vector containing the indexes of the active inequalities
Definition: solver-HQP-eiquadprog-fast.hpp:74
solver-HQP-base.hpp
tsid::math::ConstRefVector
const typedef Eigen::Ref< const Vector > ConstRefVector
Definition: fwd.hpp:50
tsid
Definition: constraint-bound.hpp:26
tsid::solvers::SolverHQuadProgFast::m_n
unsigned int m_n
number of inequality constraints
Definition: solver-HQP-eiquadprog-fast.hpp:78
tsid::solvers::SolverHQuadProgFast::m_objValue
double m_objValue
Definition: solver-HQP-eiquadprog-fast.hpp:69
tsid::solvers::SolverHQuadProgFast::m_ci0
Vector m_ci0
twice the rows because inequality constraints are bilateral
Definition: solver-HQP-eiquadprog-fast.hpp:68
tsid::math::ConstRefMatrix
const typedef Eigen::Ref< const Matrix > ConstRefMatrix
Definition: fwd.hpp:53
tsid::solvers::SolverHQuadProgFast::m_nin
unsigned int m_nin
number of equality constraints
Definition: solver-HQP-eiquadprog-fast.hpp:77
tsid::solvers::HQPData
pinocchio::container::aligned_vector< ConstraintLevel > HQPData
Definition: fwd.hpp:91
tsid::solvers::SolverHQuadProgFast::m_hessian_regularization
double m_hessian_regularization
Definition: solver-HQP-eiquadprog-fast.hpp:71
tsid::solvers::SolverHQuadProgFast::m_H
Matrix m_H
Definition: solver-HQP-eiquadprog-fast.hpp:63
tsid::solvers::SolverHQuadProgFast::ConstRefVector
math::ConstRefVector ConstRefVector
Definition: solver-HQP-eiquadprog-fast.hpp:39
tsid::solvers::SolverHQuadProgFast::ConstRefMatrix
math::ConstRefMatrix ConstRefMatrix
Definition: solver-HQP-eiquadprog-fast.hpp:40
tsid::solvers::SolverHQuadProgFast::Matrix
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Matrix Matrix
Definition: solver-HQP-eiquadprog-fast.hpp:36