Skip to contents

set_solver_path() and get_solver_path() are the generic form of the per-backend accessors (set_gams_path(), set_julia_path(), ...), which are thin wrappers around them.

Setting a path is optional. When it is unset, each backend falls back to its own discovery: glpk and mosox search the session PATH and well-known install locations (on Windows glpsol is found in Rtools, which bundles GLPK), while gams, python and julia simply invoke the bare command and let the OS resolve it on PATH. Set a path only to override that, for instance to pick between several installed GAMS versions.

Usage

set_solver_path(backend, path = NULL)

get_solver_path(backend)

Arguments

backend

character, one of "gams", "gdxlib", "glpk", "python", "julia", "mosox".

path

character, path to the directory containing the executable or library, or NULL to clear it. The directory must exist.

Value

get_solver_path() the configured path with a trailing /, or NULL if unset; set_solver_path() the path, invisibly.

Examples

if (FALSE) { # \dontrun{
set_solver_path("gams", "C:/GAMS/win64/48.1")
get_solver_path("gams")
} # }