evalBudget {prioriactions} | R Documentation |
Evaluate multiple budget values
Description
Return one solution per instance for different values of budgets. This
function assumes that the maximizeBenefits option is being used (note that
the minimizeCosts option does not require setting a maximum budget). Like
prioriactions()
function, it inherits all arguments from inputData()
,
problem()
and solve()
.
Usage
evalBudget(values = c(), ...)
Arguments
values |
|
... |
arguments inherited from |
Details
evalBudget()
creates and solves multiple instances, of the corresponding
multi-actions planning problem, for different values of maximum budgets. Alternatively, this
could be obtained by executing function prioriactions()
or by steps the inputData()
,
problem()
and solve()
functions; using, in each run, different budgets values.
However, the evalBudget()
function has two advantages with
respect to this manual approach: : 1)
it is more efficient to create the models (this is because the model is created
just once and, at each iteration, only the budget values are updated); and 2) the
output is a portfolio object, which allows
obtaining information about the group of solutions (including all get functions).
Value
An object of class portfolio.
Examples
# set seed for reproducibility
set.seed(14)
## Create model and solve
port <- evalBudget(pu = sim_pu_data, features = sim_features_data,
dist_features = sim_dist_features_data,
threats = sim_threats_data,
dist_threats = sim_dist_threats_data,
sensitivity = sim_sensitivity_data,
boundary = sim_boundary_data,
values = c(1, 10, 50, 100),
time_limit = 50,
output_file = FALSE,
cores = 2)
getSolutionBenefit(port)