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)

pwlobj(x)

# S4 method for OptimizationProblem
pwlobj(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)

number_of_branches(x)

# S4 method for OptimizationProblem
number_of_branches(x)

get_data(x)

# S4 method for OptimizationProblem
get_data(x)

Arguments

x

OptimizationProblem object.

Value

list, Matrix::dgCMatrix, numeric

vector, numeric vector, or scalar integer depending on the method used.

Details

The functions return the following data:

nrow

integer number of rows (constraints).

ncol

integer number of columns (decision variables).

ncell

integer number of cells.

modelsense

character describing if the problem is to be maximized ("max") or minimized ("min").

vtype

character describing the type of each decision variable: binary ("B"), semi-continuous ("S"), or continuous ("C")

obj

numeric vector defining the linear components of the objective function.

pwlobj

list object defining the piece-wise linear components of the objective function.

A

Matrix::dgCMatrix matrix object defining the problem matrix.

rhs

numeric vector with right-hand-side linear constraints

sense

character vector with the senses of the linear constraints ("<=", ">=", "=").

lb

numeric lower bound for each decision variable. Missing data values (NA) indicate no lower bound for a given variable.

ub

numeric upper bounds for each decision variable. Missing data values (NA) indicate no upper bound for a given variable.

number_of_projects

integer number of projects in the problem.

number_of_actions

integer number of actions in the problem.

number_of_features

integer number of features in the problem.

number_of_branches

integer number of phylogenetic branches in the problem.