| Title: | 'COIN-OR' 'Clp' Plugin for the 'R' Optimization Infrastructure |
|---|---|
| Description: | Registers the 'COIN-OR' 'Clp' linear programming solver with 'ROI', the 'R' Optimization Infrastructure, through the 'coinclp' package. Linear programs with continuous variables are then solved by 'ROI' with the 'coinclp' solver, keeping sparse constraint matrices sparse all the way to the solver, and returning dual values, reduced costs and row activities alongside the primal solution. |
| Authors: | Sam Lovick [aut, cre] |
| Maintainer: | Sam Lovick <[email protected]> |
| License: | EPL |
| Version: | 0.1.0.9000 |
| Built: | 2026-09-28 22:15:23 UTC |
| Source: | https://github.com/samlovick/roi.plugin.coinclp |
solution(x, "dual") returns the dual value of each constraint, the
shadow price of its right hand side. solution(x, "aux") returns a
list with the row activities as primal and the reduced costs of the
variables as dual.
## S3 method for class 'coinclp_solution' ROI_plugin_solution_dual(x) ## S3 method for class 'coinclp_solution' ROI_plugin_solution_aux(x)## S3 method for class 'coinclp_solution' ROI_plugin_solution_dual(x) ## S3 method for class 'coinclp_solution' ROI_plugin_solution_aux(x)
x |
A solution returned by |
Signs follow Clp's own convention for the direction that was solved, so a maximisation and the equivalent minimisation of the negated objective report duals of opposite sign.
A numeric vector of dual values, or a list of auxiliary vectors.
library(ROI) op <- OP(objective = c(143, 60), constraints = L_constraint(rbind(c(120, 210), c(110, 30), c(1, 1)), rep("<=", 3), c(15000, 4000, 75)), maximum = TRUE) result <- ROI_solve(op, solver = "coinclp") solution(result, "dual") solution(result, "aux")library(ROI) op <- OP(objective = c(143, 60), constraints = L_constraint(rbind(c(120, 210), c(110, 30), c(1, 1)), rep("<=", 3), c(15000, 4000, 75)), maximum = TRUE) result <- ROI_solve(op, solver = "coinclp") solution(result, "dual") solution(result, "aux")
The method ROI dispatches to when a linear program is solved with
solver = "coinclp". It is not called directly; use
ROI_solve.
solve_OP(x, control = list())solve_OP(x, control = list())
x |
An object of class |
control |
A named list of solver controls, see
|
An object of class "coinclp_solution", which
solution unpacks.
library(ROI) op <- OP(objective = c(143, 60), constraints = L_constraint(rbind(c(120, 210), c(110, 30), c(1, 1)), rep("<=", 3), c(15000, 4000, 75)), maximum = TRUE) result <- ROI_solve(op, solver = "coinclp") solution(result) solution(result, "dual")library(ROI) op <- OP(objective = c(143, 60), constraints = L_constraint(rbind(c(120, 210), c(110, 30), c(1, 1)), rep("<=", 3), c(15000, 4000, 75)), maximum = TRUE) result <- ROI_solve(op, solver = "coinclp") solution(result) solution(result, "dual")