This class is used to represent solvers for optimization. Only experts should use the fields and methods for this class directly.
prioritizr::ConservationModifier -> Solver
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()
run()Run the solver to generate a solution.
Solver$run()list of solutions.
calculate()Perform computations that need to be completed before applying the object.
Solver$calculate(...)...Additional arguments.
xoptimization_problem() object.
Invisible TRUE.
set_variable_ub()Set the upper bound for a decision variable.
Solver$set_variable_ub(index, value)indexinteger value indicating the index of the decision
variable.
valuenumeric new bound value.
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.
Invisible TRUE.
set_variable_lb()Set the lower bound for a decision variable.
Solver$set_variable_lb(index, value)indexinteger value indicating the index of the decision
variable.
valuenumeric new bound value.
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.
Invisible TRUE.
set_constraint_rhs()Set the right-hand-side coefficient bound for a constraint.
Solver$set_constraint_rhs(index, value)indexinteger value indicating the index of the decision
variable.
valuenumeric new value.
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.
Invisible TRUE.
set_start_solution()Set the starting solution.
Solver$set_start_solution(value)valuenumeric new value.
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.
Invisible TRUE.
xoptimization_problem() object.
...Additional arguments passed to the calculate() method.
Invisible TRUE.
clone()The objects of this class are cloneable with this method.
Solver$clone(deep = FALSE)deepWhether to make a deep clone.
Other classes:
ConservationModifier-class,
ConservationProblem-class,
Constraint-class,
Decision-class,
Objective-class,
OptimizationProblem-class,
Penalty-class,
Portfolio-class,
Target-class