wbc
QPSwiftSolver.hpp
Go to the documentation of this file.
1#ifndef QP_SWIFT_SOLVER_HPP
2#define QP_SWIFT_SOLVER_HPP
3
5#include <qpSWIFT/qpSWIFT.h>
6
7namespace wbc {
8class QuadraticProgram;
9
10class QPSwiftSolver : public QPSolver{
11private:
13
14protected:
15 base::MatrixXd P;
16 base::VectorXd c;
17 base::MatrixXd A;
18 base::MatrixXd G;
19 base::VectorXd b;
20 base::VectorXd h;
21 int n_dec;
22 int n_ineq;
23 int n_eq;
25 QP *my_qp;
26 uint max_iter;
27 double rel_tol;
28 double abs_tol;
29 double sigma;
32 void toQpSwift(const QuadraticProgram &qp);
33public:
36
42 virtual void solve(const wbc::HierarchicalQP &hierarchical_qp, base::VectorXd &solver_output);
43
44 void setMaxIter(uint val){max_iter=val;}
45 void setRelTol(double val){rel_tol=val;}
46 void setAbsTol(double val){abs_tol=val;}
47 void setSigma(double val){sigma=val;}
48 void setVerboseLevel(uint val){verbose_level=val;}
49};
50}
51
52#endif
Definition QPSolver.hpp:14
Definition QPSwiftSolver.hpp:10
int n_eq
Definition QPSwiftSolver.hpp:23
double abs_tol
Definition QPSwiftSolver.hpp:28
void toQpSwift(const QuadraticProgram &qp)
Definition QPSwiftSolver.cpp:25
void setMaxIter(uint val)
Definition QPSwiftSolver.hpp:44
QP * my_qp
Definition QPSwiftSolver.hpp:25
base::VectorXd c
Definition QPSwiftSolver.hpp:16
base::VectorXd h
Definition QPSwiftSolver.hpp:20
double sigma
Definition QPSwiftSolver.hpp:29
double rel_tol
Definition QPSwiftSolver.hpp:27
~QPSwiftSolver()
Definition QPSwiftSolver.cpp:20
void setSigma(double val)
Definition QPSwiftSolver.hpp:47
virtual void solve(const wbc::HierarchicalQP &hierarchical_qp, base::VectorXd &solver_output)
solve Solve the given quadratic program
Definition QPSwiftSolver.cpp:67
int n_bounds
Definition QPSwiftSolver.hpp:24
uint verbose_level
Definition QPSwiftSolver.hpp:30
void setVerboseLevel(uint val)
Definition QPSwiftSolver.hpp:48
int n_dec
Definition QPSwiftSolver.hpp:21
base::VectorXd b
Definition QPSwiftSolver.hpp:19
uint max_iter
Definition QPSwiftSolver.hpp:26
base::MatrixXd A
Definition QPSwiftSolver.hpp:17
base::MatrixXd G
Definition QPSwiftSolver.hpp:18
QPSwiftSolver()
Definition QPSwiftSolver.cpp:11
void setRelTol(double val)
Definition QPSwiftSolver.hpp:45
base::MatrixXd P
Definition QPSwiftSolver.hpp:15
int n_ineq
Definition QPSwiftSolver.hpp:22
void setAbsTol(double val)
Definition QPSwiftSolver.hpp:46
Definition ContactsAccelerationConstraint.cpp:3
Describes a hierarchy of quadratic programs.
Definition QuadraticProgram.hpp:57
Definition QPSolver.hpp:67
Describes a quadratic program of the form.
Definition QuadraticProgram.hpp:24