Skip to content

Commit 149dc1d

Browse files
authored
Miscellaneous doc fixes (#1130)
Signed-off-by: Hugo KULESZA <[email protected]>
1 parent 4e88748 commit 149dc1d

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

docs/user_guide/loadflow.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,33 +110,33 @@ AC Load Flow
110110

111111
In order to run an AC loadflow, simply use the :func:`run_ac` method:
112112

113-
.. doctest::
113+
.. doctest:: +ELLIPSIS
114114

115115
>>> network = pn.create_eurostag_tutorial_example1_network()
116116
>>> results = lf.run_ac(network, parameters=lf.Parameters(distributed_slack=False))
117117

118118
The result is composed of a list of component results, one for each connected component of the network
119119
included in the computation:
120120

121-
.. doctest::
121+
.. doctest:: +ELLIPSIS
122122

123123
>>> results
124-
[ComponentResult(connected_component_num=0, synchronous_component_num=0, status=CONVERGED, status_text=Converged, iteration_count=3, reference_bus_id='VLHV1_0', slack_bus_results=[SlackBusResult(id='VLHV1_0', active_power_mismatch=-606.5596837558767)], distributed_active_power=0.0)]
124+
[ComponentResult(connected_component_num=0, synchronous_component_num=0, status=CONVERGED, status_text=Converged, iteration_count=3, reference_bus_id='VLHV1_0', slack_bus_results=[SlackBusResult(id='VLHV1_0', active_power_mismatch=-606.5596...)], distributed_active_power=0.0)]
125125

126126
Component results provides general information about the loadflow execution: was it successful? How many iterations did
127127
it need? What is the remaining active power imbalance? For example, let's have a look at the imbalance
128128
on the main component of the network:
129129

130-
.. doctest::
130+
.. doctest:: +ELLIPSIS
131131

132132
>>> results[0].slack_bus_results[0].active_power_mismatch
133-
-606.5596837558767
133+
-606.5596...
134134

135135
Then, the main output of the loadflow is actually the updated data in the network itself:
136136
all voltages and flows are now updated with the computed values. For example you can have a look at
137137
the voltage magnitudes (rounded to 2 digits here):
138138

139-
.. doctest::
139+
.. doctest:: +ELLIPSIS
140140

141141
>>> network.get_buses().v_mag.round(2)
142142
id

java/pypowsybl/src/main/java/com/powsybl/dataframe/network/extensions/LoadDetailDataframeProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public String getExtensionName() {
4040
@Override
4141
public ExtensionInformation getExtensionInformation() {
4242
return new ExtensionInformation(LoadDetail.NAME, "Provides active power setpoint and reactive power setpoint for a load",
43-
"index : id (str), fixed_p (float), variable_p (float), fixed_q (float), variable_q (float)");
43+
"index : id (str), fixed_p0 (float), variable_p0 (float), fixed_q0 (float), variable_q0 (float)");
4444
}
4545

4646
private Stream<LoadDetail> itemsStream(Network network) {

pypowsybl/network/impl/network.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def nominal_apparent_power(self, value: float) -> None:
127127
@property
128128
def per_unit(self) -> bool:
129129
"""
130-
The nominal power to per unit the network (kVA)
130+
Defines if the network data should be used in per-unit.
131131
"""
132132
return self._per_unit
133133

@@ -1717,7 +1717,8 @@ def get_tie_lines(self, all_attributes: bool = False, attributes: Optional[List[
17171717
17181718
- **dangling_line1_id**: The ID of the first dangling line
17191719
- **dangling_line2_id**: The ID of the second dangling line
1720-
- **ucte_xnode_code**: The UCTE xnode code of the tie line, obtained from the dangling lines.
1720+
- **pairing_key**: the pairing key of the tie line, obtained from the dangling lines.
1721+
- **ucte_xnode_code**: deprecated for **pairing_key**.
17211722
- **fictitious** (optional): ``True`` if the tie line is part of the model and not of the actual network
17221723
17231724
This dataframe is indexed by the id of the dangling lines
@@ -4389,7 +4390,7 @@ def get_operational_limits(self, all_attributes: bool = False, attributes: Optio
43894390
The resulting dataframe, depending on the parameters, will have some of the following columns:
43904391
43914392
- **element_id**: Identifier of the network element on which this limit applies (could be for example
4392-
a line or a transformer). This is the index column.
4393+
a line or a transformer)
43934394
- **element_type**: Type of the network element on which this limit applies (LINE, TWO_WINDINGS_TRANSFORMER,
43944395
THREE_WINDINGS_TRANSFORMER, DANGLING_LINE)
43954396
- **side**: The side of the element on which this limit applies (ONE, TWO, THREE)
@@ -4402,6 +4403,8 @@ def get_operational_limits(self, all_attributes: bool = False, attributes: Optio
44024403
- **group_name** (optional): The name of the operational limit group this limit is in
44034404
- **selected** (optional): `True` if this limit's operational group is the selected one
44044405
4406+
The index of the dataframe is composed of the columns **element_id**, **side**, **type**, **acceptable_duration** and **group_name**.
4407+
44054408
Args:
44064409
all_attributes: flag for including all attributes in the dataframe, default is false
44074410
attributes: attributes to include in the dataframe. The 2 parameters are mutually

tests/test_network_extensions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ def test_get_extensions_information():
611611
'attributes'] == 'index : id (str), observable (bool), p_standard_deviation (float), p_redundant (bool), q_standard_deviation (float), q_redundant (bool), v_standard_deviation (float), v_redundant (bool)'
612612
assert extensions_information.loc['detail']['detail'] == 'Provides active power setpoint and reactive power setpoint for a load'
613613
assert extensions_information.loc['detail'][
614-
'attributes'] == 'index : id (str), fixed_p (float), variable_p (float), fixed_q (float), variable_q (float)'
614+
'attributes'] == 'index : id (str), fixed_p0 (float), variable_p0 (float), fixed_q0 (float), variable_q0 (float)'
615615
assert extensions_information.loc['hvdcOperatorActivePowerRange']['detail'] == ''
616616
assert extensions_information.loc['hvdcOperatorActivePowerRange']['attributes'] == 'index : id (str), opr_from_cs1_to_cs2 (float), opr_from_cs2_to_cs1 (float)'
617617
assert extensions_information.loc['activePowerControl']['detail'] == 'Provides information about the participation of generators to balancing'

0 commit comments

Comments
 (0)