checkDefaultMethod: Validate Solver and Method
Description
The function checkDefaultMethod
returns the default method
for a desired solver, or a default solver -- method pair. A solver
is allways the name of a R package offering facilities for solving
optimization problems.Usage
checkDefaultMethod(solver, method, probType, loadPackage = TRUE)
Arguments
solver
A single character string, containing the solver name (must be identical to
the name of an R-package), see SYBIL_SETTINGS
. method
A single character string, containing the method name, see
SYBIL_SETTINGS
. probType
A single character string, containing the problem type, see
optObj
. loadPackage
A single boolean value. If set to TRUE
, load the given solver
package via require
. Value
- solValidated solver name.
- metValidated method name.
- parmDefault prarmeter set for the validated method.
Details
In order to run simulations (optimizations) with sybil, additional software
offering facilities for solving optimization problems is required. Supported
R packages are described in SYBIL_SETTINGS
.
At first, the function checks if argument solver
contains a valid
solver. If that is not the case, a corresponding library will be loaded, if
one exists (this library must have the same name as given in solver
).
If this failes too, the default solver will be returned
(see SYBIL_SETTINGS
). Next the same is done for the argument
method
, regarding the current value of solver
.
Additionally, it will be checked, wether or not the given problem type can be
solved using the given method and solver.