Skip to content

Commit

Permalink
Wip
Browse files Browse the repository at this point in the history
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
  • Loading branch information
geofjamg committed Nov 10, 2023
1 parent cfaf233 commit afeeb8c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
9 changes: 5 additions & 4 deletions pypowsybl/sensitivity/impl/ac_sensitivity_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ def __init__(self, handle: _pypowsybl.JavaHandle):
def set_bus_voltage_factor_matrix(self, bus_ids: List[str], target_voltage_ids: List[str]) -> None:
"""
.. deprecated:: 1.1.0
Use :meth:`add_bus_voltage_factor_matrix` instead.
Defines buses voltage sensitivities to be computed.
Defines buses voltage sensitivities to be computed.
Args:
bus_ids: IDs of buses for which voltage sensitivities should be computed
target_voltage_ids: IDs of regulating equipments to which we should compute sensitivities
Args:
bus_ids: IDs of buses for which voltage sensitivities should be computed
target_voltage_ids: IDs of regulating equipments to which we should compute sensitivities
"""
self.add_bus_voltage_factor_matrix(bus_ids, target_voltage_ids)

Expand Down
2 changes: 2 additions & 0 deletions pypowsybl/sensitivity/impl/ac_sensitivity_analysis_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(self,
def get_bus_voltages_sensitivity_matrix(self, matrix_id: str = DEFAULT_MATRIX_ID, contingency_id: str = None) -> Optional[pd.DataFrame]:
"""
.. deprecated:: 1.1.0
Use :meth:`get_sensitivity_matrix` instead.
Get the matrix of bus voltages sensitivities on the base case or on post contingency state.
Expand All @@ -41,6 +42,7 @@ def get_bus_voltages_sensitivity_matrix(self, matrix_id: str = DEFAULT_MATRIX_ID
def get_reference_voltages(self, matrix_id: str = DEFAULT_MATRIX_ID, contingency_id: str = None) -> Optional[pd.DataFrame]:
"""
.. deprecated:: 1.1.0
Use :meth:`get_reference_matrix` instead.
The values of bus voltages on the base case or on post contingency state.
Expand Down
2 changes: 2 additions & 0 deletions pypowsybl/sensitivity/impl/dc_sensitivity_analysis_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def get_branch_flows_sensitivity_matrix(self, matrix_id: str = DEFAULT_MATRIX_ID
pd.DataFrame]:
"""
.. deprecated:: 1.1.0
Use :meth:`get_sensitivity_matrix` instead.
Get the matrix of branch flows sensitivities on the base case or on post contingency state.
Expand All @@ -44,6 +45,7 @@ def get_branch_flows_sensitivity_matrix(self, matrix_id: str = DEFAULT_MATRIX_ID
def get_reference_flows(self, matrix_id: str = DEFAULT_MATRIX_ID, contingency_id: str = None) -> Optional[pd.DataFrame]:
"""
.. deprecated:: 1.1.0
Use :meth:`get_reference_matrix` instead.
The branches active power flows on the base case or on post contingency state.
Expand Down
1 change: 1 addition & 0 deletions pypowsybl/sensitivity/impl/sensitivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def _process_variable_ids(variables_ids: List) -> tuple:
def set_branch_flow_factor_matrix(self, branches_ids: List[str], variables_ids: List[str]) -> None:
"""
.. deprecated:: 0.14.0
Use :meth:`add_branch_flow_factor_matrix` instead.
Defines branch active power flow factor matrix, with a list of branches IDs and a list of variables.
Expand Down
2 changes: 1 addition & 1 deletion pypowsybl/sensitivity/impl/sensitivity_analysis_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self,
self.function_data_frame_index = function_data_frame_index

@staticmethod
def clean_contingency_id(contingency_id: str) -> Optional[str]:
def clean_contingency_id(contingency_id: Optional[str]) -> str:
return '' if contingency_id is None else contingency_id

def process_ptdf(self, df: pd.DataFrame, matrix_id: str) -> pd.DataFrame:
Expand Down

0 comments on commit afeeb8c

Please sign in to comment.