A sparse MPC solver for walking motion generation.
as_chol_solve.h
Go to the documentation of this file.
1 
8 #ifndef AS_CHOL_SOLVE_H
9 #define AS_CHOL_SOLVE_H
10 /****************************************
11  * INCLUDES
12  ****************************************/
13 
14 #include <vector>
15 
16 #include "smpc_common.h"
17 #include "as_matrix_E.h"
18 #include "as_matrix_ecL.h"
19 #include "as_problem_param.h"
20 #include "as_constraint.h"
21 
22 
23 /****************************************
24  * DEFINES
25  ****************************************/
26 
27 using namespace std;
28 
31 namespace AS
32 {
37  class chol_solve
38  {
39  public:
40  /*********** Constructors / Destructors ************/
41  chol_solve (const int);
42  ~chol_solve();
43 
44  void solve(const AS::problem_parameters&, const double *, double *);
45 
46  void up_resolve(const AS::problem_parameters&, const vector<AS::constraint>&, const double *, double *);
47 
48  double * get_lambda(const AS::problem_parameters&);
49  void down_resolve(const AS::problem_parameters&, const vector<AS::constraint>&, const int, const double *, double *);
50 
51 
52  private:
53  void update (const AS::problem_parameters&, const AS::constraint&, const int);
54  void update_z (const AS::problem_parameters&, const AS::constraint&, const int, const double *);
55  void downdate(const AS::problem_parameters&, const int, const int, const double *);
56 
57  void resolve (const AS::problem_parameters&, const vector<AS::constraint>&, const double *, double *);
58 
59  void form_sa_row(const AS::problem_parameters&, const AS::constraint&, const int, double *);
60 
61 
62  // ----------------------------------------------
63  // variables
65  double *nu;
66 
69 
72 
74  double **icL;
75 
77  double *icL_mem;
78 
80  double *z;
81  };
82 }
84 #endif /*AS_CHOL_SOLVE_H*/
Implements multiplication of matrix E and E' by a vector.
Definition: as_matrix_E.h:31
Initializes lower diagonal matrix L and performs backward and forward substitutions using this matrix...
Definition: as_matrix_ecL.h:35
AS::matrix_E E
matrix of equality AS::constraints
Definition: as_chol_solve.h:68
A set of problem parameters.
Solves KKT system using Cholesky decomposition.
Definition: as_chol_solve.h:37
Defines constraints associated with states of the system.
Definition: as_constraint.h:26
double ** icL
L for inequality AS::constraints.
Definition: as_chol_solve.h:74
double * icL_mem
All lines of icL are stored in one chunk of memory.
Definition: as_chol_solve.h:77
double * nu
Vector of Lagrange multipliers.
Definition: as_chol_solve.h:65
AS::matrix_ecL ecL
L for equality AS::constraints.
Definition: as_chol_solve.h:71
double * z
Vector z.
Definition: as_chol_solve.h:80