Skip to content
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

Request: allow retention of original variable names when writing to lp file #157

Open
JorritHimself opened this issue Sep 5, 2023 · 4 comments

Comments

@JorritHimself
Copy link

In pyomo one could specifiy:
model.write(lp_file_name, io_options={'symbolic_solver_labels': True})
Which retains original variable names, rathe rthan having these rewritten to x0, x1, x2 etc.

We use a lot of scripts to parse both problem and solution files for all sorts of analyses/plots, and that'd require having the original variable names used when writing to lp file.
From the dicord channel I udnerstood the option has not (yet) been included in
Model.to_file(fn)
but it might be possible to include.
Would help a lot with my projects.
Cheers.

@OBeaude
Copy link

OBeaude commented Jun 21, 2024

Having recently started with Linopy, I wanted to check the obtained lp file - also using model.to_file method - against some reference one obtained with pyomo... and faced the same issue.

Anything new since your post in Sept. 2023 @FabianHofmann ?

Thank you

@FabianHofmann
Copy link
Collaborator

Hey @OBeaude, unfortunately not. Maintenance swallows a lot of time, and this did not seem pressing to me. What would be your specific use case?

@OBeaude
Copy link

OBeaude commented Jun 27, 2024

Hey @FabianHofmann. In turn, we could code a patch and make a pull request. Would it be convenient for you? Any advice?

N.B. Our first use case is to check that we reproduce the writing of the .lp file we got using Pyomo on a given LP

@FabianHofmann
Copy link
Collaborator

Sure! PR's are always welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants