| OptimizationProblem-methods {oppr} | R Documentation |
Optimization problem methods
Description
These functions are used to access data from an OptimizationProblem object.
Usage
nrow(x)
## S4 method for signature 'OptimizationProblem'
nrow(x)
ncol(x)
## S4 method for signature 'OptimizationProblem'
ncol(x)
ncell(x)
## S4 method for signature 'OptimizationProblem'
ncell(x)
modelsense(x)
## S4 method for signature 'OptimizationProblem'
modelsense(x)
vtype(x)
## S4 method for signature 'OptimizationProblem'
vtype(x)
obj(x)
## S4 method for signature 'OptimizationProblem'
obj(x)
pwlobj(x)
## S4 method for signature 'OptimizationProblem'
pwlobj(x)
A(x)
## S4 method for signature 'OptimizationProblem'
A(x)
rhs(x)
## S4 method for signature 'OptimizationProblem'
rhs(x)
sense(x)
## S4 method for signature 'OptimizationProblem'
sense(x)
lb(x)
## S4 method for signature 'OptimizationProblem'
lb(x)
ub(x)
## S4 method for signature 'OptimizationProblem'
ub(x)
col_ids(x)
## S4 method for signature 'OptimizationProblem'
col_ids(x)
row_ids(x)
## S4 method for signature 'OptimizationProblem'
row_ids(x)
number_of_branches(x)
## S4 method for signature 'OptimizationProblem'
number_of_branches(x)
get_data(x)
## S4 method for signature 'OptimizationProblem'
get_data(x)
Arguments
x |
OptimizationProblem object. |
Details
The functions return the following data:
- nrow
integernumber of rows (constraints).- ncol
integernumber of columns (decision variables).- ncell
integernumber of cells.- modelsense
characterdescribing if the problem is to be maximized ("max") or minimized ("min").- vtype
characterdescribing the type of each decision variable: binary ("B"), semi-continuous ("S"), or continuous ("C")- obj
numericvector defining the linear components of the objective function.- pwlobj
listobject defining the piece-wise linear components of the objective function.- A
Matrix::dgCMatrix matrix object defining the problem matrix.
- rhs
numericvector with right-hand-side linear constraints- sense
charactervector with the senses of the linear constraints ("<=",">=","=").- lb
numericlower bound for each decision variable. Missing data values (NA) indicate no lower bound for a given variable.- ub
numericupper bounds for each decision variable. Missing data values (NA) indicate no upper bound for a given variable.- number_of_projects
integernumber of projects in the problem.- number_of_actions
integernumber of actions in the problem.- number_of_features
integernumber of features in the problem.- number_of_branches
integernumber of phylogenetic branches in the problem.
Value
list, Matrix::dgCMatrix, numeric
vector, numeric vector, or scalar integer depending on the
method used.