These functions are used to access data from an
OptimizationProblem
object.
nrow(x) # S4 method for OptimizationProblem nrow(x) ncol(x) # S4 method for OptimizationProblem ncol(x) ncell(x) # S4 method for OptimizationProblem ncell(x) modelsense(x) # S4 method for OptimizationProblem modelsense(x) vtype(x) # S4 method for OptimizationProblem vtype(x) obj(x) # S4 method for OptimizationProblem obj(x) A(x) # S4 method for OptimizationProblem A(x) rhs(x) # S4 method for OptimizationProblem rhs(x) sense(x) # S4 method for OptimizationProblem sense(x) lb(x) # S4 method for OptimizationProblem lb(x) ub(x) # S4 method for OptimizationProblem ub(x) col_ids(x) # S4 method for OptimizationProblem col_ids(x) row_ids(x) # S4 method for OptimizationProblem row_ids(x) compressed_formulation(x) # S4 method for OptimizationProblem compressed_formulation(x)
x |
|
---|
dgCMatrix
, numeric
vector,
numeric
vector, or scalar integer
depending on the method
used.
The functions return the following data:
integer
number of rows (constraints).
integer
number of columns (decision variables).
integer
number of cells.
character
describing if the problem is to be
maximized ("max"
) or minimized ("min"
).
character
describing the type of each decision variable:
binary ("B"
), semi-continuous ("S"
), or continuous
("C"
)
numeric
vector specifying the objective function.
dgCMatrix
matrix object defining the
problem matrix.
numeric
vector with right-hand-side linear constraints
character
vector with the senses of the linear
constraints ("<="
, ">="
, "="
).
numeric
lower bound for each decision variable. Missing data
values (NA
) indicate no lower bound for a given variable.
numeric
upper bounds for each decision variable. Missing
data values (NA
) indicate no upper bound for a given variable.
integer
number of planning units in
the problem.
integer
number of features
the problem.