optimizationProblem-class {prioriactions} | R Documentation |
Optimization problem class
Description
This class encodes the corresponding optimization model. It is created
using problem()
function.
Value
No return value.
Fields
- $data
list
object containing data of the mathematical model.- $ConservationClass
object of class
data-class()
that contains the data input.
Methods
- getData(
character
name) -
vector()
. Object stored in thedata
field with the correspondingname
. The data correspond to the different parts of the mathematical model. The argumentname
can be made to the following: "obj", "rhs", "sense", "vtype", "A", "bounds" or "modelsense". - getDataList()
-
list()
ofvector()
. Object stored in thedata
. It contains all information relative to the mathematical model, such as "obj", "rhs", etc. - print()
-
Print basic information of the optimization model.
- show()
-
Call print method.
Examples
# 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)
## Use class methods
head(problem_model$getData("obj"))
problem_model$print()
[Package prioriactions version 0.5.0 Index]