Skip to contents

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.

Public fields

ptr

A Rcpp::Xptr external pointer.

data

A list with supplemental data. Create a new optimization problem object.

Methods


OptimizationProblem$new()

Usage

OptimizationProblem$new(ptr, data = list())

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()

Returns

A list object.


OptimizationProblem$print()

Print concise information about the object.

Usage

OptimizationProblem$print()

Returns

Invisible TRUE.


OptimizationProblem$show()

Print concise information about the object.

Usage

OptimizationProblem$show()

Returns

Invisible TRUE.


OptimizationProblem$ncol()

Obtain the number of columns in the problem formulation.

Usage

OptimizationProblem$ncol()

Returns

A numeric value.


OptimizationProblem$nrow()

Obtain the number of rows in the problem formulation.

Usage

OptimizationProblem$nrow()

Returns

A numeric value.


OptimizationProblem$ncell()

Obtain the number of cells in the problem formulation.

Usage

OptimizationProblem$ncell()

Returns

A numeric value.


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()

Returns

A list object.


OptimizationProblem$A()

Obtain the constraint matrix.

Usage

OptimizationProblem$A()

Returns

A Matrix::sparseMatrix() object.


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.

Usage

OptimizationProblem$lb()

Returns

A numeric vector.


OptimizationProblem$ub()

Obtain the upper bounds for the decision variables.

Usage

OptimizationProblem$ub()

Returns

A numeric vector.


OptimizationProblem$number_of_features()

Obtain the number of features.

Usage

OptimizationProblem$number_of_features()

Returns

A numeric value.


OptimizationProblem$number_of_branches()

Obtain the number of phylogenetic branches.

Usage

OptimizationProblem$number_of_branches()

Returns

A numeric value.


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()

Returns

A numeric value.


OptimizationProblem$number_of_actions()

Obtain the number of actions

Usage

OptimizationProblem$number_of_actions()

Returns

A numeric value.


OptimizationProblem$number_of_projects()

Obtain the number of projects.

Usage

OptimizationProblem$number_of_projects()

Returns

A numeric value.


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.