Skip to content

Commit

Permalink
Merge branch 'main' into grid2op
Browse files Browse the repository at this point in the history
  • Loading branch information
geofjamg authored Jan 8, 2025
2 parents 82522cb + 3b549b2 commit 7a714fc
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ build/
*.pch

# Compiled Dynamic libraries
*.so
*.so*
*.dylib
*.dll

Expand Down
4 changes: 2 additions & 2 deletions docs/user_guide/flowdecomposition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,10 @@ You can mix everything together as you like.
branch_id contingency_id country1 country2 ac_reference_flow1 ac_reference_flow2 dc_reference_flow commercial_flow x_node_flow pst_flow internal_flow loop_flow_from_be loop_flow_from_fr
xnec_id
BLOAD 11 BLOAD 12 2 BLOAD 11 BLOAD 12 2 BE BE 3.005666 28.997253 -25.0 28.999015 0.0 -0.0 -1.999508 0.000000 -1.999508
BLOAD 11 BLOAD 12 2_FGEN 11 BLOAD 11 1 BLOAD 11 BLOAD 12 2 FGEN 11 BLOAD 11 1 BE BE 32.000000 0.000000 -0.0 0.000000 0.0 -0.0 0.000000 0.000000 0.000000
BLOAD 11 BLOAD 12 2_FGEN 11 BLOAD 11 1 BLOAD 11 BLOAD 12 2 FGEN 11 BLOAD 11 1 BE BE 32.000000 0.000000 -0.0 0.000000 0.0 0.0 0.000000 0.000000 -0.000000
FGEN 11 BLOAD 11 1 FGEN 11 BLOAD 11 1 FR BE 29.003009 -28.997170 25.0 28.999015 0.0 -0.0 0.000000 -1.999508 -1.999508
FGEN 11 BLOAD 12 1 FGEN 11 BLOAD 12 1 FR BE 87.009112 -86.982833 75.0 86.997046 0.0 0.0 0.000000 -5.998523 -5.998523
FGEN 11 BLOAD 12 1_FGEN 11 BLOAD 11 1 FGEN 11 BLOAD 12 1 FGEN 11 BLOAD 11 1 FR BE 116.016179 -115.969462 100.0 115.996062 0.0 -0.0 0.000000 -7.998031 -7.998031
FGEN 11 BLOAD 12 1_FGEN 11 BLOAD 11 1 FGEN 11 BLOAD 12 1 FGEN 11 BLOAD 11 1 FR BE 116.016179 -115.969462 100.0 115.996062 0.0 0.0 0.000000 -7.998031 -7.998031
FGEN 11 BLOAD 12 1_FGEN 11 BLOAD 11 1_BLOAD 1... FGEN 11 BLOAD 12 1 FGEN 11 BLOAD 11 1_BLOAD 11 BLOAD 12 2 FR BE 100.034531 -99.999797 100.0 115.996062 0.0 0.0 0.000000 -7.998031 -7.998031

Note: if one of our xnec is missing, it might be caused by a zero MW DC reference flow, you can show them by reducing the sensitivity-epsilon as bone before.
Expand Down
4 changes: 2 additions & 2 deletions docs/user_guide/sensitivity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Several matrix of sensitivity factors can be specified, in that case you must na
LOAD -0.5 -0.5
>>> result.get_sensitivity_matrix('m2')
NHV1_NHV2_1
GEN -0.0
GEN 0.0

Zone to slack sensitivity
^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -315,7 +315,7 @@ and postcontingency_branch_flow_factor_matrix methods.
LOAD -0.5 -0.5
>>> result.get_sensitivity_matrix('postcontingency', 'NHV1_NHV2_1')
NHV1_NHV2_1 NHV1_NHV2_2
GEN 0.0 -0.0
GEN 0.0 0.0

Advanced sensitivity analysis factors configuration
---------------------------------------------------
Expand Down
9 changes: 1 addition & 8 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,9 @@

<graalvm.version>23.0.0</graalvm.version>
<janino.version>3.1.0</janino.version>
<junit-jupiter.version>5.10.0</junit-jupiter.version>
<mapdb.version>3.0.8</mapdb.version>
<maven-dependency-plugin.version>3.6.0</maven-dependency-plugin.version>
<powsybl-dependencies.version>2024.3.1</powsybl-dependencies.version>
<powsybl-dependencies.version>2024.4.0</powsybl-dependencies.version>
<powsybl-open-reac.version>0.7.0</powsybl-open-reac.version>
<powsybl-core.version>6.7.0-SNAPSHOT</powsybl-core.version>
<zstdjni.version>1.5.5-3</zstdjni.version>
Expand Down Expand Up @@ -432,12 +431,6 @@
<artifactId>powsybl-commons-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pypowsybl/network/impl/perunit.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def sn(self) -> float:
"""
The base power, in MW, used for per-uniting
"""
return self._network.nominal_apparent_power()
return self._network.nominal_apparent_power

def get_buses(self) -> pd.DataFrame:
return self._network.get_buses()
Expand Down
4 changes: 2 additions & 2 deletions tests/test_loadflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ def test_run_lf_ac_2slacks():
sbr0 = results[0].slack_bus_results[0]
sbr1 = results[0].slack_bus_results[1]
assert 'VL4_0' == sbr0.id
assert abs(-0.75 - sbr0.active_power_mismatch) < 0.01
assert abs(-0.56 - sbr0.active_power_mismatch) < 0.01
assert 'VL2_0' == sbr1.id
assert abs(-0.75 - sbr1.active_power_mismatch) < 0.01
assert abs(-0.56 - sbr1.active_power_mismatch) < 0.01


def test_run_lf_dc():
Expand Down
1 change: 1 addition & 0 deletions tests/test_per_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def test_bus_per_unit():
pp.loadflow.run_ac(n)
with pytest.warns(DeprecationWarning, match=re.escape("Per-unit view is deprecated and slow (make a deep copy of the network), use per unit mode of the network instead")):
n = per_unit_view(n, 100)
assert n.sn == 100.0
buses = n.get_buses()
expected = pd.DataFrame(index=pd.Series(name='id', data=['VLGEN_0', 'VLHV1_0', 'VLHV2_0', 'VLLOAD_0']),
columns=['name', 'v_mag', 'v_angle', 'connected_component', 'synchronous_component',
Expand Down

0 comments on commit 7a714fc

Please sign in to comment.