Skip to content

Commit db5730a

Browse files
committed
Merge branch 'other_ptdf_sum_fix' of https://github.com/powsybl/open-rao into other_ptdf_sum_fix
2 parents 962973c + 9a8b6e3 commit db5730a

58 files changed

Lines changed: 4439 additions & 223 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

data/crac/crac-impl/src/main/java/com/powsybl/openrao/data/crac/impl/NetworkActionImpl.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,17 @@ public int hashCode() {
9999
return super.hashCode();
100100
}
101101

102+
public static NetworkAction copyWithNewId(NetworkAction networkAction, String newId) {
103+
return new NetworkActionImpl(
104+
newId,
105+
networkAction.getName(),
106+
networkAction.getOperator(),
107+
networkAction.getUsageRules(),
108+
networkAction.getElementaryActions(),
109+
networkAction.getSpeed().orElse(null),
110+
networkAction.getActivationCost().orElse(null),
111+
networkAction.getNetworkElements()
112+
);
113+
}
114+
102115
}

data/crac/crac-impl/src/test/java/com/powsybl/openrao/data/crac/impl/NetworkActionImplTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,16 @@ void compatibility() {
120120
assertFalse(crac.getNetworkAction("aligned-psts").isCompatibleWith(crac.getNetworkAction("switch-pair-and-pst")));
121121
assertTrue(crac.getNetworkAction("switch-pair-and-pst").isCompatibleWith(crac.getNetworkAction("switch-pair-and-pst")));
122122
}
123+
124+
@Test
125+
void testCopyWithNewId() {
126+
NetworkAction duplicate = NetworkActionImpl.copyWithNewId(networkAction1, "copy");
127+
assertEquals("copy", duplicate.getId());
128+
assertEquals("name", duplicate.getName());
129+
assertEquals("operator", duplicate.getOperator());
130+
assertEquals(Optional.of(10), duplicate.getSpeed());
131+
assertEquals(1, duplicate.getUsageRules().size());
132+
assertEquals(1, duplicate.getElementaryActions().size());
133+
assertEquals(generator.getId(), duplicate.getNetworkElements().iterator().next().getId());
134+
}
123135
}

data/rao-result/rao-result-io/rao-result-json/src/main/java/com/powsybl/openrao/data/raoresult/io/json/deserializers/ComputationStatusMapDeserializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
/**
2020
* @author Philippe Edwards {@literal <philippe.edwards at rte-france.com>}
21-
* @author Godelaine De-Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>}
21+
* @author Godelaine de Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>}
2222
*/
2323
final class ComputationStatusMapDeserializer {
2424

data/rao-result/rao-result-io/rao-result-json/src/main/java/com/powsybl/openrao/data/raoresult/io/json/serializers/ComputationStatusMapSerializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
/**
2323
* @author Philippe Edwards {@literal <philippe.edwards at rte-france.com>}
24-
* @author Godelaine De-Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>}
24+
* @author Godelaine de Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>}
2525
*/
2626
final class ComputationStatusMapSerializer {
2727

ra-optimisation/search-tree-rao/pom.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
<artifactId>open-rao-rao-api</artifactId>
3232
<version>${project.version}</version>
3333
</dependency>
34+
<dependency>
35+
<groupId>${project.groupId}</groupId>
36+
<artifactId>open-rao-crac-impl</artifactId>
37+
<version>${project.version}</version>
38+
</dependency>
3439
<dependency>
3540
<groupId>com.google.ortools</groupId>
3641
<artifactId>ortools-java</artifactId>
@@ -51,12 +56,6 @@
5156
<type>test-jar</type>
5257
<scope>test</scope>
5358
</dependency>
54-
<dependency>
55-
<groupId>${project.groupId}</groupId>
56-
<artifactId>open-rao-crac-impl</artifactId>
57-
<version>${project.version}</version>
58-
<scope>test</scope>
59-
</dependency>
6059
<dependency>
6160
<groupId>${project.groupId}</groupId>
6261
<artifactId>open-rao-crac-util</artifactId>

ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/AutomatonSimulator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
* Simulates the behavior of topological and range automatons
6666
*
6767
* @author Peter Mitri {@literal <peter.mitri at rte-france.com>}
68-
* @author Godelaine De-Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>}
68+
* @author Godelaine de Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>}
6969
*/
7070
public final class AutomatonSimulator {
7171
private static final double DOUBLE_NON_NULL = 1e-12;

ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/Castor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* @author Joris Mancini {@literal <joris.mancini at rte-france.com>}
2424
* @author Philippe Edwards {@literal <philippe.edwards at rte-france.com>}
2525
* @author Peter Mitri {@literal <peter.mitri at rte-france.com>}
26-
* @author Godelaine De-Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>}
26+
* @author Godelaine de Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>}
2727
* @author Baptiste Seguinot {@literal <baptiste.seguinot at rte-france.com>}
2828
*/
2929
@AutoService(RaoProvider.class)

ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorContingencyScenarios.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* @author Joris Mancini {@literal <joris.mancini at rte-france.com>}
4444
* @author Philippe Edwards {@literal <philippe.edwards at rte-france.com>}
4545
* @author Peter Mitri {@literal <peter.mitri at rte-france.com>}
46-
* @author Godelaine De-Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>}
46+
* @author Godelaine de Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>}
4747
* @author Baptiste Seguinot {@literal <baptiste.seguinot at rte-france.com>}
4848
*/
4949
public class CastorContingencyScenarios {

ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorFullOptimization.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
* @author Joris Mancini {@literal <joris.mancini at rte-france.com>}
4545
* @author Philippe Edwards {@literal <philippe.edwards at rte-france.com>}
4646
* @author Peter Mitri {@literal <peter.mitri at rte-france.com>}
47-
* @author Godelaine De-Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>}
47+
* @author Godelaine de Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>}
4848
* @author Baptiste Seguinot {@literal <baptiste.seguinot at rte-france.com>}
4949
*/
5050
public class CastorFullOptimization {

ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorOneStateOnly.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
* @author Joris Mancini {@literal <joris.mancini at rte-france.com>}
4545
* @author Philippe Edwards {@literal <philippe.edwards at rte-france.com>}
4646
* @author Peter Mitri {@literal <peter.mitri at rte-france.com>}
47-
* @author Godelaine De-Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>}
47+
* @author Godelaine de Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>}
4848
* @author Baptiste Seguinot {@literal <baptiste.seguinot at rte-france.com>}
4949
*/
5050
public class CastorOneStateOnly {

0 commit comments

Comments
 (0)