linopy
linopy copied to clipboard
Request: allow retention of original variable names when writing to lp file
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.
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
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?
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
Sure! PR's are always welcome!