solve_piqp function

PIQP Solver

PIQP Solver

Solves [REMOVE_ME]argminx0.5xPx+cxargminx0.5xPx+cx[REMOVEME2] arg\min_x 0.5 x'P x + c'xargmin_x 0.5 x'P x + c'x [REMOVE_ME_2]

s.t. [REMOVE_ME]Ax=bAx=b[REMOVEME2] A x = bA x = b [REMOVE_ME_2]

[REMOVE_ME]GxhGx<=h[REMOVEME2] G x \leq hG x <= h [REMOVE_ME_2]

[REMOVE_ME]xlbxxubxlb<=x<=xub[REMOVEME2] x_{lb} \leq x \leq x_{ub}x_lb <= x <= x_ub [REMOVE_ME_2]

for real matrices P (nxn, positive semidefinite), A (pxn) with m number of equality constraints, and G (mxn) with m number of inequality constraints

solve_piqp( P = NULL, c = NULL, A = NULL, b = NULL, G = NULL, h = NULL, x_lb = NULL, x_ub = NULL, settings = list(), backend = c("auto", "sparse", "dense") )

Arguments

  • P: dense or sparse matrix of class dgCMatrix or coercible into such, must be positive semidefinite

  • c: numeric vector

  • A: dense or sparse matrix of class dgCMatrix or coercible into such

  • b: numeric vector

  • G: dense or sparse matrix of class dgCMatrix or coercible into such

  • h: numeric vector

  • x_lb: a numeric vector of lower bounds, default NULL

    indicating -Inf for all variables, otherwise should be number of variables long

  • x_ub: a numeric vector of upper bounds, default NULL

    indicating Inf for all variables, otherwise should be number of variables long

  • settings: list with optimization parameters, empty by default; see piqp_settings() for a comprehensive list of parameters that may be used

  • backend: which backend to use, if auto and P, A or G are sparse then sparse backend is used ("auto", "sparse" or "dense") ("auto")

Returns

A list with elements solution elements

Description

Solves

argminx0.5xPx+cxargminx0.5xPx+cx arg\min_x 0.5 x'P x + c'xargmin_x 0.5 x'P x + c'x

s.t.

Ax=bAx=b A x = bA x = b GxhGx<=h G x \leq hG x <= h xlbxxubxlb<=x<=xub x_{lb} \leq x \leq x_{ub}x_lb <= x <= x_ub

for real matrices P (nxn, positive semidefinite), A (pxn) with m number of equality constraints, and G (mxn) with m number of inequality constraints

Examples

## example, adapted from PIQP documentation library(piqp) library(Matrix) P <- Matrix(c(6., 0., 0., 4.), 2, 2, sparse = TRUE) c <- c(-1., -4.) A <- Matrix(c(1., -2.), 1, 2, sparse = TRUE) b <- c(1.) G <- Matrix(c(1., 2., -1., 0.), 2, 2, sparse = TRUE) h <- c(0.2, -1.) x_lb <- c(-1., -Inf) x_ub <- c(1., Inf) settings <- list(verbose = TRUE) # Solve with PIQP res <- solve_piqp(P, c, A, b, G, h, x_lb, x_ub, settings) res$x

References

Schwan, R., Jiang, Y., Kuhn, D., Jones, C.N. (2023). ``PIQP: A Proximal Interior-Point Quadratic Programming Solver.'' doi:10.48550/arXiv.2304.00290

See Also

piqp(), piqp_settings() and the underlying PIQP documentation: https://predict-epfl.github.io/piqp/

  • Maintainer: Balasubramanian Narasimhan
  • License: BSD_2_clause + file LICENSE
  • Last published: 2023-08-14