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.
ptr
A Rcpp::Xptr
external pointer.
Create a new optimization problem object.
new()
OptimizationProblem$new(ptr)
ptr
Rcpp::Xptr
external pointer.
A new OptimizationProblem
object.
Invisible TRUE
.
show()
Print concise information about the object.
OptimizationProblem$show()
Invisible TRUE
.
ncol()
Obtain the number of columns in the problem formulation.
OptimizationProblem$ncol()
A numeric
value.
nrow()
Obtain the number of rows in the problem formulation.
OptimizationProblem$nrow()
A numeric
value.
ncell()
Obtain the number of cells in the problem formulation.
OptimizationProblem$ncell()
A numeric
value.
modelsense()
Obtain the model sense.
OptimizationProblem$modelsense()
A character
value.
vtype()
Obtain the decision variable types.
OptimizationProblem$vtype()
A character
vector.
obj()
Obtain the objective function.
OptimizationProblem$obj()
A numeric
vector.
A()
Obtain the constraint matrix.
OptimizationProblem$A()
A Matrix::sparseMatrix()
object.
rhs()
Obtain the right-hand-side constraint values.
OptimizationProblem$rhs()
A numeric
vector.
sense()
Obtain the constraint senses.
OptimizationProblem$sense()
A character
vector.
lb()
Obtain the lower bounds for the decision variables.
OptimizationProblem$lb()
A numeric
vector.
ub()
Obtain the upper bounds for the decision variables.
OptimizationProblem$ub()
A numeric
vector.
number_of_features()
Obtain the number of features.
OptimizationProblem$number_of_features()
A numeric
value.
number_of_planning_units()
Obtain the number of planning units.
OptimizationProblem$number_of_planning_units()
A numeric
value.
number_of_zones()
Obtain the number of zones.
OptimizationProblem$number_of_zones()
A numeric
value.
col_ids()
Obtain the identifiers for the columns.
OptimizationProblem$col_ids()
A character
value.
row_ids()
Obtain the identifiers for the rows.
OptimizationProblem$row_ids()
A character
value.
compressed_formulation()
Is the problem formulation compressed?
OptimizationProblem$compressed_formulation()
A logical
value.
shuffle_columns()
Shuffle the order of the columns in the optimization problem.
OptimizationProblem$shuffle_columns(order)
order
integer
vector with new order.
An integer
vector with indices to un-shuffle the problem.
copy()
Create a copy of the optimization problem.
OptimizationProblem$copy()
A new OptimizationProblem
object .
clone()
The objects of this class are cloneable with this method.
OptimizationProblem$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other classes:
ConservationModifier-class
,
ConservationProblem-class
,
Constraint-class
,
Decision-class
,
Objective-class
,
Penalty-class
,
Portfolio-class
,
Solver-class
,
Target-class