Loading...
Searching...
No Matches
solver-HQP-eiquadprog.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_hpp__
19#define __invdyn_solvers_hqp_eiquadprog_hpp__
20
22
23namespace tsid
24{
25 namespace solvers
26 {
31 public SolverHQPBase
32 {
33 public:
34 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
35
41
42 SolverHQuadProg(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
53 protected:
54
55 void sendMsg(const std::string & s);
56
63 double m_objValue;
64
66
67 Eigen::VectorXi m_activeSet;
69
70#ifdef ELIMINATE_EQUALITY_CONSTRAINTS
71// Eigen::FullPivLU<Matrix> m_CE_dec;
72// Eigen::ColPivHouseholderQR<Matrix> m_CE_dec; // fast, but difficult to retrieve null space basis
73// Eigen::FullPivHouseholderQR<Matrix> m_CE_dec; // doc says it is slow
74 Eigen::CompleteOrthogonalDecomposition<Matrix> m_CE_dec; // available from Eigen 3.3.0, 40 us for decomposition, 40 us to get null space basis, 40 us to project Hessian
75// Eigen::JacobiSVD<Matrix, Eigen::HouseholderQRPreconditioner> m_CE_dec; // too slow
76 Matrix m_ZT_H_Z;
77 Matrix m_CI_Z;
78#endif
79
80 unsigned int m_neq;
81 unsigned int m_nin;
82 unsigned int m_n;
83 };
84 }
85}
86
87#endif // ifndef __invdyn_solvers_hqp_eiquadprog_hpp__
Definition: solver-HQP-output.hpp:33
Abstract interface for a Quadratic Program (HQP) solver.
Definition: solver-HQP-base.hpp:37
Abstract interface for a Quadratic Program (HQP) solver.
Definition: solver-HQP-eiquadprog.hpp:32
double m_hessian_regularization
Definition: solver-HQP-eiquadprog.hpp:65
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Matrix Matrix
Definition: solver-HQP-eiquadprog.hpp:36
Vector m_ci0
Definition: solver-HQP-eiquadprog.hpp:62
math::Vector Vector
Definition: solver-HQP-eiquadprog.hpp:37
math::ConstRefVector ConstRefVector
Definition: solver-HQP-eiquadprog.hpp:39
Vector m_g
Definition: solver-HQP-eiquadprog.hpp:58
math::RefVector RefVector
Definition: solver-HQP-eiquadprog.hpp:38
double m_objValue
Definition: solver-HQP-eiquadprog.hpp:63
unsigned int m_neq
Definition: solver-HQP-eiquadprog.hpp:80
tsid::math::Index m_activeSetSize
vector containing the indexes of the active inequalities
Definition: solver-HQP-eiquadprog.hpp:68
Matrix m_H
Definition: solver-HQP-eiquadprog.hpp:57
math::ConstRefMatrix ConstRefMatrix
Definition: solver-HQP-eiquadprog.hpp:40
Matrix m_CI
Definition: solver-HQP-eiquadprog.hpp:61
Eigen::VectorXi m_activeSet
Definition: solver-HQP-eiquadprog.hpp:67
unsigned int m_n
number of inequality constraints
Definition: solver-HQP-eiquadprog.hpp:82
unsigned int m_nin
number of equality constraints
Definition: solver-HQP-eiquadprog.hpp:81
Vector m_ce0
Definition: solver-HQP-eiquadprog.hpp:60
Matrix m_CE
Definition: solver-HQP-eiquadprog.hpp:59
#define TSID_DLLAPI
Definition: config.hh:64
std::size_t Index
Definition: fwd.hpp:55
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: fwd.hpp:37
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
Definition: fwd.hpp:38
const Eigen::Ref< const Matrix > ConstRefMatrix
Definition: fwd.hpp:53
const Eigen::Ref< const Vector > ConstRefVector
Definition: fwd.hpp:50
Eigen::Ref< Vector > RefVector
Definition: fwd.hpp:49
pinocchio::container::aligned_vector< ConstraintLevel > HQPData
Definition: fwd.hpp:91
Definition: constraint-bound.hpp:27