Closed NickHu closed 9 months ago
Motivation: my application uses good_lp, and mirrors the structure you have here of using features to enable/disable various solver backends. I would like to be able to print out which solver is being used.
There's some reasonably complex logic in https://github.com/rust-or/good_lp/blob/f7483e2743bf97a76f65460835ce7fe89c746a9a/src/lib.rs#L73-L110 to determine which solver is the default which I'd rather not copy. I think the cleanest solution would be to add something like pub const SOLVER_NAME: &str = "cbc" in src/solvers/coin_cbc.rs etc. and reexport it.
pub const SOLVER_NAME: &str = "cbc"
src/solvers/coin_cbc.rs
That would be a nice and useful feature indeed ! Do you want to open a small PR ? I can help if you have any question !
Motivation: my application uses good_lp, and mirrors the structure you have here of using features to enable/disable various solver backends. I would like to be able to print out which solver is being used.
There's some reasonably complex logic in https://github.com/rust-or/good_lp/blob/f7483e2743bf97a76f65460835ce7fe89c746a9a/src/lib.rs#L73-L110 to determine which solver is the default which I'd rather not copy. I think the cleanest solution would be to add something like
pub const SOLVER_NAME: &str = "cbc"
insrc/solvers/coin_cbc.rs
etc. and reexport it.