oximo
oximo is a Rust algebraic modeling library for mathematical optimization. It provides a compact modeling API for variables, indexed domains, algebraic constraints, objectives, nonlinear expressions, and multiple solver backends.
use *;
use Highs;
let demand = ;
let m = new;
variable!;
constraint!;
objective!;
let mut solver = Highs;
let result = solver.solve?;
println!;
# Ok::
Expressions use standard Rust operators. Variable domains and bounds are declared directly in the model:
variable!; // continuous
variable!; // binary
variable!; // integer
constraint!;
objective!;
Quadratic, nonlinear, and second-order-cone expressions are also available:
objective!;
constraint!;
soc_constraint!;
Problem types
oximo supports the following algebraic problem classes. Which classes can be solved depends on the selected backend:
- Linear programming (LP)
- Quadratic programming and quadratically constrained programming (QP/QCP)
- Nonlinear programming (NLP)
- Mixed-integer linear programming (MILP)
- Mixed-integer quadratic and quadratically constrained programming (MIQP/MIQCP)
- Mixed-integer nonlinear programming (MINLP)
- Second-order cone programming (SOCP/MISOCP)
Solver features
| Feature | Backend / capability | Default |
|---|---|---|
highs |
HiGHS - LP/MILP/QP (bundled, requires a C/C++ compiler) | no |
io |
NL, MPS, and LP readers and writers | yes |
gurobi |
Gurobi v13+ (requires licensed install) | no |
mosek |
MOSEK 11.2 - convex LP/MIP/QP/QCP/SOCP | no |
gams |
GAMS bridge - capability depends on the selected sub-solver | no |
baron |
BARON - global non-convex solver (requires licensed install) | no |
clarabel |
Clarabel - LP/QP/SOCP (pure Rust, no install) | no |
clarabel-faer |
Clarabel with the faer sparse linear-algebra backend | no |
pounce |
POUNCE - pure-Rust LP/QP/QCP/NLP backend | no |
pounce-enzyme |
POUNCE with exact Enzyme derivatives (nightly) | no |
For example, use HiGHS for a bundled LP/MILP/QP solver:
[]
= { = "0.5", = ["highs"] }
Licensed or external backends may require an installed solver, environment variables, and a valid license. See the backend documentation and the webdocs for setup details.
Results
SolverResult provides the termination status, objective value, variable values, duals, reduced costs, and (where supported) bounds, gaps, and solution pools.
License
MIT OR Apache-2.0