-
Notifications
You must be signed in to change notification settings - Fork 167
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
Linopy transition #796
base: main
Are you sure you want to change the base?
Linopy transition #796
Conversation
Currently works locally with
|
I can reproduce CI error locally when using |
Cool! Just a comment. I would not follow my Linopy PR only but also check if the PyPSA-EUR main changed some parts. |
Hello @ekatef, that's great news! :D Regarding solver log, it may make sense to check the latest pypsa-eur implementation as I guess they have accounted for that. As a remark, this morning we talked with Leon and it turns out that to merge this PR requires changes to the -sec version, which may be delicate also for some of their projects. |
Hey @davide-f! Thanks a lot for the detailed analysis :) Ah, I see: the load is an input, not a result. So, Regarding a potential merge of this PR, absolutely agree that it's crucial to ensure that the changes introduced don't break anything. Actually, I perceive this work as a kind of experiment to estimate how much effort would be needed for transition to My general impression is that linopy transition is not as challenging as it could be expected from the first sight (thanks to @pz-max PR in PyPSA-Eur and clear instructions) |
Some adjustments were done to get closer to PyPSA-Eur implementation. However, According to a warning, there is no |
Results of additional testing:
INFO:linopy.solvers:Log file at /tmp/highs.log.
ERROR: getOptionIndex: Option "solver_logfile" is unknown
Presolving model
Problem status detected on presolve: Infeasible
Model status : Infeasible
Objective value : 0.0000000000e+00
HiGHS run time : 0.00
WARNING:linopy.constants:Optimization failed:
Status: warning
Termination condition: infeasible
Solution: 0 primals, 0 duals
Objective: nan
Solver model: available
Solver message: infeasible
|
IT may be good to revive this PR and finalize it when possible, to be able to use the latest pypsa version. I am aware that you have a lot on your desk right now, no pressure at all :) we can give priorities and tackle them one by one |
@davide-f agree :) I'd expect that something about a week of focused work should be enough to resolve the remained questions. As discussed, #919 and #903 seem to have higher priorities now. Also, not sure what is the current status of PyPSA-Earth-Sec in terms of Anyway, after #919 and #903 will be finished, happy to get back to this PR. Ping me please in case this would get urgent. |
Testing with the updated PyPSA version (0.25.2 is used locally). Clustering is failing currently:
CI is failing due to conda being unhappy: |
The major points left:
|
Update: testing successful in the base-case configuration, but there is a problem when fetching isolated networks (something with |
A couple of notes on
|
Local testing on reproducibility of objective valuemain version
linopy version
That means ~6% difference for the objective function and basically same value for the objective constant (1e-3%, but here is rather a question of numerical precision). So, the PR seems to work properly. As a usability note, that is not obvious at all from the CI logs. The PR changes format of solver traceback due to different conventions of |
@finozzifa would be very grateful if you would have time to check this PR. Pre-commit is currently unhappy due to excessively long lines in the configuration file. But that won't be fixed in this PR. Another concern is backward compatibility. I'm currently looking into that, but not sure if it'll be possible to find a code solution for that. |
Closes #494
Integrate
linopy
following PyPSA/pypsa-eur#625Checklist
envs/environment.yaml
anddoc/requirements.txt
.config.default.yaml
andconfig.tutorial.yaml
.test/
(note tests are changing the config.tutorial.yaml)doc/configtables/*.csv
and line references are adjusted indoc/configuration.rst
anddoc/tutorial.rst
.doc/release_notes.rst
is amended in the format of previous release notes, including reference to the requested PR.