fix: restore correct assigned countries for virtual tyndp nodes - #794
Conversation
tgilon
left a comment
There was a problem hiding this comment.
Thank you @daniel-rdt for the fix. I think we could generalise a bit more to effectively link the two scripts via the global variable. Currently, the link is probably too weak to be robust.
| "UK": "GB", | ||
| } | ||
|
|
||
| AC_VIRTUAL_NODES = ["ITCO", "ITVI"] |
There was a problem hiding this comment.
I understand the need to link the two files. You could create a dictionary instead and use that when adding the virtual nodes. This would be more robust.
tgilon
left a comment
There was a problem hiding this comment.
Thank you @daniel-rdt ! I think that this is more consistent internally. I have one final minor comment for the docstring. Otherwise, you could base this PR on #797 to solve the CI issue.
| ref_bus : str | ||
| Name of the reference bus whose attributes are copied. | ||
| source_gdf : gpd.GeoDataFrame, optional | ||
| Bus GeoDataFrame holding the reference bus. Defaults to ``target``. |
There was a problem hiding this comment.
The default is None, which implies the use of target_df
There was a problem hiding this comment.
jep, good point. I clarified it.
|
#797 has now been merged on master |
Closes #765.
Changes proposed in this Pull Request
This PR introduces a minor bug fix that wrongly assigned the country for the
ITCOvirtual node toFRinstead ofITas manually set inbuild_tyndp_network.The PR restores the declared country of TYNDP virtual nodes in
base_network. As their coordinates are borrowed from a bus in a geographically different country, the coordinate-based assignment in_set_countries_and_substationsis incorrectly reassigning them.busesholds the countries declared upstream in build_tyndp_network, before that reassignment and can be used to restore the correct value.Note: The help of generative AI was used to generate docstrings for the introduced functions
Tasks
Workflow
Open issues
Notes
Checklist
Required:
doc/release_notes.md.If applicable:
scripts/lib/validation.config/test/*.yaml.pixi run -e open-tyndp tyndp-cyears-test).doc/*.mdfiles.doc/index.md.