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.
xoptimization_problem()object.
Method set_variable_ub()
Set the upper bound for a decision variable.
Arguments
indexintegervalue indicating the index of the decision variable.valuenumericnew 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
indexintegervalue indicating the index of the decision variable.valuenumericnew 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
indexintegervalue indicating the index of the decision variable.valuenumericnew 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.
Arguments
valuenumericvector.warnlogicalindicating if a warning should be displayed if the solver does not support starting solutions.
Details
This method is designed used in portfolios and importance functions.
Method remove_start_solution()
Remove the starting solution.
Details
This method is designed used in portfolios and importance functions.
Method solve()
Solve an optimization problem.
Arguments
xoptimization_problem()object....Additional arguments passed to the
calculate()method.
