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
216 stars 35 forks source link

add a method to retrieve the solver name #41

Closed lovasoa closed 9 months ago

lovasoa commented 9 months ago

@k-sidorov, @NickHu, would that solve your problem ?

Closes #40 Fixes #32

k-sidorov commented 9 months ago

@lovasoa I think this is much nicer! One question: in your opinion, would it make sense to replace &str with an enum having variants for CoinCbc, minilp, and others? (Of course, once the enum is in place, the "printing" functionality reduces to implementing Display for that enum.)

lovasoa commented 9 months ago

I think it would be much more helpful the other way round, if we had an AnySolver enum with the actual solver objects in it, and it actually implemented the Solver trait. That would make working with dynamic solvers easier.

lovasoa commented 9 months ago

I'm going to merge this already, and we can add the AnySolver enum later.