diff --git a/docs/user_guide/dynamic.rst b/docs/user_guide/dynamic.rst
index c289603687..7cfe5e01a8 100644
--- a/docs/user_guide/dynamic.rst
+++ b/docs/user_guide/dynamic.rst
@@ -48,7 +48,7 @@ Here is an example of a simple config.yaml file. It uses the same configurations
Parameters
----------
-To make a dynamic simulation, you need multiple things :
+To make a dynamic simulation, you need multiple things:
1. A dynamic mapping, it links the static elements (generators, loads, lines) to their dynamic behavior (alpha beta load)
2. A curve mapping, it records the given values to be watch by the simulation tool. Curves are the output of the simulation
diff --git a/docs/user_guide/loadflow.rst b/docs/user_guide/loadflow.rst
index 830dc13936..4d422dfa62 100644
--- a/docs/user_guide/loadflow.rst
+++ b/docs/user_guide/loadflow.rst
@@ -55,7 +55,7 @@ Let's have a look at the default ones:
For more details on each parameter, please refer to the :doc:`API reference `.
-All parameters are also fully described in `Powsybl loadfow parameter documentation `_.
+All parameters are also fully described in `Powsybl load flow parameters documentation `_.
Parameters specific to a provider
---------------------------------
@@ -73,7 +73,7 @@ We can list supported parameters specific to default provider using:
>>> lf.get_provider_parameters_names()
['slackBusSelectionMode', 'slackBusesIds', 'lowImpedanceBranchMode', 'voltageRemoteControl', ...]
-And get more detailed informations about theses parameters using:
+And get more detailed information about theses parameters using:
.. doctest::
:options: +NORMALIZE_WHITESPACE
@@ -109,8 +109,8 @@ included in the computation:
>>> results
[ComponentResult(connected_component_num=0, synchronous_component_num=0, status=CONVERGED, iteration_count=3, slack_bus_id='VLHV1_0', slack_bus_active_power_mismatch=-606.5596837558763, distributed_active_power=0.0)]
-Component results provides general information about the loadflow: was it successful ? how many iterations did
-it need ? what's the remaining active power imbalance ? For example, let's have a look at the imbalance
+Component results provides general information about the loadflow execution: was it successful? How many iterations did
+it need? What is the remaining active power imbalance? For example, let's have a look at the imbalance
on the main component of the network:
.. doctest::
@@ -136,7 +136,7 @@ the voltage magnitudes (rounded to 2 digits here):
DC Load Flow
------------
-In order to run an AC loadflow, simply use the :func:`run_dc` method.
+In order to run a DC loadflow, simply use the :func:`run_dc` method.
For that example, we will use a distributed slack, with imbalance distributed on generators,
proportional to their maximum power. We also choose to ignore transformer ratios in the DC equations:
diff --git a/docs/user_guide/network.rst b/docs/user_guide/network.rst
index d639ee108e..f1d36aa352 100644
--- a/docs/user_guide/network.rst
+++ b/docs/user_guide/network.rst
@@ -11,7 +11,7 @@ The network model
The :class:`Network` object is the main data structure of pypowsybl.
-It contains all the data of a power network : substations, generators, lines,
+It contains all the data of a power network: substations, generators, lines,
transformers, ...
pypowsybl provides methods to create networks, and to access and modify their data.
@@ -21,13 +21,13 @@ Create a network
----------------
pypowsybl provides several factory methods to create well known network models.
-For example, you can create the IEEE 9-bus network case :
+For example, you can create the IEEE 9-bus network case:
.. doctest::
>>> network = pp.network.create_ieee9()
-Another common way of creating a network is to load it from a file :
+Another common way of creating a network is to load it from a file:
.. code-block:: python
@@ -136,7 +136,7 @@ For example, you can retrieve generators data as follows:
GEN2 OTHER 607.0 -9999.99 4999.0 -1.797693e+308 1.797693e+308 NaN MIN_MAX 24.5 301.0 True GEN2 NaN NaN NaN VLGEN VLGEN_0 True
Most dataframes are indexed on the ID of the elements.
-However, some more complex dataframes have a multi-index : for example,
+However, some more complex dataframes have a multi-index: for example,
ratio and phase tap changer steps are indexed on their transformer ID together with
the step position:
@@ -209,7 +209,7 @@ Basic topology changes
----------------------
Most elements dataframes contain information about "is this element connected?" and "where is it connected?".
-That information appears as the ``connected`` and ``bus_id`` columns :
+That information appears as the ``connected`` and ``bus_id`` columns:
.. doctest::
diff --git a/docs/user_guide/network_visualization.rst b/docs/user_guide/network_visualization.rst
index de88e78994..76fdf39100 100644
--- a/docs/user_guide/network_visualization.rst
+++ b/docs/user_guide/network_visualization.rst
@@ -65,7 +65,7 @@ Note that similarly to single-line diagrams, a loadflow can be run before writin
>>> result = pp.loadflow.run_ac(network)
>>> network.write_network_area_diagram_svg('ieee9.svg')
-Network-area diagrams can be customized through NadParameters :
+Network-area diagrams can be customized through NadParameters:
.. code-block:: python
@@ -80,7 +80,7 @@ Network-area diagrams can be customized through NadParameters :
- current_value_precision: number of digits after the decimal point for current values (default value 0)
- voltage_value_precision: number of digits after the decimal point for voltage values(default value 1)
- bus_legend: if true, angle and voltage values associated to a voltage level are displayed in a text box. If false, only the voltage level name is displayed (default value true)
- - substation_description_displayed : if true, the substation name is added to the voltage level info on the diagram (default value false)
+ - substation_description_displayed: if true, the substation name is added to the voltage level info on the diagram (default value false)
In order to get a list of the displayed voltage levels from an input voltage level (or an input list of voltage levels) and a depth:
diff --git a/docs/user_guide/security.rst b/docs/user_guide/security.rst
index 5071f960ca..1da6ced933 100644
--- a/docs/user_guide/security.rst
+++ b/docs/user_guide/security.rst
@@ -21,7 +21,7 @@ AC security analysis
To perform a security analysis, you need at least a network and a contingency on this network.
In the result there are violations detected with the initial loadflow on the network.
These violations are collected in pre_contingency_result. The results contain also
-the violations created by the contingency, they are collected by contingency in post_contingency_results :
+the violations created by the contingency, they are collected by contingency in post_contingency_results:
.. doctest::
:options: +NORMALIZE_WHITESPACE
@@ -128,7 +128,7 @@ The following example define a switch closing action with id 'SwitchAction' on t
To enable the application of the action you need to define an operator strategy and add the action to it.
An operator strategy is a set of actions to be applied after the simulation of a contingency.
It is defined with an unique id, a reference to the id of the contingency, a list action ids and a condition.
-The following operator strategy define the application of the switch action 'SwitchAction' after 'Breaker contingency' with the 'True' condition (always applied) :
+The following operator strategy define the application of the switch action 'SwitchAction' after 'Breaker contingency' with the 'True' condition (always applied):
.. doctest::
:options: +NORMALIZE_WHITESPACE
diff --git a/docs/user_guide/sensitivity.rst b/docs/user_guide/sensitivity.rst
index 55e7896b34..65529778a8 100644
--- a/docs/user_guide/sensitivity.rst
+++ b/docs/user_guide/sensitivity.rst
@@ -28,7 +28,7 @@ as a result:
NHV1_NHV2_1 NHV1_NHV2_2
LOAD -0.5 -0.5
-Several matrix of sensitivity factors can be specified, in that case you must name your matrix at creation and reuse this name to query you results :
+Several matrix of sensitivity factors can be specified, in that case you must name your matrix at creation and reuse this name to query you results:
.. doctest::
@@ -180,7 +180,7 @@ Shift keys from UCTE glsk files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alternatively zones can also be created with weighted injections defined in ucte GLSK files. Two ways of creating zones are available.
-The first one use a glsk file and create a list of Zone objects with all the areas defined within :
+The first one use a glsk file and create a list of Zone objects with all the areas defined within:
.. code-block:: python
@@ -192,7 +192,7 @@ The first one use a glsk file and create a list of Zone objects with all the are
>>> sa.add_branch_flow_factor_matrix(['BBE2AA1 FFR3AA1 1'], ['10YCB-GERMANY--8'], 'm')
>>> results = sa.run(n, params)
-The second one allows a more refined zone creation by separating the glsk file data loading and the zone creation :
+The second one allows a more refined zone creation by separating the glsk file data loading and the zone creation:
.. code-block:: python
diff --git a/pypowsybl/dynamic/impl/event_mapping.py b/pypowsybl/dynamic/impl/event_mapping.py
index fc78bf721c..d2ce1ec276 100644
--- a/pypowsybl/dynamic/impl/event_mapping.py
+++ b/pypowsybl/dynamic/impl/event_mapping.py
@@ -24,8 +24,8 @@ def add_branch_disconnection(self, static_id: str, event_time: float, disconnect
Args:
static_id (str): network element to disconnect
event_time (float): timestep at which the event happens
- disconnect_origin (bool) : the disconnection is made at the origin
- disconnect_extremity (bool) : the disconnection is made at the extremity
+ disconnect_origin (bool): the disconnection is made at the origin
+ disconnect_extremity (bool): the disconnection is made at the extremity
"""
_pp.add_event_branch_disconnection(
self._handle, static_id, event_time, disconnect_origin, disconnect_extremity)
diff --git a/pypowsybl/dynamic/impl/model_mapping.py b/pypowsybl/dynamic/impl/model_mapping.py
index b4355046f4..0509125cbc 100644
--- a/pypowsybl/dynamic/impl/model_mapping.py
+++ b/pypowsybl/dynamic/impl/model_mapping.py
@@ -106,7 +106,7 @@ def add_all_dynamic_mappings(self, mapping_type: DynamicMappingType, mapping_df:
"""
Update the dynamic mapping of a simulation, must provide a :class:`~pandas.DataFrame` or as named arguments.
- | The dataframe must contains these three columns :
+ | The dataframe must contains these three columns:
| - static_id: id of the network element to map
| - parameter_set_id: set id in the parameter file
| - mapping_type: value of enum DynamicMappingType
diff --git a/pypowsybl/network/impl/network.py b/pypowsybl/network/impl/network.py
index 9fa84f083a..aa849a48eb 100644
--- a/pypowsybl/network/impl/network.py
+++ b/pypowsybl/network/impl/network.py
@@ -534,7 +534,7 @@ def get_generators(self, all_attributes: bool = False, attributes: List[str] = N
- **min_q_at_target_p** (optional): the minimum reactive value for the generator for the target p specified (MVar)
- **max_q_at_p** (optional): the maximum reactive value for the generator at current p (MVar)
- **min_q_at_p** (optional): the minimum reactive value for the generator at current p (MVar)
- - **rated_s** : The rated nominal power (MVA)
+ - **rated_s**: The rated nominal power (MVA)
- **reactive_limits_kind**: type of the reactive limit of the generator (can be MIN_MAX, CURVE or NONE)
- **target_v**: the target voltage magnitude value for the generator (in kV)
- **target_q**: the target reactive value for the generator (in MVAr)
@@ -2373,7 +2373,7 @@ def update_generators(self, df: DataFrame = None, **kwargs: ArrayLike) -> None:
- `target_v`
- `target_q`
- `voltage_regulator_on`
- - `regulated_element_id` : you may define any injection or busbar section as the regulated location.
+ - `regulated_element_id`: you may define any injection or busbar section as the regulated location.
Only supported in node breaker voltage levels.
- `p`
- `q`
@@ -3083,7 +3083,7 @@ def update_terminals(self, df: DataFrame = None, **kwargs: ArrayLike) -> None:
Notes:
Attributes that can be updated are :
- - `connected` : element_side must be provided if it is a sided network element
+ - `connected`: element_side must be provided if it is a sided network element
See Also:
:meth:`get_terminals`
@@ -4191,7 +4191,7 @@ def create_operational_limits(self, df: DataFrame = None, **kwargs: ArrayLike) -
- **type**: the type of limit to be created (CURRENT, APPARENT_POWER, ACTIVE_POWER)
- **value**: the value of the limit in A, MVA or MW
- **acceptable_duration**: the maximum number of seconds during which we can operate under that limit
- - **is_fictitious** : fictitious limit ?
+ - **is_fictitious**: fictitious limit ?
For each location of the network defined by a couple (element_id, side):
diff --git a/pypowsybl/security/impl/parameters.py b/pypowsybl/security/impl/parameters.py
index e7870783a1..cb24d47b66 100644
--- a/pypowsybl/security/impl/parameters.py
+++ b/pypowsybl/security/impl/parameters.py
@@ -13,22 +13,22 @@
class Parameters: # pylint: disable=too-few-public-methods
"""
- Parameters for a sensitivity analysis execution.
+ Parameters for a security analysis execution.
All parameters are first read from you configuration file, then overridden with
the constructor arguments.
- Please note that sensitivity analysis providers may not honor all parameters, according to their capabilities.
+ Please note that security analysis providers may not honor all parameters, according to their capabilities.
For example, some providers will not be able to simulate the voltage control of shunt compensators, etc.
- The exact behaviour of some parameters may also depend on your sensitivity analysis provider.
+ The exact behaviour of some parameters may also depend on your security analysis provider.
Please check the documentation of your provider for that information.
- .. currentmodule:: pypowsybl.sensitivity
+ .. currentmodule:: pypowsybl.security
Args:
- load_flow_parameters: parameters that are common to loadflow and sensitivity analysis
+ load_flow_parameters: parameters that are common to loadflow and security analysis
increased_violations_parameters: Define what violations should be considered increased between N and contingency situations
- provider_parameters: Define parameters linked to the sensitivity analysis provider
+ provider_parameters: Define parameters linked to the security analysis provider
the names of the existing parameters can be found with method ``get_provider_parameters_names``
"""
diff --git a/pypowsybl/security/impl/security.py b/pypowsybl/security/impl/security.py
index a353baa3f9..b4b8e69343 100644
--- a/pypowsybl/security/impl/security.py
+++ b/pypowsybl/security/impl/security.py
@@ -21,7 +21,7 @@
class SecurityAnalysis(ContingencyContainer):
"""
- Allows to run a sensitivity analysis on a network.
+ Allows to run a security analysis on a network.
"""
def __init__(self, handle: _pypowsybl.JavaHandle):
@@ -29,16 +29,16 @@ def __init__(self, handle: _pypowsybl.JavaHandle):
def run_ac(self, network: Network, parameters: Union[Parameters, pypowsybl.loadflow.Parameters] = None,
provider: str = '', reporter: Reporter = None) -> SecurityAnalysisResult:
- """ Runs an AC sensitivity analysis.
+ """ Runs an AC security analysis.
Args:
- network: Network on which the sensitivity analysis will be computed
+ network: Network on which the security analysis will be computed
parameters: Security analysis parameters
- provider: Name of the sensitivity analysis implementation provider to be used,
+ provider: Name of the security analysis implementation provider to be used,
will use default provider if empty.
Returns:
- A sensitivity analysis result, containing information about violations and monitored elements
+ A security analysis result, containing information about violations and monitored elements
"""
security_parameters = Parameters(load_flow_parameters=parameters) if isinstance(parameters,
pypowsybl.loadflow.Parameters) else parameters
@@ -49,16 +49,16 @@ def run_ac(self, network: Network, parameters: Union[Parameters, pypowsybl.loadf
def run_dc(self, network: Network, parameters: Union[Parameters, pypowsybl.loadflow.Parameters] = None,
provider: str = '', reporter: Reporter = None) -> SecurityAnalysisResult:
- """ Runs an DC sensitivity analysis.
+ """ Runs a DC security analysis.
Args:
- network: Network on which the sensitivity analysis will be computed
+ network: Network on which the security analysis will be computed
parameters: Security analysis parameters
- provider: Name of the sensitivity analysis implementation provider to be used,
+ provider: Name of the security analysis implementation provider to be used,
will use default provider if empty.
Returns:
- A sensitivity analysis result, containing information about violations and monitored elements
+ A security analysis result, containing information about violations and monitored elements
"""
security_parameters = Parameters(load_flow_parameters=parameters) if isinstance(parameters,
pypowsybl.loadflow.Parameters) else parameters
@@ -73,7 +73,7 @@ def add_monitored_elements(self, contingency_context_type: ContingencyContextTyp
branch_ids: List[str] = None,
voltage_level_ids: List[str] = None,
three_windings_transformer_ids: List[str] = None) -> None:
- """ Add elements to be monitored by the sensitivity analysis. The sensitivity analysis result
+ """ Add elements to be monitored by the security analysis. The security analysis result
will provide additional information for those elements, like the power and current values.
Args:
@@ -107,7 +107,7 @@ def add_precontingency_monitored_elements(self,
branch_ids: List[str] = None,
voltage_level_ids: List[str] = None,
three_windings_transformer_ids: List[str] = None) -> None:
- """ Add elements to be monitored by the sensitivity analysis on precontingency state. The sensitivity analysis result
+ """ Add elements to be monitored by the security analysis on precontingency state. The security analysis result
will provide additional information for those elements, like the power and current values.
Args:
@@ -124,8 +124,8 @@ def add_postcontingency_monitored_elements(self, contingency_ids: Union[List[str
branch_ids: List[str] = None,
voltage_level_ids: List[str] = None,
three_windings_transformer_ids: List[str] = None) -> None:
- """ Add elements to be monitored by the sensitivity analysis for specific contingencies.
- The sensitivity analysis result will provide additional information for those elements, like the power and current values.
+ """ Add elements to be monitored by the security analysis for specific contingencies.
+ The security analysis result will provide additional information for those elements, like the power and current values.
Args:
contingency_ids: list of contingencies for which we want to monitor additional elements
diff --git a/pypowsybl/security/impl/security_analysis_result.py b/pypowsybl/security/impl/security_analysis_result.py
index 9fc91eef1d..92329e901d 100644
--- a/pypowsybl/security/impl/security_analysis_result.py
+++ b/pypowsybl/security/impl/security_analysis_result.py
@@ -14,7 +14,7 @@
class SecurityAnalysisResult:
"""
- The result of a sensitivity analysis.
+ The result of a security analysis.
"""
def __init__(self, handle: _pypowsybl.JavaHandle):
diff --git a/pypowsybl/security/impl/util.py b/pypowsybl/security/impl/util.py
index 2f76c4812a..08c9daec6b 100644
--- a/pypowsybl/security/impl/util.py
+++ b/pypowsybl/security/impl/util.py
@@ -12,37 +12,37 @@
def create_analysis() -> SecurityAnalysis:
- """ Creates a sensitivity analysis objet, which can be used to run a sensitivity analysis on a network
+ """ Creates a security analysis objet, which can be used to run a security analysis on a network
Examples:
.. code-block::
- >>> analysis = pypowsybl.sensitivity.create_analysis()
+ >>> analysis = pypowsybl.security.create_analysis()
>>> analysis.add_single_element_contingencies(['line 1', 'line 2'])
>>> res = analysis.run_ac(network)
Returns:
- A sensitivity analysis object, which allows to run a sensitivity analysis on a network.
+ A security analysis object, which allows to run a security analysis on a network.
"""
return SecurityAnalysis(_pypowsybl.create_security_analysis())
def set_default_provider(provider: str) -> None:
"""
- Set the default sensitivity analysis provider.
+ Set the default security analysis provider.
Args:
- provider: name of the default sensitivity analysis provider to set
+ provider: name of the default security analysis provider to set
"""
_pypowsybl.set_default_security_analysis_provider(provider)
def get_default_provider() -> str:
"""
- Get the current default sensitivity analysis provider.
+ Get the current default security analysis provider.
Returns:
- the name of the current default sensitivity analysis provider
+ the name of the current default security analysis provider
"""
return _pypowsybl.get_default_security_analysis_provider()
@@ -59,7 +59,7 @@ def get_provider_names() -> List[str]:
def get_provider_parameters_names(provider: str = '') -> List[str]:
"""
- Get list of parameters for the specified sensitivity analysis provider.
+ Get list of parameters for the specified security analysis provider.
If not specified the provider will be the default one.
diff --git a/pypowsybl/sensitivity/impl/util.py b/pypowsybl/sensitivity/impl/util.py
index 8b26ff96cb..d3604e6289 100644
--- a/pypowsybl/sensitivity/impl/util.py
+++ b/pypowsybl/sensitivity/impl/util.py
@@ -65,9 +65,9 @@ def create_country_zone(network: Network, country: str,
def create_zone_from_injections_and_shift_keys(id: str, injection_index: List[str], shift_keys: List[float]) -> Zone:
""" Create country zone with custom generator name and shift keys
Args:
- country : Identifier of the zone
- injection_index : IDs of the injection
- shift_keys : shift keys for the generators
+ country: Identifier of the zone
+ injection_index: IDs of the injection
+ shift_keys: shift keys for the generators
Returns:
The zone object
"""
@@ -78,8 +78,8 @@ def create_zone_from_injections_and_shift_keys(id: str, injection_index: List[st
def create_zones_from_glsk_file(network: Network, glsk_file: str, instant: datetime) -> List[Zone]:
""" Create country zones from glsk file for a given datetime
Args:
- glsk_file : UCTE glsk file
- instant : timepoint at which to select glsk data
+ glsk_file: UCTE glsk file
+ instant: timepoint at which to select glsk data
Returns:
A list of zones created from glsk file
"""
diff --git a/pypowsybl/utils/impl/dataframes.py b/pypowsybl/utils/impl/dataframes.py
index a2b0bbdf13..21861a107b 100644
--- a/pypowsybl/utils/impl/dataframes.py
+++ b/pypowsybl/utils/impl/dataframes.py
@@ -162,7 +162,7 @@ def _adapt_properties_kwargs(**kwargs: _ArrayLike) -> DataFrame:
if expected_size is None:
expected_size = size
elif size != expected_size:
- raise ValueError(f'properties creation/update : all arguments must have the same size, '
+ raise ValueError(f'properties creation/update: all arguments must have the same size, '
f'got size {size} for series {key}, expected {expected_size}')
columns[key] = col
index_name = 'id'