Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override network-store version to v1.15.0 #56

Merged
merged 4 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ public static Network create(NetworkFactory networkFactory) {
.setId("LINE1")
.setVoltageLevel1("VL1")
.setVoltageLevel2("VL2")
.setNode1(1)
.setNode2(2)
.setNode1(4)
.setNode2(3)
.setR(50)
.setX(20)
.setG1(12)
Expand Down Expand Up @@ -314,7 +314,7 @@ public static Network create(NetworkFactory networkFactory) {
.setRatedU0(234)
.newLeg1()
.setVoltageLevel("VL2")
.setNode(1)
.setNode(4)
.setR(45)
.setX(35)
.setG(25)
Expand Down Expand Up @@ -480,7 +480,7 @@ public static Network create(NetworkFactory networkFactory) {

ShuntCompensator shunt2 = vl2.newShuntCompensator()
.setId("SHUNT2")
.setNode(3)
.setNode(5)
.setVoltageRegulatorOn(false)
.setTargetDeadband(20)
.setTargetV(420)
Expand All @@ -504,7 +504,7 @@ public static Network create(NetworkFactory networkFactory) {

Battery battery = vl1.newBattery()
.setId("battery")
.setNode(4)
.setNode(5)
.setTargetP(50)
.setTargetQ(10)
.setMinP(40)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,9 @@ private Network createExtensionsNetwork(NetworkFactory networkFactory) {
assertEquals(ConnectablePosition.Direction.TOP, cptwt2.getFeeder2().getDirection());

ThreeWindingsTransformer twt3 = s1.newThreeWindingsTransformer().setId("TWT3")
.setName("Three windings transformer 1").setRatedU0(234).newLeg1().setVoltageLevel("v1").setNode(1)
.setR(45).setX(35).setG(25).setB(15).setRatedU(5).add().newLeg2().setVoltageLevel("v2").setNode(1)
.setR(47).setX(37).setG(27).setB(17).setRatedU(7).add().newLeg3().setVoltageLevel("v3").setNode(1)
.setName("Three windings transformer 1").setRatedU0(234).newLeg1().setVoltageLevel("v1").setNode(3)
.setR(45).setX(35).setG(25).setB(15).setRatedU(5).add().newLeg2().setVoltageLevel("v2").setNode(2)
.setR(47).setX(37).setG(27).setB(17).setRatedU(7).add().newLeg3().setVoltageLevel("v3").setNode(2)
.setR(49).setX(39).setG(29).setB(19).setRatedU(9).add().add();
twt3.newExtension(ConnectablePositionAdder.class).newFeeder1().withName("twt3.1").withOrder(3)
.withDirection(ConnectablePosition.Direction.BOTTOM).add().newFeeder2().withName("twt3.2").withOrder(3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public void visitGenerator(Generator generator) {

VoltageLevel voltageLevel1 = network.getVoltageLevel("n1_voltageLevel1");
assertEquals(6, voltageLevel1.getNodeBreakerView().getMaximumNodeIndex());
assertArrayEquals(new int[] {5, 2, 0, 1, 3, 6}, voltageLevel1.getNodeBreakerView().getNodes());
assertArrayEquals(new int[] {0, 1, 2, 3, 5, 6}, voltageLevel1.getNodeBreakerView().getNodes());
assertNotNull(voltageLevel1.getNodeBreakerView().getTerminal(2));
assertNull(voltageLevel1.getNodeBreakerView().getTerminal(4));
List<Integer> traversedNodes = new ArrayList<>();
Expand Down Expand Up @@ -1358,7 +1358,7 @@ public void threeWindingsTransformerTest() {
assertEquals(28, threeWindingsTransformer.getTerminal(ThreeSides.TWO).getQ(), 0.1);
assertEquals(18, threeWindingsTransformer.getTerminal(ThreeSides.THREE).getQ(), 0.1);

assertEquals(1, threeWindingsTransformer.getTerminal(ThreeSides.ONE).getNodeBreakerView().getNode());
assertEquals(4, threeWindingsTransformer.getTerminal(ThreeSides.ONE).getNodeBreakerView().getNode());
assertEquals(2, threeWindingsTransformer.getTerminal(ThreeSides.TWO).getNodeBreakerView().getNode());
assertEquals(3, threeWindingsTransformer.getTerminal(ThreeSides.THREE).getNodeBreakerView().getNode());

Expand Down Expand Up @@ -2560,7 +2560,7 @@ public void configuredBusTest() {

assertEquals("networkTestCase", readNetwork.getId());

assertEquals(13, readNetwork.getBusBreakerView().getBusStream().collect(Collectors.toList()).size());
assertEquals(16, readNetwork.getBusBreakerView().getBusStream().collect(Collectors.toList()).size());
assertEquals(2, readNetwork.getBusBreakerView().getBusStream().filter(b -> b instanceof ConfiguredBusImpl).count());
Bus bus1 = readNetwork.getBusBreakerView().getBus("BUS5");
Bus bus2 = readNetwork.getBusBreakerView().getBus("BUS6");
Expand Down
20 changes: 20 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
<sirocco.version>1.0</sirocco.version>

<powsybl-ws-dependencies.version>2.12.0</powsybl-ws-dependencies.version>
<!-- FIXME: powsybl-network-store modules'version is overloaded in the dependencies section.The overloads and this property below have to be removed at next powsybl-ws-dependencies.version upgrade -->
<powsybl-network-store.version>1.15.0</powsybl-network-store.version>

<!-- FIXME : to remove when sonar version is updated on github actions -->
<!-- https://community.sonarsource.com/t/stackoverflowerror-at-defaultinputcomponent-equals/20324 -->
Expand All @@ -75,6 +77,24 @@
<dependencyManagement>
<dependencies>
<!-- overrides of imports -->
<!-- FIXME: to be removed at next powsybl-ws-dependencies upgrade -->
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-network-store-iidm-impl</artifactId>
<version>${powsybl-network-store.version}</version>
</dependency>
<!-- FIXME: to be removed at next powsybl-ws-dependencies upgrade -->
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-network-store-client</artifactId>
<version>${powsybl-network-store.version}</version>
</dependency>
<!-- FIXME: to be removed at next powsybl-ws-dependencies upgrade -->
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-network-store-model</artifactId>
<version>${powsybl-network-store.version}</version>
</dependency>

<!-- imports -->
<dependency>
Expand Down
Loading