Skip to contents

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


Method run()

Run the solver to generate a solution.

Usage

Solver$run()

Returns

list of solutions.


Method calculate()

Perform computations that need to be completed before applying the object.

Usage

Solver$calculate(...)

Arguments

...

Additional arguments.

x

optimization_problem() object.

Returns

Invisible TRUE.


Method set_variable_ub()

Set the upper bound for a decision variable.

Usage

Solver$set_variable_ub(index, value)

Arguments

index

integer value indicating the index of the decision variable.

value

numeric new bound value.

Returns

Invisible TRUE.


Method set_variable_lb()

Set the lower bound for a decision variable.

Usage

Solver$set_variable_lb(index, value)

Arguments

index

integer value indicating the index of the decision variable.

value

numeric new bound value.

Returns

Invisible TRUE.


Method solve()

Solve an optimization problem.

Usage

Solver$solve(x, ...)

Arguments

x

optimization_problem() object.

...

Additional arguments passed to the calculate() method.

Returns

Invisible TRUE.


Method clone()

The objects of this class are cloneable with this method.

Usage

Solver$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.