-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add Network area model support #840
Conversation
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
b84deb3
to
7f94792
Compare
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
works but not so happy with having to always redefine all voltagelevels or boundaries on creation, will try to think about something better |
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
AREA_ADD_VOLTAGE_LEVELS, | ||
AREA_REMOVE_VOLTAGE_LEVELS, | ||
AREA_ADD_BOUNDARIES, | ||
AREA_REMOVE_BOUNDARIES; |
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 is quite tweaking the ElementType
concept ... please let me know if this is OK of if must be done differently...
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.
Nok for me, this is really not the purpose of the dataframes. Dataframes contains some data, not operations, and this is the way we use data (though a creation, modif or read method) that we express the operation.
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.
yes it was a failed attempt at solving #840 (comment), but thinking about it, we don't redefine areas that often, so I reverted to something simpler
# Conflicts: # java/src/main/java/com/powsybl/dataframe/network/adders/NetworkUtils.java # java/src/test/java/com/powsybl/dataframe/network/NetworkDataframesTest.java
# Conflicts: # java/src/test/java/com/powsybl/dataframe/network/NetworkDataframesTest.java # java/src/test/java/com/powsybl/dataframe/network/adders/NetworkElementAddersTest.java
def get_areas(self, all_attributes: bool = False, attributes: List[str] = None, | ||
**kwargs: ArrayLike) -> DataFrame: | ||
r""" | ||
Get a dataframe of areas. |
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.
I think it would be a good idea to add something like : "To retrieve the voltage levels of the areas or their boundaries see get_areas_voltage_levels and get_areas_boundaries" to have an easier full picture when browsing the documentation
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.
good point, done
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Quality Gate passed for 'pypowsybl'Issues Measures |
Quality Gate passed for 'pypowsybl'Issues Measures |
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Feature
What is the current behavior?
No area support
What is the new behavior (if this is a feature change)?
Add area support (starting from PowSyBl 2024.2.0 / powsybl-core 6.4.x), see:
Implementation followup:
Does this PR introduce a breaking change or deprecate an API?