LSSOLQPSolver.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-lssol
9 #include <eigen-lssol/LSSOL_QP.h>
10 
11 // Tasks
12 #include "Tasks/GenQPSolver.h"
13 
14 namespace tasks
15 {
16 
17 namespace qp
18 {
19 
23 class TASKS_DLLAPI LSSOLQPSolver : public GenQPSolver
24 {
25 public:
26  LSSOLQPSolver();
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::LSSOL_QP lssol_;
47 
48  Eigen::MatrixXd A_;
49  Eigen::VectorXd AL_, AU_;
50 
51  Eigen::MatrixXd AFull_;
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 nrALines_;
68 };
69 
70 } // namespace qp
71 
72 } // namespace tasks
tasks::qp::LSSOLQPSolver
Definition: LSSOLQPSolver.h:23
GenQPSolver.h
tasks::qp::GenQPSolver
Definition: GenQPSolver.h:52
tasks
Definition: GenQPUtils.h:18