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 
63  Matrix m_H;
64  Vector m_g;
65  Matrix m_CE;
66  Vector m_ce0;
67  Matrix m_CI;
68  Vector m_ci0;
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__
Eigen::Ref< Vector > RefVector
Definition: fwd.hpp:49
const Eigen::Ref< const Matrix > ConstRefMatrix
Definition: fwd.hpp:53
Definition: solver-HQP-output.hpp:32
int m_activeSetSize
vector containing the indexes of the active inequalities
Definition: solver-HQP-eiquadprog-fast.hpp:74
Eigen::VectorXi m_activeSet
Definition: solver-HQP-eiquadprog-fast.hpp:73
math::ConstRefVector ConstRefVector
Definition: solver-HQP-eiquadprog-fast.hpp:39
Vector m_g
Definition: solver-HQP-eiquadprog-fast.hpp:64
double m_hessian_regularization
Definition: solver-HQP-eiquadprog-fast.hpp:71
eiquadprog::solvers::EiquadprogFast m_solver
Definition: solver-HQP-eiquadprog-fast.hpp:61
pinocchio::container::aligned_vector< ConstraintLevel > HQPData
Definition: fwd.hpp:91
Matrix m_H
Definition: solver-HQP-eiquadprog-fast.hpp:63
math::ConstRefMatrix ConstRefMatrix
Definition: solver-HQP-eiquadprog-fast.hpp:40
Definition: solver-HQP-eiquadprog-fast.hpp:31
const Eigen::Ref< const Vector > ConstRefVector
Definition: fwd.hpp:50
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: fwd.hpp:37
unsigned int m_neq
Definition: solver-HQP-eiquadprog-fast.hpp:76
math::Vector Vector
Definition: solver-HQP-eiquadprog-fast.hpp:37
Matrix m_CE
Definition: solver-HQP-eiquadprog-fast.hpp:65
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
Definition: fwd.hpp:38
math::RefVector RefVector
Definition: solver-HQP-eiquadprog-fast.hpp:38
Vector m_ci0
twice the rows because inequality constraints are bilateral
Definition: solver-HQP-eiquadprog-fast.hpp:68
Definition: constraint-bound.hpp:26
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Matrix Matrix
Definition: solver-HQP-eiquadprog-fast.hpp:36
Eigen::VectorXi VectorXi
Definition: fwd.hpp:39
unsigned int m_n
number of inequality constraints
Definition: solver-HQP-eiquadprog-fast.hpp:78
Vector m_ce0
Definition: solver-HQP-eiquadprog-fast.hpp:66
Matrix m_CI
Definition: solver-HQP-eiquadprog-fast.hpp:67
double m_objValue
Definition: solver-HQP-eiquadprog-fast.hpp:69
unsigned int m_nin
number of equality constraints
Definition: solver-HQP-eiquadprog-fast.hpp:77
Abstract interface for a Quadratic Program (HQP) solver.
Definition: solver-HQP-base.hpp:36