-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export variable and constraint names in LP files #391
base: master
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
I'll fix the tests first |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
I added a new io_api type called "lp-debug" to write lp file with variable and constraint names. I don't know if you will like that approach. I can replace it by an extra argument to the function to_file instead if you prefer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pretty cool @olivierjuan! Thank you for your contribution! I would suggest to have an extra argument for this and raise an error if a non-supported io-api is passed. Could you check whether this has any impact on the regular lp file writing?
Ok. I'm on it |
…o polars export too
@FabianHofmann , I extended it to lp-polars too, and added tests to check with and without variable names. |
…ompatible with variables names. MindOpt untested since my license is not functioning
for more information, see https://pre-commit.ci
Well I did it in the end. Only CBC and GLPK are incompatible (if trying to solve with_names=True and with one of these solvers, a warning will be printed and the option will be deactivated). |
Wow, well done @olivierjuan ! I promise to have a look soon and then we can merge it 🚀 |
A small modification to export LP files with variable and constraint names.
Gurobi is able to read the generated LP files.
This modification does not apply to polar export.
I'm ready to improve the code if needed
This is related to issue #157