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

Accessing variable names after a solution has been created #51

Open tomaka opened 5 months ago

tomaka commented 5 months ago

Hi 👋

I have noticed that the ProblemVariables struct has a display function that is very convenient in order to print for example the list of constraints.

However, once you call optimise(), minimise(), or maximise(), it doesn't seem possible to access the variable names anymore. Is that correct, or did I just not find a way?

Being able to access the variable names would be very useful for debugging purposes in order to print the solution that has been found for every variable.