Skip to content

Commit

Permalink
Wrap metrix tutorial 6 nodes network (#694)
Browse files Browse the repository at this point in the history
Signed-off-by: Bertrand Rix <[email protected]>
  • Loading branch information
obrix authored Jan 30, 2024
1 parent 87b7004 commit 7e86732
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 0 additions & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-iidm-serde</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.powsybl</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.powsybl.iidm.network.test.FourSubstationsNodeBreakerWithExtensionsFactory;
import com.powsybl.iidm.network.impl.NetworkFactoryImpl;
import com.powsybl.iidm.network.test.*;
import com.powsybl.iidm.serde.test.MetrixTutorialSixBusesFactory;

import java.util.List;
import java.util.function.Supplier;
Expand Down Expand Up @@ -48,7 +49,8 @@ public class PyPowsyblNetworksProvider implements Networks.NetworksProvider {
factory("non_linear_shunt", (Supplier<Network>) ShuntTestCaseFactory::createNonLinear),
factory("security_analysis_test", () -> SecurityAnalysisTestNetworkFactory.create()),
factory("security_analysis_test_with_power_limits", () -> SecurityAnalysisTestNetworkFactory.createWithFixedPowerLimits()),
factory("security_analysis_test_with_current_limits", () -> SecurityAnalysisTestNetworkFactory.createWithFixedCurrentLimits())
factory("security_analysis_test_with_current_limits", () -> SecurityAnalysisTestNetworkFactory.createWithFixedCurrentLimits()),
factory("metrix_tutorial_six_buses", () -> MetrixTutorialSixBusesFactory.create())
);

@Override
Expand Down
1 change: 1 addition & 0 deletions pypowsybl/network/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
create_four_substations_node_breaker_network,
create_micro_grid_be_network,
create_micro_grid_nl_network,
create_metrix_tutorial_six_buses_network,
load,
load_from_string,
load_from_binary_buffer,
Expand Down
10 changes: 10 additions & 0 deletions pypowsybl/network/impl/network_creation_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,16 @@ def create_micro_grid_nl_network() -> Network:
return _create_network('micro_grid_nl')


def create_metrix_tutorial_six_buses_network() -> Network:
"""
Create an instance of metrix tutorial six buses test case
Returns:
a new instance of metrix tutorial six buses test case
"""
return _create_network('metrix_tutorial_six_buses')


def load(file: Union[str, PathLike], parameters: Dict[str, str] = None, reporter: Reporter = None) -> Network:
"""
Load a network from a file. File should be in a supported format.
Expand Down

0 comments on commit 7e86732

Please sign in to comment.