-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqpOASESsolver.h
32 lines (22 loc) · 941 Bytes
/
qpOASESsolver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef QPOASESSOLVER_H_
#define QPOASESSOLVER_H_
#include "MPCsolver.h"
#include <qpOASES.hpp>
USING_NAMESPACE_QPOASES;
class qpOASESsolver : public MPCsolver
{
public:
qpOASESsolver(int numVariable, int numConstraint, int numWorkingsetComputation = 100);
qpOASESsolver();
~qpOASESsolver();
bool initProblem();
bool setProblem(const Ref<const VectorXd> lowerBound, const Ref<const VectorXd> upperBound, const Ref<const MatrixXd> hessian,
const Ref<const VectorXd> gradient, const Ref<const MatrixXd> A, const Ref<const VectorXd> B);
bool solveProblem(Ref<VectorXd> result, int& optimizerStatus);
void set_printLevel(printLevelType printLevel);
private:
bool _qpOASESInitialized;
SQProblem _problem; /** QPOASES problem */
int_t _numWorkingsetComputation; /** Maximum number of working set computations */
};
#endif /* QPOASESSOLVER_H_ */