| Solver-class | R Documentation |
This class is used to represent solvers for optimization. Only experts should use the fields and methods for this class directly.
ConservationModifier -> Solver
Solver$run()Run the solver to generate a solution.
Solver$run()
list of solutions.
Solver$calculate()Perform computations that need to be completed before applying the object.
Solver$calculate(...)
...Additional arguments.
xoptimization_problem() object.
Invisible TRUE.
Solver$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.
Solver$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.
Solver$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.
Solver$set_start_solution()Set the starting solution.
Solver$set_start_solution(value, warn = TRUE)
valuenumeric vector.
warnlogical indicating if a warning should be displayed
if the solver does not support starting solutions.
This method is designed used in portfolios and importance functions.
Invisible TRUE.
Solver$remove_start_solution()Remove the starting solution.
Solver$remove_start_solution()
This method is designed used in portfolios and importance functions.
Invisible TRUE.
Solver$solve()Solve an optimization problem.
Solver$solve(x, ...)
xoptimization_problem() object.
...Additional arguments passed to the calculate() method.
A list object with the solution and additional information.
Solver$default_solve_multiobj()Solve a multi-objective optimization problem using a hierarchical multi-objective optimization approach. Broadly speaking, this approach involves using multiple optimization procedures to solve objectives following a hierarchical (lexicographic) ordering, wherein those associated with a higher priority order are solved before those with a lower priority order. When implementing this approach, constraints are added after generating a given solution to ensure that subsequent solutions for lower priority objectives have adequate performance according to higher priority objectives.
Solver$default_solve_multiobj(x, priority, rel_tol, ...)
xlist object with multi-objective optimization problem.
Arguments must contain the following elements:
("opt") OptimizationProblem object;
("modelsense") character vector containing the model sense values
for each objective; and ("obj") numeric' matrix containing the
coefficients for each of the objectives, wherein rows correspond to
different objectives, columns to different decision variables and
row names can be optionally specify names for the objectives.
prioritynumeric vector with values indicating the
priority for each objective. Greater values denote greater priority,
and so objectives associated with greater values are optimized
earlier in the multi-objective process.
rel_tolnumeric vector with relative tolerance values
for each constraint. Greater values denote a greater degree of
sub-optimality.
...Additional arguments passed to the calculate() method.
A list object with the solution and additional information.
Solver$solve_multiobj()Solve a multi-objective optimization problem using a hierarchical multi-objective optimization approach. Broadly speaking, this approach involves using multiple optimization procedures to solve objectives following a hierarchical (lexicographic) ordering, wherein those associated with a higher priority order are solved before those with a lower priority order. When implementing this approach, constraints are added after generating a given solution to ensure that subsequent solutions for lower priority objectives have adequate performance according to higher priority objectives.
Solver$solve_multiobj(x, priority, rel_tol, ...)
xlist object with multi-objective optimization problem.
Arguments must contain the following elements:
("opt") OptimizationProblem object;
("modelsense") character vector containing the model sense values
for each objective; and ("obj") numeric' matrix containing the
coefficients for each of the objectives, wherein rows correspond to
different objectives, columns to different decision variables and
row names can be optionally specify names for the objectives.
prioritynumeric vector with values indicating the
priority for each objective. Greater values denote greater priority,
and so objectives associated with greater values are optimized
earlier in the multi-objective process.
rel_tolnumeric vector with relative tolerance values
for each constraint. Greater values denote a greater degree of
sub-optimality.
...Additional arguments passed to the calculate() method.
A list object with the solution and additional information.
Solver$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,
MultiConservationProblem-class,
MultiObjApproach-class,
Objective-class,
OptimizationProblem-class,
Penalty-class,
Portfolio-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.