Skip to content

Commit b96feaa

Browse files
Document checking the duality gap
1 parent 7be73ea commit b96feaa

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

doc/2-PROXQP_API/2-ProxQP_api.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,20 @@ $$\begin{equation}\label{eq:approx_qp_sol_relative_criterion}
6363
\end{aligned}
6464
\end{equation}$$
6565

66+
This stopping criterion on primal and dual residuals is not enough to guarantee that the returned solution satisfies all \eqref{qp:kkt} conditions. If the problem is *strictly* convex, that is, if it's Hessian $H$ is positive definite, then strong duality holds and to satisfy all optimality conditions we need to add a third criterion on the *duality gap* $r_g$:
67+
68+
$$\begin{equation}\label{eq:approx_qp_sol}
69+
\begin{aligned}
70+
&\left\{
71+
\begin{array}{ll}
72+
r_g := | x^T H x + g^T x + b^T y + u^T z^+ + l^T z^- | \leq \epsilon_{\text{abs}} + \epsilon_{\text{rel}} \max(\|x^T H x\|, \|g^T x\|, \|b^T y\|, \|u^T z^+\|, \|l^T z^-\|) \\
73+
\end{array}
74+
\right.
75+
\end{aligned}
76+
\end{equation}$$
77+
78+
ProxQP provides the ``check_duality_gap`` option to include this duality gap in the stopping criterion. Note that it is disabled by default, as ProxQP is also designed to work with problems that are not strictly convex where strong duality doesn't hold; that is, where the duality gap can be non-zero at an optimal solution. Enable this option if you know that your problem is strictly convex and want a strong guarantee that the returned solution is optimal. ProxQP will then check the same termination condition as SCS (for more details see, e.g., SCS's [optimality conditions checks](https://www.cvxgrp.org/scs/algorithm/index.html#optimality-conditions) as well as [section 7.2](https://doi.org/10.1137/20M1366307) in the corresponding paper).
79+
6680
\section OverviewAPIstructure ProxQP unified API for dense and sparse backends
6781

6882
ProxQP algorithm is implemented in two versions specialized for dense and sparse matrices. One simple and unified API has been designed for loading the dense and sparse backends. Concretely, it contains three methods:

0 commit comments

Comments
 (0)