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

[DO NOT MERGE] Investigate issue with GLPK solver on LP files generated by PyPSA #49

Closed
wants to merge 1 commit into from

Conversation

jacek-oet
Copy link
Contributor

PyPSA Version Testing

I generated LP files by running:

python pypsa-gas+wind+sol+ely-ucgas-1-1h.py

Tested PyPSA Versions

Tested versions (PyPSA release history: https://pypi.org/project/pypsa/#history):

  • 0.30.1
  • 0.30.2
  • 0.30.3
  • 0.31.0
  • 0.31.1

Results with pypsa-gas+wind+sol+ely-ucgas-1-1h.py

Benchmark,Solver,Status,Termination Condition,Objective Value,Runtime (s),Memory Usage (MB)
pypsa-gas+wind+sol+ely-ucgas-1-1h_0.30.1,glpk,ok,optimal,84667526620.0,206.10014152526855,281.316
pypsa-gas+wind+sol+ely-ucgas-1-1h_0.30.2,glpk,ok,optimal,84667526620.0,200.6377453804016,280.896
pypsa-gas+wind+sol+ely-ucgas-1-1h_0.30.3,glpk,ok,optimal,84667526620.0,199.55054306983948,281.024
pypsa-gas+wind+sol+ely-ucgas-1-1h_0.31.0,glpk,warning,unknown,nan,0.5099265575408936,169.208
pypsa-gas+wind+sol+ely-ucgas-1-1h_0.31.1,glpk,warning,unknown,nan,0.4162724018096924,167.44

Additional Test with pypsa-gas+wind+sol+ely-1-1h.py

To further investigate, I also tested the file pypsa-gas+wind+sol+ely-1-1h.py with PyPSA versions:

  • 0.30.3
  • 0.31.0

Results with pypsa-gas+wind+sol+ely-1-1h.py

Benchmark,Solver,Status,Termination Condition,Objective Value,Runtime (s),Memory Usage (MB)
pypsa-gas+wind+sol+ely-1-1h_0.30.3,glpk,ok,optimal,31714138110.0,103.1927318572998,274.024
pypsa-gas+wind+sol+ely-1-1h_0.31.0,glpk,warning,unknown,nan,0.3610563278198242,165.244

Summary

Using PyPSA version 0.31.* appears to introduce an issue, resulting in a warning status and an unknown termination condition with NaN as the objective value. This issue does not occur with earlier versions (0.30.*), where the files are processed successfully without any errors.

In summary:

  • PyPSA 0.30.* versions work as expected, producing ok status and optimal results.
  • PyPSA 0.31.* versions cause an error with <= +inf in LP files, leading to warning and unknown conditions when solved by GLPK.
glpsol --lp runner/benchmarks/pypsa-gas+wind+sol+ely-1-1h_0.31.0.lp 
GLPSOL--GLPK LP/MIP Solver 5.0
Parameter(s) specified in the command line:
 --lp runner/benchmarks/pypsa-gas+wind+sol+ely-1-1h_0.31.0.lp
Reading problem data from 'runner/benchmarks/pypsa-gas+wind+sol+ely-1-1h_0.31.0.lp'...
runner/benchmarks/pypsa-gas+wind+sol+ely-1-1h_0.31.0.lp:731757: missing right-hand side
CPLEX LP file processing error

@jacek-oet jacek-oet changed the title Investigate issue with GLPK solver on LP files generated by PyPSA [DO NOT MERGE] Investigate issue with GLPK solver on LP files generated by PyPSA Nov 4, 2024
@jacek-oet jacek-oet marked this pull request as draft November 4, 2024 17:25
@siddharth-krishna
Copy link
Contributor

Thanks Jacek! Closing this because of the temporary fix in #51

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

Successfully merging this pull request may close these issues.

2 participants