-
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
Dynamic simulation output variables supplier #914
Conversation
Add fsv input Signed-off-by: lisrte <laurent.issertial@rte-france.com>
Signed-off-by: lisrte <laurent.issertial@rte-france.com>
Signed-off-by: lisrte <laurent.issertial@rte-france.com>
482385b
to
468d08c
Compare
@@ -37,4 +38,8 @@ def _get_all_curves(self) -> pd.DataFrame: | |||
curve_name_lst = _pp.get_all_dynamic_curves_ids(self._handle) | |||
df_curves = [self._get_curve(curve_name) | |||
for curve_name in curve_name_lst] | |||
return pd.concat(df_curves, axis=1) if df_curves else pd.DataFrame() | |||
return pd.concat(df_curves, axis=1).ffill() if df_curves else pd.DataFrame() |
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.
By curiosity, why is .ffill needed here ?
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.
Curves are represented as a map of DoubleTimeSeries
in Powsybl. When creating a DoubleTimeSeries
for an individual curve, entries with the same value as the previous one are skipped. Thus when we concat curves series we have to fill forward in order to get these values back.
java/src/main/java/com/powsybl/dataframe/dynamic/OutputVariablesSeries.java
Outdated
Show resolved
Hide resolved
Signed-off-by: lisrte <laurent.issertial@rte-france.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?
Dynamic simulation
CurveMapping
handle curve for dynamic models.What is the new behavior (if this is a feature change)?
CurveMapping
is replaced withOutputVariableMapping
handling curves and final state values for equipment with or without dynamic models.Final state values results are provided by
SimulationResult.final_state_values
.Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
Replace
CurveMapping::add_curve
andCurveMapping::add_curve
withOutputVariableMapping::add_dynamic_model_curves
.Other information:
Linked to the powsybl-dynawo PR 413
Without the PR, mapping with more than two curves will end with
pandas.errors.InvalidIndexError
.