Learn R Programming

raptr (version 0.0.1)

solve: Solve RAP object

Description

This function uses Gurobi to find prioritisations using the input parameter and data stored in a RapUsolved object, and returns a RapSolved object with outputs in it.

Usage

solve(a, b, ...)
"solve"(a, b, ..., verbose = FALSE)
"solve"(a, b, verbose = FALSE)
"solve"(a, b, verbose = FALSE)
"solve"(a, b, verbose = FALSE)
"solve"(a, b, verbose = FALSE)

Arguments

a
RapUnsolved or RapSolved object.
b
missing to generate solutions using Gurobi. Prioritisations can be specified using logical, numeric, or matrix objects. This may be useful for evaluating the performance of solutions obtained using other software.
...
not used.
verbose
logical should messages be printed during creation of the initial model matrix?.

Value

RapSolved object

See Also

RapUnsolved, RapSolved.

Examples

Run this code
# load RapUnsolved object
data(sim_ru)
## Not run: 
# # solve it using Gurobi
# sim_rs <- solve(sim_ru)
# ## End(Not run)
# evaluate manually specified solution using planning unit indices
sim_rs2 <- solve(sim_ru, 1:10)
# evaluate manually specifed solution using binary selections
sim_rs3 <- solve(sim_ru, c(rep(TRUE,10), rep(FALSE, 90)))
#  evaluate multiple manually specified solutions
sim_rs4 <- solve(sim_ru, matrix(sample(c(0,1), size=500, replace=TRUE), ncol=100, nrow=5))

Run the code above in your browser using DataLab