Optex.Solver.HiGHS (Optex v0.1.0)

Copy Markdown View Source

HiGHS backend. Maps neutral variable types to HiGHS vartype ints, translates neutral solver options to HiGHS option names, and decodes HiGHS status codes; symbolic :infinity bounds pass through to the NIF, which substitutes HiGHS's own infinity value (see DECISIONS.md).

Supported options (anything else returns {:error, {:unknown_option, key}}):

  • :time_limit - wall-clock limit in seconds (number)
  • :mip_gap - relative MIP gap tolerance (number)
  • :threads - number of solver threads (positive integer)
  • :log - false (default, silent), true (solver log to stdout), or a pid that receives each log line as {:optex_highs_log, line}
  • :cancel - a token from cancel_token/0; calling cancel/1 on it from another process interrupts the running solve, which then returns with status :interrupted

All constants and option names were verified against highs-sys 1.15.0 / HiGHS 1.15.0.

Summary

Functions

Ask the solve holding this token to stop at its next interrupt check.

Create a cancellation token to pass as the :cancel solve option.

Functions

cancel(token)

Ask the solve holding this token to stop at its next interrupt check.

cancel_token()

Create a cancellation token to pass as the :cancel solve option.