rust-or / good_lp

Linear Programming for Rust, with a user-friendly API. This crate allows modeling LP problems, and lets you solve them with various solvers.
https://crates.io/crates/good_lp
MIT License
238 stars 34 forks source link

Feature: add access to set_option for HiGHS #54

Closed TeXitoi closed 3 months ago

TeXitoi commented 3 months ago

Hi!

HighsProblem already gives access to a few solver options, but several are not available. Can’t we give full access to the set_option method?

If you are OK with this, I can open a PR on it.

Thanks!

lovasoa commented 3 months ago

Yes, I'd merge a pr for that. And maybe ass as_inner_mut() to give mutable access to the highs object ?

TeXitoi commented 3 months ago

OK, I’ll try to do this tomorrow.

TeXitoi commented 3 months ago

So, I looked at the code, and that’s not that simple…

we can’t have a as_inner_mut as the solver object is created and populate at .solve() time. Same for the options, as they are passed at that time. And the HiGHS crate use a strange trick to emulate method overload, so we can’t catch bad options easily.

I have a proposition just for the options.