Skip to content
Draft
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
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<module>data</module>
<module>distribution</module>
<module>loopflow-computation</module>
<module>pst-regulation</module>
<module>ra-optimisation</module>
<module>sensitivity-analysis</module>
<module>util</module>
Expand Down
98 changes: 98 additions & 0 deletions pst-regulation/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-open-rao</artifactId>
<version>7.2.0-SNAPSHOT</version>
</parent>

<artifactId>open-rao-pst-regulation</artifactId>
<packaging>jar</packaging>
<name>PST Regulation</name>
<description>Post-RAO PST regulatoin module</description>

<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>open-rao-rao-result-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>open-rao-rao-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>open-rao-util</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-open-loadflow</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>open-rao-sensitivity-analysis</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>open-rao-search-tree-rao</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.5.32</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-config-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-commons-test</artifactId>
<version>${powsybl.core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-iidm-impl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-ucte-converter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2025, RTE (http://www.rte-france.com)
* Copyright (c) 2026, RTE (http://www.rte-france.com)
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

package com.powsybl.openrao.searchtreerao.castor.algorithm.pstregulation;
package com.powsybl.openrao.pstregulation;

import com.powsybl.iidm.network.Branch;
import com.powsybl.iidm.network.Network;
Expand Down Expand Up @@ -43,9 +43,7 @@ public static ElementaryPstRegulationInput of(PstRangeAction pstRangeAction, Str
if (pstRangeAction.getNetworkElement().getId().equals(monitoredNetworkElement)) {
double thresholdOne = getMostLimitingThreshold(curativeFlowCnecs, TwoSides.ONE);
double thresholdTwo = getMostLimitingThreshold(curativeFlowCnecs, TwoSides.TWO);
return thresholdOne <= thresholdTwo ?
new ElementaryPstRegulationInput(pstRangeAction, TwoSides.ONE, thresholdOne) :
new ElementaryPstRegulationInput(pstRangeAction, TwoSides.TWO, thresholdTwo);
return thresholdOne <= thresholdTwo ? new ElementaryPstRegulationInput(pstRangeAction, TwoSides.ONE, thresholdOne) : new ElementaryPstRegulationInput(pstRangeAction, TwoSides.TWO, thresholdTwo);
}

// otherwise, the terminal in common with the element in series it monitors is used
Expand Down Expand Up @@ -103,7 +101,6 @@ private static Pair<TwoSides, TwoSides> getSidesOfCommonTerminal(PstRangeAction
}
}

throw new OpenRaoException("Two-windings transformer '%s' and branch '%s' do not share a common terminal so PST regulation cannot be performed."
.formatted(twoWindingsTransformerId, monitoredNetworkElement));
throw new OpenRaoException("Two-windings transformer '%s' and branch '%s' do not share a common terminal so PST regulation cannot be performed.".formatted(twoWindingsTransformerId, monitoredNetworkElement));
}
}
Loading
Loading