Skip to content

Implicit API

Internals of the implicit retraction-manifold backend.

qpax.implicit.pdip.solve_qp

solve_qp(Q: Array, q: Array, A: Array, b: Array, G: Array, h: Array, solver_tol: float = 1e-05, max_iter: int = 30, linear_solver: LinearSolver = LinearSolver.CHOLESKY, sigma: float = 0.125, verbose: bool = False) -> tuple[jax.Array, jax.Array, jax.Array, jax.Array, int, int]

Solve a QP using a primal-dual interior point method.

Parameters:

Name Type Description Default
Q Array

(n, n) positive definite matrix

required
q Array

(n,) vector

required
A Array

(m, n) equality constraint matrix

required
b Array

(m,) equality constraint vector

required
G Array

(p, n) inequality constraint matrix

required
h Array

(p,) inequality constraint vector

required
linear_solver LinearSolver

LinearSolver.CHOLESKY or LinearSolver.QR

CHOLESKY

Returns:

Name Type Description
x Array

(n,) optimal solution

s Array

(p,) inequality slack variables

z Array

(p,) inequality dual variables

y Array

(m,) equality dual variables

converged int

int convergence flag

pdip_iter int

int number of iterations

qpax.implicit.diff_qp.solve_qp_primal

solve_qp_primal(Q, q, A, b, G, h, solver_tol=1e-05, target_kappa=0.001, max_iter=30)

qpax.implicit.pdip_relaxed.relax_qp

relax_qp(Q, q, A, b, G, h, x, s, z, y, solver_tol=1e-05, target_kappa=0.001, max_iter=30, sigma: float = 0.125, verbose: bool = False)

Relaxed solve that also returns the factorization from the last Newton step.