Add support for the linopy io_api option#892
Conversation
|
By the way this isn't worth a new issue but @fneum you seem to have accidentally added your personal config to the last commit to master. |
|
Actually this seems to cause a problem with the snakemake workflow always re-running the solve_network rule; please don't merge until I fix it. |
|
Nevermind, the re-running thing doesn't seem to be a problem with the present PR but with d145758! Feel free to merge this if desired. |
The re-running issue is now fixed in #893 |
fneum
left a comment
There was a problem hiding this comment.
Nice addition!
Out of curiosity: Performance increases were in terms of memory or time?
Definitely in terms of time; using the direct API keeps things in memory meaning that writing the .lp and reading it again is avoided; the time savings surely depend quite a bit on the file system. Of course it shouldn't matter for the time or memory taken by the actual solver: it "doesn't care" if it was fed a problem via python API or .lp file. Total memory use I haven't checked but don't think it changes much overall. |
Sorry for the barrage of issues and pull requests. I do think this is a nice and simple improvement.
Changes proposed in this Pull Request
Big fan of the
io_api = "direct"option that linopy provides for HiGHS and Gurobi; it improves performance and actually solves some problems I've had with .lp files eating up too much disk space on funky cloud setups.Checklist
envs/environment.yaml.config.default.yaml.doc/configtables/*.csv.doc/release_notes.rstis added.