Optimo  0.1.0
A C++ header library for optimization
 All Classes Functions Variables Pages
optimo::solvers::PrimalDualQP< Scalar, n, m, p > Class Template Reference

Solves a constrained quadratic program (QP). More...

#include <primal_dual_qp_api.h>

Inheritance diagram for optimo::solvers::PrimalDualQP< Scalar, n, m, p >:
optimo::solvers::Solver< Scalar >

Classes

struct  Params
 QP parameters defining the problem. More...
 

Public Member Functions

TERMINATION_TYPE operator() (const PrimalDualQP< Scalar, n, m, p >::Params &params, Matrix< Scalar, n, 1 > *x, Scalar *min_value)
 Solve the QP program.
 

Additional Inherited Members

- Public Attributes inherited from optimo::solvers::Solver< Scalar >
struct
optimo::solvers::Solver::Options 
options
 Solver parameters.
 

Detailed Description

template<typename Scalar, uint n, uint m, uint p>
class optimo::solvers::PrimalDualQP< Scalar, n, m, p >

Solves a constrained quadratic program (QP).

Solves the following constrained quadratic program (QP):

\begin{eqnarray*} \underset{\mathbf{x}}{\text{minimize}} & \frac{\mathbf{x}^T Q \mathbf{x}}{2} + & \mathbf{d}^T\mathbf{x} \\ \text{subject to} & & \\ A_{\text{eq}} \mathbf{x} & = & \mathbf{b}_{\text{eq}} \\ A_{\text{in}} \mathbf{x} & \leq & \mathbf{b}_{\text in} \\ \end{eqnarray*}

where \(A_{\text{in}} \in \mathbb{R}^{m \times n} \), \(A_{\text{eq}} \in \mathbb{R}^{p \times n} \), \(\mathbf{b}_{\text{in}} \in \mathbb{R}^{m}\), \(\mathbf{b}_{\text{eq}} \in \mathbb{R}^{p}\), \(\mathbf{d} \in \mathbb{R}^n\), \( Q \in \mathbb{R}^{n \times n} \) and \( \mathbf{x} \in \mathbb{R}^n \).

This QP solver implements a primal dual interior point method where

  • n: Number of unkowns
  • m: Number of inequalities
  • p: Number of equalities This solver is recomended for small problems (n + m + p < 100). For larger problems consider using the Sparse implementation (SparsePrimalDualQP).

The solver requires a vector

\[ \mathbf{y} = \begin{bmatrix} \mathbf{x}^T & \lambda^T & \nu^T \end{bmatrix}^T \]

where the primal and dual variables are stored.


The documentation for this class was generated from the following file: