| Title: | 'quadprog' Plug-in for the 'R' Optimization Infrastructure |
|---|---|
| Description: | Enhances the R Optimization Infrastructure ('ROI') package by registering the 'quadprog' solver. It allows for solving quadratic programming (QP) sproblems. |
| Authors: | Stefan Theussl [aut, cre] |
| Maintainer: | Stefan Theussl <[email protected]> |
| License: | GPL-3 |
| Version: | 1.0-0 |
| Built: | 2026-05-21 06:09:03 UTC |
| Source: | https://github.com/r-forge/roi |
require("ROI") A <- cbind(c(-4, -3, 0), c( 2, 1, 0), c( 0, -2, 1)) x <- OP(Q_objective(diag(3), L = c(0, -5, 0)), L_constraint(L = t(A), dir = rep(">=", 3), rhs = c(-8, 2, 0))) opt <- ROI_solve(x, solver="quadprog") opt ## Optimal solution found. ## The objective value is: -2.380952e+00 solution(opt) ## [1] 0.4761905 1.0476190 2.0952381require("ROI") A <- cbind(c(-4, -3, 0), c( 2, 1, 0), c( 0, -2, 1)) x <- OP(Q_objective(diag(3), L = c(0, -5, 0)), L_constraint(L = t(A), dir = rep(">=", 3), rhs = c(-8, 2, 0))) opt <- ROI_solve(x, solver="quadprog") opt ## Optimal solution found. ## The objective value is: -2.380952e+00 solution(opt) ## [1] 0.4761905 1.0476190 2.0952381