| OptimizationProblem-class | R Documentation |
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.
ptrA Rcpp::Xptr external pointer.
Create a new optimization problem object.
OptimizationProblem$new()OptimizationProblem$new(ptr)
ptrRcpp::Xptr external pointer.
A new OptimizationProblem object.
OptimizationProblem$print()Print concise information about the object.
OptimizationProblem$print()
Invisible TRUE.
OptimizationProblem$show()Print concise information about the object.
OptimizationProblem$show()
Invisible TRUE.
OptimizationProblem$ncol()Obtain the number of columns in the problem formulation.
OptimizationProblem$ncol()
A numeric value.
OptimizationProblem$nrow()Obtain the number of rows in the problem formulation.
OptimizationProblem$nrow()
A numeric value.
OptimizationProblem$ncell()Obtain the number of cells in the problem formulation.
OptimizationProblem$ncell()
A numeric value.
OptimizationProblem$modelsense()Obtain the model sense.
OptimizationProblem$modelsense()
A character value.
OptimizationProblem$vtype()Obtain the decision variable types.
OptimizationProblem$vtype()
A character vector.
OptimizationProblem$obj()Obtain the objective function.
OptimizationProblem$obj()
A numeric vector.
OptimizationProblem$A()Obtain the constraint matrix.
OptimizationProblem$A()
A Matrix::sparseMatrix() object.
OptimizationProblem$rhs()Obtain the right-hand-side constraint values.
OptimizationProblem$rhs()
A numeric vector.
OptimizationProblem$sense()Obtain the constraint senses.
OptimizationProblem$sense()
A character vector.
OptimizationProblem$lb()Obtain the lower bounds for the decision variables.
OptimizationProblem$lb()
A numeric vector.
OptimizationProblem$ub()Obtain the upper bounds for the decision variables.
OptimizationProblem$ub()
A numeric vector.
OptimizationProblem$number_of_features()Obtain the number of features.
OptimizationProblem$number_of_features()
A numeric value.
OptimizationProblem$number_of_planning_units()Obtain the number of planning units.
OptimizationProblem$number_of_planning_units()
A numeric value.
OptimizationProblem$number_of_zones()Obtain the number of zones.
OptimizationProblem$number_of_zones()
A numeric value.
OptimizationProblem$col_ids()Obtain the identifiers for the columns.
OptimizationProblem$col_ids()
A character value.
OptimizationProblem$row_ids()Obtain the identifiers for the rows.
OptimizationProblem$row_ids()
A character value.
OptimizationProblem$obj_id()Obtain the identifiers for the rows.
OptimizationProblem$obj_id()
A character value.
OptimizationProblem$compressed_formulation()Is the problem formulation compressed?
OptimizationProblem$compressed_formulation()
A logical value.
OptimizationProblem$shuffle_columns()Shuffle the order of the columns in the optimization problem.
OptimizationProblem$shuffle_columns(order)
orderinteger vector with new order.
An integer vector with indices to un-shuffle the problem.
OptimizationProblem$copy()Create a copy of the optimization problem.
OptimizationProblem$copy()
A new OptimizationProblem object .
OptimizationProblem$set_obj()Set objective coefficients for the decision variables in the optimization problem.
OptimizationProblem$set_obj(obj)
objnumeric vector.
An invisible TRUE.
OptimizationProblem$set_modelsense()Set the model sense for the optimization problem.
OptimizationProblem$set_modelsense(modelsense)
modelsensecharacter value indicating the model sense.
(i.e., either "min" or "max").
An invisible TRUE.
OptimizationProblem$set_lb()Set lower bounds for the decision variables in the optimization problem.
OptimizationProblem$set_lb(lb)
lbnumeric vector.
An invisible TRUE.
OptimizationProblem$set_ub()Set upper bounds for the decision variables in the optimization problem.
OptimizationProblem$set_ub(ub)
ubnumeric vector.
An invisible TRUE.
OptimizationProblem$remove_last_linear_constraint()Remove last linear constraint added to a problem.
OptimizationProblem$remove_last_linear_constraint()
An invisible TRUE.
OptimizationProblem$append_linear_constraints()Append linear constraints to the optimization problem.
OptimizationProblem$append_linear_constraints(rhs, sense, A, row_ids)
rhsnumeric vector with right-hand-side values.
sensecharacter vector with constraint sense values
(i.e., "<=", ">=", or "=").
AMatrix::sparseMatrix() with constraint coefficients.
row_idscharacter vector with identifier for constraints.
An invisible TRUE.
OptimizationProblem$clone()The objects of this class are cloneable with this method.
OptimizationProblem$clone(deep = FALSE)
deepWhether to make a deep clone.
Other classes:
ConservationModifier-class,
ConservationProblem-class,
Constraint-class,
Decision-class,
MultiConservationProblem-class,
MultiObjApproach-class,
Objective-class,
Penalty-class,
Portfolio-class,
Solver-class,
Target-class,
TargetMethod-class,
Weight-class
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.