with_ROI

0th

Percentile

Configures a solver based on 'ROI'

This function makes all solvers in the R package 'ROI' available to solve 'ompr' models.

Usage
with_ROI(solver, ...)
Arguments
solver

the 'ROI' solver name (character vector of length 1)

...

optional parameters passed to ROI_solve

Note: it does only support column duals. It currently does not export row duals.

Value

a function: Model -> Solution that can be used together with solve_model.

References

Kurt Hornik, David Meyer, Florian Schwendinger and Stefan Theussl (2016). ROI: R Optimization Infrastructure. <https://CRAN.R-project.org/package=ROI>

Aliases
  • with_ROI
Examples
# NOT RUN {
library(magrittr)
library(ompr)
library(ROI)
library(ROI.plugin.glpk)
add_variable(MIPModel(), x, type = "continuous") %>%
 set_objective(x, sense = "max") %>%
 add_constraint(x <= 5) %>%
 solve_model(with_ROI(solver = "glpk", verbose = TRUE))

# }
Documentation reproduced from package ompr.roi, version 0.8.0, License: GPL-3

Community examples

Looks like there are no examples yet.