[\begin{split}\begin{array}{ll} \mbox{minimize} & \frac{1}{2} xT P x + qT x \ \mbox{subject to} & l \leq A x \leq u \end{array}\end{split}]
where (x) is the optimization variable and (P \in \mathbf{S}^{n}_{+}) a positive semidefinite matrix.
Further information about the solver is available at osqp.readthedocs.io.
Example
Consider the following QP
use ;
// Define problem data
let P = &;
let q = &;
let A = &;
let l = &;
let u = &;
// Change the default alpha and disable verbose output
let settings = default
.alpha
.verbose;
# let settings = settings.adaptive_rho;
// Create an OSQP problem
let mut prob = new;
// Solve problem
let result = prob.solve;
// Print the solution
println!;
#
# // Check the solution
# let expected = &;
# let x = result.solution.unwrap.x;
# assert_eq!;
# assert!;