50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


highs (version 1.10.0-1)

hi_solver_set_option: Set a HiGHS Solver Option

Description

Sets the value of a specific option for a HiGHS solver instance.

Usage

hi_solver_set_option(
  solver,
  key,
  value,
  type = c("auto", "bool", "integer", "double", "string")
)

Value

Invisibly returns NULL.

Arguments

solver

A HiGHS solver object of class "highs_solver".

key

A character string specifying the option name to set.

value

The value to set for the specified option. Will be coerced to the appropriate type.

type

Type of the option. Can be one of "auto", "bool", "integer", "double", or "string". When set to "auto" (default), the function will attempt to determine the type from the available options list. Specify a type directly if the option is valid but not listed in the available options.

Examples

Run this code
solver <- example_solver()
hi_solver_set_option(solver, "output_flag", "FALSE")
hi_solver_set_option(solver, "solver", "simplex", type = "string")

Run the code above in your browser using DataLab