QLDQPSolver.h
Go to the documentation of this file.
1 /*
2  * Copyright 2012-2019 CNRS-UM LIRMM, CNRS-AIST JRL
3  */
4 
5 #pragma once
6 
7 // includes
8 // eigen-qld
9 #include <eigen-qld/QLD.h>
10 
11 // Tasks
12 #include "Tasks/GenQPSolver.h"
13 
14 namespace tasks
15 {
16 
17 namespace qp
18 {
19 
23 class TASKS_DLLAPI QLDQPSolver : public GenQPSolver
24 {
25 public:
26  QLDQPSolver();
27 
28  virtual void updateSize(int nrVars, int nrEq, int nrInEq, int nrGenInEq) override;
29  virtual void updateMatrix(const std::vector<Task *> & tasks,
30  const std::vector<Equality *> & eqConstr,
31  const std::vector<Inequality *> & inEqConstr,
32  const std::vector<GenInequality *> & genInEqConstr,
33  const std::vector<Bound *> & boundConstr) override;
34  virtual bool solve() override;
35  virtual const Eigen::VectorXd & result() const override;
36  virtual std::ostream & errorMsg(const std::vector<rbd::MultiBody> & mbs,
37  const std::vector<Task *> & tasks,
38  const std::vector<Equality *> & eqConstr,
39  const std::vector<Inequality *> & inEqConstr,
40  const std::vector<GenInequality *> & genInEqConstr,
41  const std::vector<Bound *> & boundConstr,
42  std::ostream & out) const override;
43  std::string name() const override;
44 
45 private:
46  Eigen::QLD qld_;
47 
48  Eigen::MatrixXd Aeq_, Aineq_;
49  Eigen::VectorXd beq_, bineq_;
50 
51  Eigen::MatrixXd AeqFull_, AineqFull_;
52 
53  Eigen::VectorXd XL_;
54  Eigen::VectorXd XU_;
55 
56  Eigen::VectorXd XLFull_;
57  Eigen::VectorXd XUFull_;
58 
59  Eigen::MatrixXd Q_;
60  Eigen::VectorXd C_;
61 
62  Eigen::MatrixXd QFull_;
63  Eigen::VectorXd CFull_;
64 
65  Eigen::VectorXd XFull_;
66 
67  int nrAeqLines_;
68  int nrAineqLines_;
69 };
70 
71 } // namespace qp
72 
73 } // namespace tasks
tasks::qp::QLDQPSolver
Definition: QLDQPSolver.h:23
GenQPSolver.h
tasks::qp::GenQPSolver
Definition: GenQPSolver.h:52
tasks
Definition: GenQPUtils.h:18