-
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
Adding dangling line's generation part mapping #821
Conversation
update when no generation created to do Signed-off-by: Hugo KULESZA <hugo.kulesza@rte-france.com>
Signed-off-by: Hugo KULESZA <hugo.kulesza@rte-france.com>
Signed-off-by: Hugo KULESZA <hugo.kulesza@rte-france.com>
Signed-off-by: Hugo KULESZA <hugo.kulesza@rte-france.com>
This reverts commit a6a2dd0. Signed-off-by: Hugo KULESZA <hugo.kulesza@rte-france.com>
Signed-off-by: Hugo KULESZA <hugo.kulesza@rte-france.com>
Signed-off-by: Hugo KULESZA <hugo.kulesza@rte-france.com>
Signed-off-by: Hugo KULESZA <hugo.kulesza@rte-france.com>
Signed-off-by: Hugo KULESZA <hugo.kulesza@rte-france.com>
Signed-off-by: Hugo KULESZA <hugo.kulesza@rte-france.com>
…/pypowsybl into dangling-line-generation Signed-off-by: Hugo KULESZA <hugo.kulesza@rte-france.com>
@@ -28,6 +28,7 @@ | |||
|
|||
import static com.powsybl.dataframe.MappingUtils.*; | |||
import static com.powsybl.dataframe.network.PerUnitUtil.*; | |||
import static java.lang.Double.NaN; |
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.
Could we avoid this useless change ?
pypowsybl/network/impl/network.py
Outdated
@@ -1244,14 +1244,20 @@ def get_dangling_lines(self, all_attributes: bool = False, attributes: List[str] | |||
- **ucte-xnode-code**: deprecated for pairing key. | |||
- **paired**: if the dangling line is paired with a tie line | |||
- **tie_line_id**: the ID of the tie line if the dangling line is paired | |||
- **min_p** (optional): Minimum active power output of the dangling line's generation part |
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.
To revert ?
@@ -1293,6 +1299,35 @@ def get_dangling_lines(self, all_attributes: bool = False, attributes: List[str] | |||
""" | |||
return self.get_elements(ElementType.DANGLING_LINE, all_attributes, attributes, **kwargs) | |||
|
|||
def get_dangling_lines_generation(self, all_attributes: bool = False, attributes: List[str] = None, |
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.
what is the purpose of **kwargs ?
@@ -3939,17 +4007,18 @@ def create_batteries(self, df: DataFrame = None, **kwargs: ArrayLike) -> None: | |||
""" | |||
return self._create_elements(ElementType.BATTERY, [df], **kwargs) | |||
|
|||
def create_dangling_lines(self, df: DataFrame = None, **kwargs: ArrayLike) -> None: | |||
def create_dangling_lines(self, df: DataFrame = None, generation_df: DataFrame = pd.DataFrame(), **kwargs: ArrayLike) -> None: |
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.
Is **kwargs stil working for example to pass the dangling base attributes inline and the generation part with generation_df ?
n.create_dangling_line(id='X', r=3.4, ..., generation_df=...)
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, the tests use create_dangling_lines this way to verify it still works.
On the other end, data for generation_df cannot be passed using kwargs
Signed-off-by: Hugo KULESZA <hugo.kulesza@rte-france.com>
Quality Gate passed for 'pypowsybl'Issues Measures |
Quality Gate passed for 'pypowsybl'Issues Measures |
update when no generation created to do
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
Fixing #793
Does this PR introduce a breaking change or deprecate an API?