A sparse MPC solver for walking motion generation.
as_constraint.h
Go to the documentation of this file.
1 
8 #ifndef AS_CONSTRAINT_H
9 #define AS_CONSTRAINT_H
10 
11 /****************************************
12  * INCLUDES
13  ****************************************/
14 
15 
16 
17 /****************************************
18  * TYPEDEFS
19  ****************************************/
22 
23 namespace AS
24 {
26  class constraint
27  {
28  public:
39  void set(
40  const int cind_,
41  const double coef_x_,
42  const double coef_y_,
43  const double lb_,
44  const double ub_,
45  const bool active)
46  {
47  cind = cind_;
49  coef_x = coef_x_;
50  coef_y = coef_y_;
51  lb = lb_;
52  ub = ub_;
53  isActive = active;
54  }
55 
56 
58  int cind;
59 
61  int ind;
62 
63 
65  double coef_x;
67  double coef_y;
69 
70 
72  double lb;
73 
75  double ub;
76 
77 
83  int sign;
84 
86  bool isActive;
87  };
88 }
90 
91 #endif /*AS_CONSTRAINT_H*/
92 
#define SMPC_NUM_STATE_VAR
Number of state variables.
Definition: smpc_solver.h:24
void set(const int cind_, const double coef_x_, const double coef_y_, const double lb_, const double ub_, const bool active)
Set parameters of the bound.
Definition: as_constraint.h:39
double lb
Lower bound.
Definition: as_constraint.h:72
double coef_y
Coefficients.
Definition: as_constraint.h:67
int cind
The sequential number of the constraint.
Definition: as_constraint.h:58
double coef_x
Coefficients.
Definition: as_constraint.h:66
bool isActive
If isActive then one of the bounds is in the working set.
Definition: as_constraint.h:86
Defines constraints associated with states of the system.
Definition: as_constraint.h:26
int ind
Index of the first element of a state in the vector of states.
Definition: as_constraint.h:61
double ub
Upper bound.
Definition: as_constraint.h:75