This class is used to represent an optimization problem.
It stores the information needed to generate a solution using
an exact algorithm solver.
Most users should use compile() to generate new optimization problem
objects, and the functions distributed with the package to interact
with them (e.g., base::as.list()).
Only experts should use the fields and methods for this class directly.
Methods
OptimizationProblem$new()
Arguments
ptr
Rcpp::Xptr external pointer.
data
list with supplemental data.
Returns
A new OptimizationProblem object.
OptimizationProblem$get_data()
Obtain the supplemental data.
Usage
OptimizationProblem$get_data()
OptimizationProblem$print()
Print concise information about the object.
Usage
OptimizationProblem$print()
OptimizationProblem$show()
Print concise information about the object.
Usage
OptimizationProblem$show()
OptimizationProblem$ncol()
Obtain the number of columns in the problem formulation.
Usage
OptimizationProblem$ncol()
OptimizationProblem$nrow()
Obtain the number of rows in the problem formulation.
Usage
OptimizationProblem$nrow()
OptimizationProblem$ncell()
Obtain the number of cells in the problem formulation.
Usage
OptimizationProblem$ncell()
OptimizationProblem$modelsense()
Obtain the model sense.
Usage
OptimizationProblem$modelsense()
Returns
A character value.
OptimizationProblem$vtype()
Obtain the decision variable types.
Usage
OptimizationProblem$vtype()
Returns
A character vector.
OptimizationProblem$obj()
Obtain the objective function.
Usage
OptimizationProblem$obj()
Returns
A numeric vector.
OptimizationProblem$pwlobj()
Obtain the piecewise linear components of the objective function.
Usage
OptimizationProblem$pwlobj()
OptimizationProblem$A()
Obtain the constraint matrix.
OptimizationProblem$rhs()
Obtain the right-hand-side constraint values.
Usage
OptimizationProblem$rhs()
Returns
A numeric vector.
OptimizationProblem$sense()
Obtain the constraint senses.
Usage
OptimizationProblem$sense()
Returns
A character vector.
OptimizationProblem$lb()
Obtain the lower bounds for the decision variables.
Returns
A numeric vector.
OptimizationProblem$ub()
Obtain the upper bounds for the decision variables.
Returns
A numeric vector.
OptimizationProblem$number_of_features()
Obtain the number of features.
Usage
OptimizationProblem$number_of_features()
OptimizationProblem$number_of_branches()
Obtain the number of phylogenetic branches.
Usage
OptimizationProblem$number_of_branches()
OptimizationProblem$number_of_allocations()
Obtain the number of allocation variables. This number represents
the total number of decision variables used to identify if
each project is allocated to each variable.
Usage
OptimizationProblem$number_of_allocations()
OptimizationProblem$number_of_actions()
Obtain the number of actions
Usage
OptimizationProblem$number_of_actions()
OptimizationProblem$number_of_projects()
Obtain the number of projects.
Usage
OptimizationProblem$number_of_projects()
OptimizationProblem$col_ids()
Obtain the identifiers for the columns.
Usage
OptimizationProblem$col_ids()
Returns
A character value.
OptimizationProblem$row_ids()
Obtain the identifiers for the rows.
Usage
OptimizationProblem$row_ids()
Returns
A character value.
OptimizationProblem$copy()
Copy the object.
Usage
OptimizationProblem$copy()
Returns
An OptimizationProblem object.
OptimizationProblem$convert_pwlobj()
Convert the piece-wise linear components of the objective function
into linear objective components and constraints.
Usage
OptimizationProblem$convert_pwlobj()
Returns
An invisible TRUE.
OptimizationProblem$clone()
The objects of this class are cloneable with this method.
Usage
OptimizationProblem$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.