This class is used to represent solvers for optimization. Only experts should use the fields and methods for this class directly.
Super class
prioritizr::ConservationModifier
-> Solver
Methods
Inherited methods
prioritizr::ConservationModifier$get_data()
prioritizr::ConservationModifier$get_internal()
prioritizr::ConservationModifier$print()
prioritizr::ConservationModifier$repr()
prioritizr::ConservationModifier$set_data()
prioritizr::ConservationModifier$set_internal()
prioritizr::ConservationModifier$show()
Method calculate()
Perform computations that need to be completed before applying the object.
Arguments
...
Additional arguments.
x
optimization_problem()
object.
Method set_variable_ub()
Set the upper bound for a decision variable.
Arguments
index
integer
value indicating the index of the decision variable.value
numeric
new bound value.
Details
Note that this method should only be run after $calculate()
.
It can be used to overwrite values after ingesting an
optimization_problem()
object.
It is designed to be used in portfolios and importance functions.
Method set_variable_lb()
Set the lower bound for a decision variable.
Arguments
index
integer
value indicating the index of the decision variable.value
numeric
new bound value.
Details
Note that this method should only be run after $calculate()
.
It can be used to overwrite values after ingesting an
optimization_problem()
object.
It is designed to be used in portfolios and importance functions.
Method set_constraint_rhs()
Set the right-hand-side coefficient bound for a constraint.
Arguments
index
integer
value indicating the index of the decision variable.value
numeric
new value.
Details
Note that this method should only be run after $calculate()
.
It can be used to overwrite values after ingesting an
optimization_problem()
object.
It is designed to be used in portfolios and importance functions.
Method set_start_solution()
Set the starting solution.
Details
Note that this method should only be run after $calculate()
.
It can be used to overwrite values after ingesting an
optimization_problem()
object.
It is designed to be used in portfolios and importance functions.
Method solve()
Solve an optimization problem.
Arguments
x
optimization_problem()
object....
Additional arguments passed to the
calculate()
method.