diff --git a/docs/reference/network.rst b/docs/reference/network.rst index 7af7245490..676eb6a28e 100644 --- a/docs/reference/network.rst +++ b/docs/reference/network.rst @@ -149,7 +149,6 @@ Network elements can be created or removed using the following methods: Network.create_2_windings_transformers Network.create_batteries - Network.create_aliases Network.create_busbar_sections Network.create_buses Network.create_curve_reactive_limits diff --git a/docs/reference/voltage_initializer.rst b/docs/reference/voltage_initializer.rst index 71babe12ef..356c7ac04a 100644 --- a/docs/reference/voltage_initializer.rst +++ b/docs/reference/voltage_initializer.rst @@ -1,20 +1,20 @@ -========= +=================== Voltage Initializer -========= +=================== .. module:: pypowsybl.voltage_initializer The voltage_initializer module is a tool to initialize voltage of a network before a loadflow and can prevent divergence. Run the voltage initializer ------------- +--------------------------- .. autosummary:: :toctree: api/ run VoltageInitializerParameters : How to parameterize the tool ------------- +----------------------------------------------------------- .. autosummary:: :toctree: api/ @@ -28,11 +28,11 @@ VoltageInitializerParameters : How to parameterize the tool VoltageInitializerParameters.set_objective_distance VoltageInitializerResults : How to exploit the results ------------- +------------------------------------------------------ .. autosummary:: :toctree: api/ VoltageInitializerResults - VoltageInitializerResults.apply_all_modification + VoltageInitializerResults.apply_all_modifications VoltageInitializerResults.status VoltageInitializerResults.indicators diff --git a/docs/user_guide/loadflow.rst b/docs/user_guide/loadflow.rst index 0a924151df..830dc13936 100644 --- a/docs/user_guide/loadflow.rst +++ b/docs/user_guide/loadflow.rst @@ -39,7 +39,7 @@ OpenLoadFlow supports AC Newton-Raphson and linear DC calculation methods. You may also use DynaFlow, provided by the `Dynawo `_ project. DynaFlow is a new steady-state simulation tool that aims at calculating the steady-state point by using a simplified time-domain simulation. -Please see configuration instructions on `Powsybl website `_. +Please see configuration instructions on `Powsybl website `__. Parameters diff --git a/docs/user_guide/shortcircuit.rst b/docs/user_guide/shortcircuit.rst index 4b84188845..836c91a798 100644 --- a/docs/user_guide/shortcircuit.rst +++ b/docs/user_guide/shortcircuit.rst @@ -63,7 +63,7 @@ The parameters available to run a shortcircuit analysis are: Simple example -------------- +-------------- .. code-block:: diff --git a/pypowsybl/network/impl/layout_parameters.py b/pypowsybl/network/impl/layout_parameters.py index 4e63b6925a..148f675427 100644 --- a/pypowsybl/network/impl/layout_parameters.py +++ b/pypowsybl/network/impl/layout_parameters.py @@ -12,7 +12,7 @@ class LayoutParameters(SldParameters): """ .. deprecated:: 1.1.0 - Use :class:`SldParameters` instead. + Use :class:`SldParameters` instead. This class is only used for backward compatibility and represents sld parameters for a single line diagram svg generation.""" diff --git a/pypowsybl/network/impl/network.py b/pypowsybl/network/impl/network.py index 0d2e6c19cb..9fa84f083a 100644 --- a/pypowsybl/network/impl/network.py +++ b/pypowsybl/network/impl/network.py @@ -126,7 +126,7 @@ def dump(self, file: PathOrStr, format: str = 'XIIDM', parameters: ParamsDict = reporter: Reporter = None) -> None: """ .. deprecated:: 1.1.0 - Use :meth:`save` instead. + Use :meth:`save` instead. """ warnings.warn("dump is deprecated, use save instead", DeprecationWarning) self.save(file, format, parameters, reporter) @@ -163,7 +163,7 @@ def save(self, file: PathOrStr, format: str = 'XIIDM', parameters: ParamsDict = def dump_to_string(self, format: str = 'XIIDM', parameters: ParamsDict = None, reporter: Reporter = None) -> str: """ .. deprecated:: 1.1.0 - Use :meth:`save_to_string` instead. + Use :meth:`save_to_string` instead. """ warnings.warn("dump_to_string is deprecated, use save_to_string instead", DeprecationWarning) return self.save_to_string(format, parameters, reporter) @@ -258,7 +258,7 @@ def write_network_area_diagram_svg(self, svg_file: PathOrStr, voltage_level_ids: edge_name_displayed: bool = False) -> None: """ .. deprecated:: 1.1.0 - Use :class:`write_network_area_diagram_svg` with `NadParameters` instead. + Use :class:`write_network_area_diagram_svg` with `NadParameters` instead. Create a network area diagram in SVG format and write it to a file. Args: @@ -1479,6 +1479,7 @@ def get_voltage_levels(self, all_attributes: bool = False, attributes: List[str] - **low_voltage_limit**: the low voltage limit - **fictitious** (optional): ``True`` if the voltage level is part of the model and not of the actual network - **topology_kind** (optional): the voltage level topology kind (NODE_BREAKER or BUS_BREAKER) + This dataframe is indexed by the id of the voltage levels Examples: @@ -3244,7 +3245,8 @@ def get_variant_ids(self) -> List[str]: def get_current_limits(self, all_attributes: bool = False, attributes: List[str] = None) -> DataFrame: """ .. deprecated:: - Use :meth:`get_operational_limits` instead. + Use :meth:`get_operational_limits` instead. + Get the list of all current limits on the network paired with their branch id. Args: @@ -4462,7 +4464,7 @@ def get_extensions(self, extension_name: str, table_name: str = "") -> DataFrame def get_extension(self, extension_name: str) -> DataFrame: """ .. deprecated:: - Use :meth:`get_extensions` instead. + Use :meth:`get_extensions` instead. """ warnings.warn("get_extension is deprecated, use get_extensions instead", DeprecationWarning) return self.get_extensions(extension_name) diff --git a/pypowsybl/network/impl/network_element_modification_util.py b/pypowsybl/network/impl/network_element_modification_util.py index 37c12b878e..d06c1093ba 100644 --- a/pypowsybl/network/impl/network_element_modification_util.py +++ b/pypowsybl/network/impl/network_element_modification_util.py @@ -50,31 +50,33 @@ def create_line_on_line(network: Network, deprecated_bbs_or_bus_id: str = None, Args: network: the network df: attributes as a dataframe, it should contain: - bbs_or_bus_id: the ID of the existing bus or bus bar section of the voltage level voltage_level_id. - new_line_id: ID of the new line - new_line_r: resistance of the new line, in ohms - new_line_x: reactance of the new line, in ohms - new_line_b1: shunt susceptance on side 1 of the new line - new_line_b2: shunt susceptance on side 2 of the new line - new_line_g1: shunt conductance on side 1 of the new line - new_line_g2: shunt conductance on side 2 of the new line - line_id: the id on of the line on which we want to create a tee point. - line1_id: when the initial line is cut, the line segment at side 1 has a given ID (optional). - line1_name: when the initial line is cut, the line segment at side 1 has a given name (optional). - line2_id: when the initial line is cut, the line segment at side 2 has a given ID (optional). - line2_name: when the initial line is cut, the line segment at side 2 has a given name (optional). - position_percent: when the existing line is cut in two lines, percent is equal to the ratio between the parameters of the first line - and the parameters of the line that is cut multiplied by 100. 100 minus percent is equal to the ratio - between the parameters of the second line and the parameters of the line that is cut multiplied by 100. - create_fictitious_substation: True to create the fictitious voltage level inside a fictitious substation (false by default). - fictitious_voltage_level_id: the ID of the fictitious voltage level (optional) containing the tee point. - fictitious_voltage_level_name: the name of the fictitious voltage level (optional) containing the tee point. - fictitious_substation_id: the ID of the fictitious substation (optional). - fictitious_substation_name: the name of the fictitious substation (optional). + + - bbs_or_bus_id: the ID of the existing bus or bus bar section of the voltage level voltage_level_id. + - new_line_id: ID of the new line + - new_line_r: resistance of the new line, in ohms + - new_line_x: reactance of the new line, in ohms + - new_line_b1: shunt susceptance on side 1 of the new line + - new_line_b2: shunt susceptance on side 2 of the new line + - new_line_g1: shunt conductance on side 1 of the new line + - new_line_g2: shunt conductance on side 2 of the new line + - line_id: the id on of the line on which we want to create a tee point. + - line1_id: when the initial line is cut, the line segment at side 1 has a given ID (optional). + - line1_name: when the initial line is cut, the line segment at side 1 has a given name (optional). + - line2_id: when the initial line is cut, the line segment at side 2 has a given ID (optional). + - line2_name: when the initial line is cut, the line segment at side 2 has a given name (optional). + - position_percent: when the existing line is cut in two lines, percent is equal to the ratio between the parameters of the first line + and the parameters of the line that is cut multiplied by 100. 100 minus percent is equal to the ratio + between the parameters of the second line and the parameters of the line that is cut multiplied by 100. + - create_fictitious_substation: True to create the fictitious voltage level inside a fictitious substation (false by default). + - fictitious_voltage_level_id: the ID of the fictitious voltage level (optional) containing the tee point. + - fictitious_voltage_level_name: the name of the fictitious voltage level (optional) containing the tee point. + - fictitious_substation_id: the ID of the fictitious substation (optional). + - fictitious_substation_name: the name of the fictitious substation (optional). + raise_exception: optionally, whether the calculation should throw exceptions. In any case, errors will - be logged. Default is False. + be logged. Default is False. reporter: optionally, the reporter to be used to create an execution report, default is None (no report). - bbs_or_bus_id: the ID of the existing bus or bus bar section of the voltage level voltage_level_id. + bbs_or_bus_id: the ID of the existing bus or bus bar section of the voltage level voltage_level_id. deprecated_bbs_or_bus_id: this argument is deprecated, use the dataframe instead deprecated_new_line_id: this argument is deprecated, use the dataframe instead deprecated_new_line_r: this argument is deprecated, use the dataframe instead @@ -202,13 +204,15 @@ def revert_create_line_on_line(network: Network, deprecated_line_to_be_merged1_i Args: network: the network df: attributes as a dataframe, it should contain: - line_to_be_merged1_id: The id of the first line connected to the tee point. - line_to_be_merged2_id: The id of the second line connected to the tee point. - line_to_be_deleted: The tee point line that will be deleted - merged_line_id: The id of the new line from the two lines to be merged - merged_line_name: The name of the new line from the two lines to be merged (default to line id) + + - line_to_be_merged1_id: The id of the first line connected to the tee point. + - line_to_be_merged2_id: The id of the second line connected to the tee point. + - line_to_be_deleted: The tee point line that will be deleted + - merged_line_id: The id of the new line from the two lines to be merged + - merged_line_name: The name of the new line from the two lines to be merged (default to line id) + raise_exception: optionally, whether the calculation should throw exceptions. In any case, errors will - be logged. Default is False. + be logged. Default is False. reporter: optionally, the reporter to be used to create an execution report, default is None (no report). deprecated_line_to_be_merged1_id: this argument is deprecated, use the dataframe instead deprecated_line_to_be_merged2_id: this argument is deprecated, use the dataframe instead @@ -263,17 +267,19 @@ def connect_voltage_level_on_line(network: Network, deprecated_bbs_or_bus_id: st Args: network: the network df: attributes as a dataframe, it should contain: - bbs_or_bus_id: The ID of the configured bus or bus bar section to which the lines will be connected. - line_id: the ID ot the line on which the voltage level should be connected. - position_percent: when the existing line is cut, percent is equal to the ratio between the parameters of the first line + + - bbs_or_bus_id: The ID of the configured bus or bus bar section to which the lines will be connected. + - line_id: the ID ot the line on which the voltage level should be connected. + - position_percent: when the existing line is cut, percent is equal to the ratio between the parameters of the first line and the parameters of the line that is cut multiplied by 100. 100 minus percent is equal to the ratio between the parameters of the second line and the parameters of the line that is cut multiplied by 100. - line1_id: when the initial line is cut, the line segment at side 1 will receive this ID (optional). - line1_name: when the initial line is cut, the line segment at side 1 will receive this name (optional). - line2_id: when the initial line is cut, the line segment at side 2 will receive this ID (optional). - line2_name: when the initial line is cut, the line segment at side 2 will receive this name (optional). + - line1_id: when the initial line is cut, the line segment at side 1 will receive this ID (optional). + - line1_name: when the initial line is cut, the line segment at side 1 will receive this name (optional). + - line2_id: when the initial line is cut, the line segment at side 2 will receive this ID (optional). + - line2_name: when the initial line is cut, the line segment at side 2 will receive this name (optional). + raise_exception: optionally, whether the calculation should throw exceptions. In any case, errors will - be logged. Default is False. + be logged. Default is False. reporter: optionally, the reporter to be used to create an execution report, default is None (no report). deprecated_bbs_or_bus_id: this argument is deprecated, use the dataframe instead deprecated_line_id: this argument is deprecated, use the dataframe instead @@ -729,15 +735,17 @@ def replace_tee_point_by_voltage_level_on_line(network: Network, deprecated_tee_ Args: network: the network in which the busbar sections are. df: Attributes as a dataframe. It should contain: - tee_point_line1: The ID of the existing line connecting the first voltage level to the tee point - tee_point_line2: The ID of the existing line connecting the tee point to the second voltage level - tee_point_line_to_remove: The ID of the existing line connecting the tee point to the attached voltage level - bbs_or_bus_id: The ID of the existing bus or bus bar section in the attached voltage level voltageLevelId, - where we want to connect the new lines new line 1 and new line 2 - new_line1_id: The ID of the new line connecting the first voltage level to the attached voltage level - new_line2_id: The ID of the new line connecting the second voltage level to the attached voltage level - new_line1_name: The optional name of the new line connecting the first voltage level to the attached voltage level - new_line2_name: The optional name of the new line connecting the second voltage level to the attached voltage level + + - tee_point_line1: The ID of the existing line connecting the first voltage level to the tee point + - tee_point_line2: The ID of the existing line connecting the tee point to the second voltage level + - tee_point_line_to_remove: The ID of the existing line connecting the tee point to the attached voltage level + - bbs_or_bus_id: The ID of the existing bus or bus bar section in the attached voltage level voltageLevelId, + where we want to connect the new lines new line 1 and new line 2 + - new_line1_id: The ID of the new line connecting the first voltage level to the attached voltage level + - new_line2_id: The ID of the new line connecting the second voltage level to the attached voltage level + - new_line1_name: The optional name of the new line connecting the first voltage level to the attached voltage level + - new_line2_name: The optional name of the new line connecting the second voltage level to the attached voltage level + raise_exception: whether an exception should be raised if a problem occurs. By default, false. reporter: an optional reporter to get functional logs. deprecated_tee_point_line1: this argument is deprecated, use the dataframe instead @@ -831,7 +839,8 @@ def create_voltage_level_topology(network: Network, df: DataFrame = None, raise_ Examples: .. code-block:: python - pp.network.create_voltage_level_topology(network=network, raise_exception=True, id='VL', + + pp.network.create_voltage_level_topology(network=network, raise_exception=True, id='VL', aligned_buses_or_busbar_count=3, switch_kinds='BREAKER, DISCONNECTOR') """ metadata = _pp.get_network_modification_metadata(NetworkModificationType.VOLTAGE_LEVEL_TOPOLOGY_CREATION) @@ -1054,8 +1063,8 @@ def create_line_bays(network: Network, df: DataFrame = None, raise_exception: bo Args: network: the network to which we want to add the new line df: Attributes as a dataframe. - raise_exception: optionally, whether the calculation should throw exceptions. In any case, errors will - be logged. Default is False. + raise_exception: optionally, whether the calculation should throw exceptions. In any case, errors will + be logged. Default is False. reporter: optionally, the reporter to be used to create an execution report, default is None (no report). kwargs: Attributes as keyword arguments. diff --git a/pypowsybl/sensitivity/impl/ac_sensitivity_analysis.py b/pypowsybl/sensitivity/impl/ac_sensitivity_analysis.py index 03cda46473..ed4aeb7f16 100644 --- a/pypowsybl/sensitivity/impl/ac_sensitivity_analysis.py +++ b/pypowsybl/sensitivity/impl/ac_sensitivity_analysis.py @@ -28,7 +28,7 @@ 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. + Use :meth:`add_bus_voltage_factor_matrix` instead. Defines buses voltage sensitivities to be computed. diff --git a/pypowsybl/sensitivity/impl/ac_sensitivity_analysis_result.py b/pypowsybl/sensitivity/impl/ac_sensitivity_analysis_result.py index 24d47a1621..f6e1d956bd 100644 --- a/pypowsybl/sensitivity/impl/ac_sensitivity_analysis_result.py +++ b/pypowsybl/sensitivity/impl/ac_sensitivity_analysis_result.py @@ -30,7 +30,7 @@ def get_bus_voltages_sensitivity_matrix(self, matrix_id: str = DEFAULT_MATRIX_ID Optional[pd.DataFrame]: """ .. deprecated:: 1.1.0 - Use :meth:`get_sensitivity_matrix` instead. + Use :meth:`get_sensitivity_matrix` instead. Get the matrix of bus voltages sensitivities on the base case or on post contingency state. @@ -47,7 +47,7 @@ def get_reference_voltages(self, matrix_id: str = DEFAULT_MATRIX_ID, contingency pd.DataFrame]: """ .. deprecated:: 1.1.0 - Use :meth:`get_reference_matrix` instead. + Use :meth:`get_reference_matrix` instead. The values of bus voltages on the base case or on post contingency state. diff --git a/pypowsybl/sensitivity/impl/dc_sensitivity_analysis_result.py b/pypowsybl/sensitivity/impl/dc_sensitivity_analysis_result.py index 0dfa4e1b6d..34b968172c 100644 --- a/pypowsybl/sensitivity/impl/dc_sensitivity_analysis_result.py +++ b/pypowsybl/sensitivity/impl/dc_sensitivity_analysis_result.py @@ -29,7 +29,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. + Use :meth:`get_sensitivity_matrix` instead. Get the matrix of branch flows sensitivities on the base case or on post contingency state. @@ -48,7 +48,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. + Use :meth:`get_reference_matrix` instead. The branches active power flows on the base case or on post contingency state. diff --git a/pypowsybl/sensitivity/impl/sensitivity.py b/pypowsybl/sensitivity/impl/sensitivity.py index cab37af1b9..7986914fe7 100644 --- a/pypowsybl/sensitivity/impl/sensitivity.py +++ b/pypowsybl/sensitivity/impl/sensitivity.py @@ -59,7 +59,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. + 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. diff --git a/requirements.txt b/requirements.txt index b9e0b63599..545324f0a7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,8 +6,8 @@ networkx matplotlib # documentation dependencies -sphinx==4.2.0 -pydata-sphinx-theme==0.6.3 +sphinx==5.0.2 +pydata-sphinx-theme==0.10.1 # CI dependencies wheel==0.38.1