Learn R Programming

FDOTT (version 0.1.0)

ot_test_lp_solver: Control FDOTT linear programming solver

Description

Create an object that controls the linear programming (LP) solver to use.

Usage

ot_test_lp_solver(name = NULL, ...)

Value

A ot_test_lp_solver_control object containing:

namethe name of the LP solver
controllist of control arguments passed to the LP solver

Arguments

name

name of the LP solver.

...

optional control arguments passed to the corresponding LP solver.

Details

name can be any LP solver that is compatible with the ROI package infrastructure. In particular, the corresponding plugin package ROI.plugin.name must be installed. The default value corresponding to name = NULL can be set via options(FDOTT.lp_solver = name) (the default is "glpk").

See Also

ROI::ROI_available_solvers

Examples

Run this code
if (FALSE) {
# glpk is already the default
options(FDOTT.lp_solver = "glpk")}
# plugin needs to be installed, else we get error
if (requireNamespace("ROI.plugin.glpk")) {
    # add control parameter (specific to glpk)
    sol <- ot_test_lp_solver("glpk", verbose = TRUE)
    print(sol)
} else {
    cat("'ROI.plugin.glpk' needs to be installed!\n")
}

Run the code above in your browser using DataLab