Eigen::QuadProgDense Class Reference

Dense quadratic program. More...

#include <QuadProg.h>

Inheritance diagram for Eigen::QuadProgDense:
[legend]
Collaboration diagram for Eigen::QuadProgDense:
[legend]

Public Member Functions

EIGEN_QUADPROG_API QuadProgDense ()
 
EIGEN_QUADPROG_API QuadProgDense (int nrvar, int nreq, int nrineq)
 
EIGEN_QUADPROG_API void problem (int nrvar, int nreq, int nrineq)
 Set problem dimensions. More...
 
EIGEN_QUADPROG_API bool solve (const MatrixXd &Q, const VectorXd &C, const MatrixXd &Aeq, const VectorXd &Beq, const MatrixXd &Aineq, const VectorXd &Bineq, bool isDecomp=false)
 Solve quadratic program. More...
 
- Public Member Functions inherited from Eigen::QuadProgCommon
EIGEN_QUADPROG_API QuadProgCommon ()
 Default constructor. More...
 
EIGEN_QUADPROG_API const VectorXi & iter () const
 Two-dimensional iteration vector. More...
 
EIGEN_QUADPROG_API int fail () const
 Failure code, 0 is success. More...
 
EIGEN_QUADPROG_API const VectorXd & result () const
 Solution found by the solver. More...
 
EIGEN_QUADPROG_API void problem (int nrvar, int nreq, int nrineq)
 Set problem dimensions. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Eigen::QuadProgCommon
void fillQCBf (int nreq, int nrineq, const MatrixXd &Q, const VectorXd &C, const VectorXd &Beq, const VectorXd &Bineq, bool isDecomp)
 
- Protected Attributes inherited from Eigen::QuadProgCommon
MatrixXd Q_
 Cost function matrix. More...
 
VectorXd C_
 Cost function vector. More...
 
VectorXd B_
 Inequality constraint vector. More...
 
VectorXd X_
 Solution of the quadratic program. More...
 
int fail_
 Failure code, 0 is success. More...
 
VectorXi iact_
 Vector of constraints that are active in solution. More...
 
VectorXi iter_
 2x1 vector, first component gives the number of "main" iterations, the second one says how many constraints were deleted after they became active More...
 
VectorXd work_
 Working space vector with length at least \(2n+r(r+5)/2+2q+1\) where \(r=\min(n,q)\). More...
 

Detailed Description

Dense quadratic program.

\begin{align} \underset{{x} \in \mathbb{R}^n}{\text{minimize}} & \ \frac{1}{2}{x^TQx} + {c^Tx} \nonumber \\ \text{subject to} & \ A_{eq} x = b_{eq} \\ & \ A_{ineq} x \leq b_{ineq} \end{align}

Constructor & Destructor Documentation

◆ QuadProgDense() [1/2]

EIGEN_QUADPROG_API Eigen::QuadProgDense::QuadProgDense ( )

◆ QuadProgDense() [2/2]

EIGEN_QUADPROG_API Eigen::QuadProgDense::QuadProgDense ( int  nrvar,
int  nreq,
int  nrineq 
)

Member Function Documentation

◆ problem()

EIGEN_QUADPROG_API void Eigen::QuadProgDense::problem ( int  nrvar,
int  nreq,
int  nrineq 
)

Set problem dimensions.

Parameters
nrvarDimension \(n\) of optimization vector \(x \in \mathbb{R}^n\).
nreqNumber of equality constraints, i.e. number of lines of \(A_{eq}\) and \(b_{eq}\).
nrineqNumber of inequality constraints, i.e. number of lines of \(A_{ineq}\) and \(b_{ineq}\).

◆ solve()

EIGEN_QUADPROG_API bool Eigen::QuadProgDense::solve ( const MatrixXd &  Q,
const VectorXd &  C,
const MatrixXd &  Aeq,
const VectorXd &  Beq,
const MatrixXd &  Aineq,
const VectorXd &  Bineq,
bool  isDecomp = false 
)

Solve quadratic program.

Parameters
QCost function matrix.
CCost function vector.
AeqMatrix of equality constraints \(A_{eq} x = b_{eq}\).
BeqVector of equality constraints \(A_{eq} x = b_{eq}\).
AineqMatrix of equality constraints \(A_{ineq} x \leq b_{ineq}\).
BineqVector of equality constraints \(A_{ineq} x \leq b_{ineq}\).
isDecompIf false (default), Q is not decomposed. If true, the solver will assume that Q is already decomposed into \(Q = R^T R\) and it is given \(R^{-1}\).
Returns
success True if the solver found a solution.