-
Notifications
You must be signed in to change notification settings - Fork 40
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
Enable roundtrip conversion PyPSA Network <--> PowerSimData Grid objects #675
Conversation
@FabianHofmann, this could help testing grid equality |
The roundtrip conversion has been fixed after merging #678. |
@FabianHofmann, I added storage devices to the reference grid and the test (grid equality after roundtrip conversion) is failing. |
@rouille thanks for the update, I'll fix that asap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. I left a couple of comments that might out of the scope of this PR. Also, as discussed elsewhere, we will refactor the grid equality definition here to incorporate grid comparisons to different extents as we do in the tests here.
for k, v in defaults.items(): | ||
storage[k] = storage[k].fillna(v) if k in storage else v | ||
|
||
storage["p_nom"] = storage.get("Pmax") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to refactor the p_nom
assignment after the implementation of "subsystem" logic for hydro/PHS
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. It might be even more complicated. @FabianHofmann, will we need to add hydro
and PHS
generators located in the plant
data frame of the Grid
object to the StorageUnit
component of the Network
object? Or they will simply be added to the Generator
component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a good question, I'd prefer to add them to StorageUnit
(assuming this is where they originally come from). But I prefer to tackle that in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
ce898ff
to
7840e02
Compare
Enable roundtrip conversion PyPSA Network <--> PowerSimData Grid objects
Enable roundtrip conversion PyPSA Network <--> PowerSimData Grid objects
Enable roundtrip conversion PyPSA Network <--> PowerSimData Grid objects
Enable roundtrip conversion PyPSA Network <--> PowerSimData Grid objects
Enable roundtrip conversion PyPSA Network <--> PowerSimData Grid objects
Pull Request doc
Purpose
Test grid equality for round trip conversion
Grid
->Network
->Grid
.What the code is doing
__class__
property soFromPyPSA
instances have typeGrid
Testing
Tests are failing due to differences in the two grids in the
test_import_exported_network
. This is illustrated when runningpytest powersimdata/input/converter/tests/test_pypsa_to_grid.py
:And:
There are likely other issues in the converter(s).
Where to look
N/A
Usage Example/Visuals
N/A
Time estimate
N/A