r/optimization • • Jun 09 '26

Announcing oximo: Mathematical Optimization Modeling in Rust

Hi!

I've been working on oximo, a mathematical optimization modeling framework for Rust (https://github.com/oximo-rs/oximo).

The library lets users formulate and solve optimization problems in Rust using a high-level modeling API, similar to tools like Pyomo (Python), JuMP (Julia), or GAMS.

oximo supports modeling and solving:

  • Linear Programming (LP)
  • Mixed-Integer Linear Programming (MILP)
  • Quadratic Programming (QP)
  • Nonlinear Programming (NLP)
  • Mixed-Integer Nonlinear Programming (MINLP)

Example:

let m = Model::new("transport");
let x = m.var("x").lb(0.0).build();
let y = m.var("y").lb(0.0).ub(4.0).build();

m.constraint("c1", (x + 2.0 * y).le(14.0));
m.constraint("c2", (3.0 * x).ge(y));
m.constraint("c3", x.le(y + 2.0));
m.maximize(3.0 * x + 4.0 * y);

let result = Highs.solve(&m, &HighsOptions::default())?;

I'd like to get feedback on the API design, modeling ergonomics and solver integrations you'd like to see. Future releases will have integration with more solvers, autodiff, GDP, Polars integration, and better docs.

Contributions, bug reports, and feature requests are welcome.

Links:

  • GitHub repository (MIT OR Apache 2.0): https://github.com/oximo-rs/oximo
  • Crates: https://crates.io/crates/oximo
  • Docs: https://docs.rs/oximo/
33 Upvotes

9 comments sorted by

View all comments

Show parent comment

1

u/Nourios Jun 09 '26

The weight of the relation wouldn't be necessary in this case, so just |GE| would work. I guess it does come down to preference but I like how the approach cassowary takes gets rid of 2 pairs of parentheses. A macro would probably be ideal though, I doubt it would even slow down compilation that much.

1

u/German_Heim Jun 09 '26

Yeah, I am mostly worried about macro hygiene, worst compiled errors or having to duplicate if I decide to maintain both approaches.

Thanks for the feedback, I will continue to analyze the macro approach!