This class encodes the corresponding optimization model. It is created
using problem() function.
No return value.
list object containing data
of the mathematical model.
object of class
data-class() that contains the data input.
character name)vector(). Object stored in the data field with the
corresponding name. The data correspond to the different parts of
the mathematical model. The argument name can be made to the
following: "obj", "rhs", "sense", "vtype", "A", "bounds" or "modelsense".
list() of
vector(). Object stored in the data. It contains all information relative
to the mathematical model, such as "obj", "rhs", etc.
Print basic information of the optimization model.
Call print method.
# set seed for reproducibility
set.seed(14)
## Load data
data(sim_pu_data, sim_features_data, sim_dist_features_data,
sim_threats_data, sim_dist_threats_data, sim_sensitivity_data,
sim_boundary_data)
## Create data instance
problem_data <- inputData(
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
)
## Create optimization model
problem_model <- problem(x = problem_data, blm = 1)
#> Warning: Some blm_actions argument were set to 0, so the boundary data has no effect for these cases
## Use class methods
head(problem_model$getData("obj"))
#> [1] 702.305 645.714 602.096 572.511 557.573 557.573
problem_model$print()
#> Optimization Problem
#> model sense: minimization
#> dimensions: 29984, 10296, 883.856 kB (nrow, ncol, size)
#> variables: 10296