Optex.Solver.CPLEX (Optex v0.1.0)

Copy Markdown View Source

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

Requires an installed, licensed CPLEX Studio: the native crate is compile-gated on the versioned CPLEX_STUDIO_DIR* env var (check available?/0). All constants and parameter ids were verified against CPLEX 22.1.1's cplex.h/cpxconst.h.

Supported options (same set as the other backends): :time_limit, :mip_gap, :threads, :log (false | true | pid receiving {:optex_cplex_log, line}), :cancel (token from cancel_token/0).

Unlike the Gurobi backend, genuine two-sided range rows are supported natively (CPLEX sense 'R').

Summary

Functions

Whether the native CPLEX binding was compiled (CPLEX_STUDIO_DIR* 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 CPLEX binding was compiled (CPLEX_STUDIO_DIR* 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.