11#include <Eigen/Sparse>
13namespace smooth::feedback {
31template<Eigen::Index M, Eigen::Index N,
typename Scalar =
double>
35 Eigen::Matrix<Scalar, N, N>
P;
37 Eigen::Matrix<Scalar, N, 1>
q;
40 Eigen::Matrix<Scalar, M, N>
A;
42 Eigen::Matrix<Scalar, M, 1>
l;
44 Eigen::Matrix<Scalar, M, 1>
u;
60template<
typename Scalar =
double>
64 Eigen::SparseMatrix<Scalar>
P;
66 Eigen::Matrix<Scalar, -1, 1>
q;
74 Eigen::SparseMatrix<Scalar, Eigen::RowMajor>
A;
76 Eigen::Matrix<Scalar, -1, 1>
l;
78 Eigen::Matrix<Scalar, -1, 1>
u;
95template<Eigen::Index M, Eigen::Index N,
typename Scalar =
double>
105 Eigen::Matrix<Scalar, M, 1>
dual;
QPSolutionStatus
Solver exit codes.
@ PrimalInfeasible
Solution satisfies optimality condition but is not polished.
@ Unknown
Max time was reached, returned solution is not optimal.
@ MaxIterations
A certificate of dual infeasibility was found, no solution returned.
@ PolishFailed
Solution satisifes optimality condition. Solution is polished if QPSolverParams::polish = true.
@ MaxTime
Max number of iterations was reached, returned solution is not optimal.
@ DualInfeasible
A certificate of primal infeasibility was found, no solution returned.
QPSolutionStatus code
Exit code.
Eigen::Matrix< Scalar, N, 1 > primal
Primal vector.
Scalar objective
Solution objective value.
uint32_t iter
Number of iterations.
Eigen::Matrix< Scalar, M, 1 > dual
Dual vector.
Sparse quadratic program definition.
Eigen::Matrix< Scalar, -1, 1 > u
Inequality upper bound.
Eigen::Matrix< Scalar, -1, 1 > l
Inequality lower bound.
Eigen::SparseMatrix< Scalar, Eigen::RowMajor > A
Inequality matrix.
Eigen::Matrix< Scalar, -1, 1 > q
Linear cost.
Eigen::SparseMatrix< Scalar > P
Positive semi-definite square cost (only upper trianglular part is used)
Quadratic program definition.
Eigen::Matrix< Scalar, N, N > P
Positive semi-definite square cost (only upper triangular part is used)
Eigen::Matrix< Scalar, M, N > A
Inequality matrix.
Eigen::Matrix< Scalar, M, 1 > u
Inequality upper bound.
Eigen::Matrix< Scalar, M, 1 > l
Inequality lower bound.
Eigen::Matrix< Scalar, N, 1 > q
Linear cost.