Totsu PrimalDualIPM
QCQP Class Reference

A Quadratically Constrained Quadratic Program solver class. More...

#include <QCQP.h>

Inheritance diagram for QCQP:

Public Member Functions

IPM_Error solve (IPM_Vector &x, const IPM_Matrix P[], const IPM_Vector q[], const IPM_Single r[], const IPM_uint m, const IPM_Matrix &A, const IPM_Vector &b)
 Runs the solver with given parameters. More...
 
bool isConverged (void)
 Indicates if the previous solve() has converged or not.
 
- Public Member Functions inherited from PrimalDualIPM
 PrimalDualIPM ()
 Constructor.
 
virtual ~PrimalDualIPM ()
 Destructor.
 
void setLog (std::ostream *pOuts)
 Sets output destination of internal calculation log. More...
 

Protected Attributes

IPM_Scalar m_slack
 Initial margin value for a slack variable.
 
- Protected Attributes inherited from PrimalDualIPM
IPM_Scalar m_margin
 Initial margin value for dual variables of inequalities.
 
IPM_Scalar m_loop
 Max iteration number of outer-loop for the Newton step.
 
IPM_Scalar m_bloop
 Max iteration number of inner-loop for the backtracking line search.
 
IPM_Scalar m_eps_feas
 Tolerance of the primal and dual residuals.
 
IPM_Scalar m_eps
 Tolerance of the surrogate duality gap.
 
IPM_Scalar m_mu
 The factor to squeeze complementary slackness.
 
IPM_Scalar m_alpha
 The factor to decrease residuals in the backtracking line search.
 
IPM_Scalar m_beta
 The factor to decrease a step size in the backtracking line search.
 
IPM_Scalar m_s_coef
 The factor to determine an initial step size in the backtracking line search.
 

Additional Inherited Members

- Protected Member Functions inherited from PrimalDualIPM
void logWarn (const char *str)
 Logs a warning message. More...
 
void logVector (const char *str, IPM_Vector_IN v)
 Logs values of a vector, transposing if it is a colomn vector. More...
 
void logMatrix (const char *str, IPM_Matrix_IN m)
 Logs values of a matrix. More...
 
IPM_Error start (const IPM_uint n, const IPM_uint m, const IPM_uint p)
 Starts to solve a optimization problem by primal-dual interior-point method. More...
 
- Static Protected Member Functions inherited from PrimalDualIPM
static IPM_Scalar max (const IPM_Scalar a, const IPM_Scalar b)
 Returns the larger of a and b.
 
static IPM_Scalar min (const IPM_Scalar a, const IPM_Scalar b)
 Returns the smaller of a and b.
 
static IPM_Scalar abs (const IPM_Scalar x)
 Returns the absolute value of x.
 

Detailed Description

A Quadratically Constrained Quadratic Program solver class.

The problem is \[ \begin{array}{ll} {\rm minimize} & {1 \over 2} x^T P_0 x + q_0^T x + r_0 \\ {\rm subject \ to} & {1 \over 2} x^T P_i x + q_i^T x + r_i \le 0 \quad (i = 1, \ldots, m) \\ & A x = b, \end{array} \] where

  • variables \( x \in {\bf R}^n \)
  • \( P_j \in {\bf S}_{+}^n \), \( q_j \in {\bf R}^n \), \( r_j \in {\bf R} \) for \( j = 0, \ldots, m \)
  • \( A \in {\bf R}^{p \times n} \), \( b \in {\bf R}^p \).

Internally a slack variable \( s \in {\bf R} \) is introduced for the infeasible start method as follows: \[ \begin{array}{ll} {\rm minimize}_{x,s} & {1 \over 2} x^T P_0 x + q_0^T x + r_0 \\ {\rm subject \ to} & {1 \over 2} x^T P_i x + q_i^T x + r_i \le s \quad (i = 1, \ldots, m) \\ & A x = b \\ & s = 0. \end{array} \]

Member Function Documentation

IPM_Error QCQP::solve ( IPM_Vector x,
const IPM_Matrix  P[],
const IPM_Vector  q[],
const IPM_Single  r[],
const IPM_uint  m,
const IPM_Matrix A,
const IPM_Vector b 
)

Runs the solver with given parameters.

Parameters
x[IN-OUT] is a column vector containing values of \(x\). It is used as the initial values and overwritten with the final results.
P[IN] is an array of matrices containing values of \(P_0, \ldots, P_m\).
q[IN] is an array of vectors containing values of \(q_0, \ldots, q_m\).
r[IN] is an array of single element matrices containing values of \(r_0, \ldots, r_m\).
mis \(m\), the number of inequality constraints.
A[IN] is a matrix containing values of \(A\).
b[IN] is a vector containing values of \(b\).

Here is the call graph for this function:


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