Optex.Solver.Gurobi (Optex v0.1.0)

Copy Markdown View Source

Gurobi backend. Implements the same Optex.Solver contract as Optex.Solver.HiGHS and accepts the same neutral options; use it with Optex.optimize(m, solver: Optex.Solver.Gurobi).

Requires an installed, licensed Gurobi: the native crate is compile-gated on GUROBI_HOME (check available?/0). All constants and parameter names were verified against Gurobi 13.0.0's gurobi_c.h.

Supported options (same set as HiGHS): :time_limit, :mip_gap, :threads, :log (false | true | pid receiving {:optex_gurobi_log, line}), :cancel (token from cancel_token/0). Gurobi additionally understands :qcp_duals (true sets QCPDual=1 and returns quadratic constraint duals in Optex.Solution.qcon_duals for continuous QCPs; other backends reject the option as unsupported).

Limitation: genuine two-sided range rows (never produced by Optex.Transform) are rejected; Gurobi rows are sense + rhs.

Summary

Functions

Whether the native Gurobi binding was compiled (GUROBI_HOME at build).

Ask the solve holding this token to terminate.

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

Functions

available?()

Whether the native Gurobi binding was compiled (GUROBI_HOME at build).

cancel(token)

Ask the solve holding this token to terminate.

cancel_token()

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