Learn R Programming

rosqp

Provides R-bindings to the OSQP-solver

OSQP is a sparse Quadratic Programming Solver suitable for large problems. It solves problems of the form: $$ argmin(x) 0.5 x'P x + q'x $$

$$s.t.: l_i <= (Ax)_i <= u_i$$

with P Positive semidefinite

OSQP License

The source code of OSQP is provided in the package and it is licensed under Apache 2.0. Copyright (c) 2017 Bartolomeo Stellato, Goran Banjac, Paul Goulart, Stephen Boyd

This product includes software developed at Stanford University and at the University of Oxford.

Please see the file LICENSE and inst/COPYRIGHT for more details.

Example

library(rosqp)
## example, adapted from ?quadprog::solve.QP
Dmat       <- diag(3)
dvec       <- c(0,-5,0)
Amat       <- matrix(c(-4, 2, 0, -3, 1, -2, 0, 0, 1),3,3)
bvec       <- c(-8,2,0)
res = solve_osqp(Dmat, dvec, Amat, bvec)
print(res$x)

Copy Link

Version

Install

install.packages('rosqp')

Monthly Downloads

10

Version

0.1.0

License

Apache License 2.0

Maintainer

Last Published

February 7th, 2018

Functions in rosqp (0.1.0)

solve_osqp

Sparse Quadratic Programming Solver
osqp

OSQP Solver object
osqpSettings

Settings for OSQP