smooth_feedback
Control and estimation on Lie groups
|
Solver for quadratic programs. More...
#include <qp_solver.hpp>
Public Member Functions | |
QPSolver (const QPSolverParams &prm={}) | |
Default constructor. More... | |
QPSolver (const Pbm &pbm, const QPSolverParams &prm={}) | |
Construct and allocate working memory. More... | |
QPSolver (const QPSolver &)=default | |
Default copy constructor. | |
QPSolver (QPSolver &&) noexcept=default | |
Default move constructor. | |
QPSolver & | operator= (const QPSolver &)=default |
Default copy assignment. | |
QPSolver & | operator= (QPSolver &&) noexcept=default |
Default move assignment. | |
~QPSolver ()=default | |
Default destructor. | |
const QPSolution< M, N, Scalar > & | sol () const |
Access most recent QP solution. More... | |
void | analyze (const Pbm &pbm) |
Prepare for solving problems. More... | |
const QPSolution< M, N, Scalar > & | solve (const Pbm &pbm, std::optional< std::reference_wrapper< const QPSolution< M, N, Scalar > > > warmstart={}) |
Solve quadratic program. More... | |
Protected Member Functions | |
std::optional< QPSolutionStatus > | check_stopping (const Pbm &pbm) |
Check stopping criteria for solver. More... | |
void | scale (const Pbm &pbm) |
Re-scale QP. More... | |
Solver for quadratic programs.
Use this class to efficiently solve many QPs with the same problem structure.
For one-off QPs, see solve_qp().
Definition at line 243 of file qp_solver.hpp.
|
inline |
Default constructor.
Definition at line 267 of file qp_solver.hpp.
|
inline |
Construct and allocate working memory.
pbm | template problem. |
Memory is allocated for solving problems with same structure as pbm.
Definition at line 276 of file qp_solver.hpp.
|
inline |
Prepare for solving problems.
Definition at line 297 of file qp_solver.hpp.
|
inlineprotected |
Check stopping criteria for solver.
Definition at line 574 of file qp_solver.hpp.
|
inlineprotected |
Re-scale QP.
The scaled problem is defined as
where Sx = diag(sx), Sy = diag(sy).
The relation between scaled variables and original variables are
The objective of the rescaling is the make the columns of
\[ \begin{bmatrix} \bar P & \bar A^T \\ \bar A & 0 \end{bmatrix} \]
have similar \( l_\infty \) norm, and similarly for the columns of
\[ \begin{bmatrix} \bar P & \bar q \end{bmatrix}. \]
Definition at line 673 of file qp_solver.hpp.
|
inline |
Access most recent QP solution.
Definition at line 292 of file qp_solver.hpp.
|
inline |
Solve quadratic program.
Definition at line 344 of file qp_solver.hpp.