Skip to content

Commit 04f6c5f

Browse files
bqth29Godelaine
andauthored
remove power gradients (#1295)
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com> Co-authored-by: Godelaine <87479798+Godelaine@users.noreply.github.com>
1 parent 8132763 commit 04f6c5f

15 files changed

Lines changed: 58 additions & 272 deletions

File tree

data/inter-temporal-constraint/pom.xml

Lines changed: 0 additions & 34 deletions
This file was deleted.

data/inter-temporal-constraint/src/main/java/com/powsybl/openrao/data/intertemporalconstraint/PowerGradient.java

Lines changed: 0 additions & 89 deletions
This file was deleted.

data/inter-temporal-constraint/src/test/java/com/powsybl/openrao/data/intertemporalconstraint/PowerGradientTest.java

Lines changed: 0 additions & 80 deletions
This file was deleted.

data/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<module>flowbased-domain</module>
2121
<module>generator-constraints</module>
2222
<module>glsk</module>
23-
<module>inter-temporal-constraint</module>
2423
<module>rao-result</module>
2524
<module>refprog</module>
2625
<module>virtual-hubs</module>

distribution/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,6 @@
8787
<artifactId>open-rao-generator-constraints</artifactId>
8888
<version>${project.version}</version>
8989
</dependency>
90-
<dependency>
91-
<groupId>${project.groupId}</groupId>
92-
<artifactId>open-rao-inter-temporal-constraint</artifactId>
93-
<version>${project.version}</version>
94-
</dependency>
9590
<dependency>
9691
<groupId>${project.groupId}</groupId>
9792
<artifactId>open-rao-loopflow-computation</artifactId>

pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,6 @@
295295
<artifactId>open-rao-glsk-virtual-hubs</artifactId>
296296
<version>${project.version}</version>
297297
</dependency>
298-
<dependency>
299-
<groupId>${project.groupId}</groupId>
300-
<artifactId>open-rao-inter-temporal-constraint</artifactId>
301-
<version>${project.version}</version>
302-
</dependency>
303298
<dependency>
304299
<groupId>${project.groupId}</groupId>
305300
<artifactId>open-rao-rao-result</artifactId>

ra-optimisation/rao-api/pom.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@
2222
<artifactId>open-rao-crac-api</artifactId>
2323
<version>${project.version}</version>
2424
</dependency>
25-
<dependency>
26-
<groupId>com.powsybl</groupId>
27-
<artifactId>open-rao-inter-temporal-constraint</artifactId>
28-
<version>${project.version}</version>
29-
</dependency>
3025
<dependency>
3126
<groupId>${project.groupId}</groupId>
3227
<artifactId>open-rao-rao-result-api</artifactId>
@@ -115,5 +110,9 @@
115110
<artifactId>mockito-core</artifactId>
116111
<scope>test</scope>
117112
</dependency>
113+
<dependency>
114+
<groupId>com.powsybl</groupId>
115+
<artifactId>open-rao-generator-constraints</artifactId>
116+
</dependency>
118117
</dependencies>
119118
</project>

ra-optimisation/rao-api/src/main/java/com/powsybl/openrao/raoapi/InterTemporalRaoInput.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import com.powsybl.openrao.commons.OpenRaoException;
1111
import com.powsybl.openrao.commons.TemporalData;
12-
import com.powsybl.openrao.data.intertemporalconstraint.PowerGradient;
12+
import com.powsybl.openrao.data.generatorconstraints.GeneratorConstraints;
1313

1414
import java.time.OffsetDateTime;
1515
import java.util.HashSet;
@@ -23,17 +23,17 @@
2323
public class InterTemporalRaoInput {
2424
private final TemporalData<RaoInput> raoInputs;
2525
private final Set<OffsetDateTime> timestampsToRun;
26-
private final Set<PowerGradient> powerGradients;
26+
private final Set<GeneratorConstraints> generatorConstraints;
2727

28-
public InterTemporalRaoInput(TemporalData<RaoInput> raoInputs, Set<OffsetDateTime> timestampsToRun, Set<PowerGradient> powerGradients) {
28+
public InterTemporalRaoInput(TemporalData<RaoInput> raoInputs, Set<OffsetDateTime> timestampsToRun, Set<GeneratorConstraints> powerGradients) {
2929
this.raoInputs = raoInputs;
3030
this.timestampsToRun = timestampsToRun;
31-
this.powerGradients = powerGradients;
31+
this.generatorConstraints = powerGradients;
3232
checkTimestampsToRun();
3333
}
3434

35-
public InterTemporalRaoInput(TemporalData<RaoInput> raoInputs, Set<PowerGradient> powerGradients) {
36-
this(raoInputs, new HashSet<>(raoInputs.getTimestamps()), powerGradients);
35+
public InterTemporalRaoInput(TemporalData<RaoInput> raoInputs, Set<GeneratorConstraints> generatorConstraints) {
36+
this(raoInputs, new HashSet<>(raoInputs.getTimestamps()), generatorConstraints);
3737
}
3838

3939
public TemporalData<RaoInput> getRaoInputs() {
@@ -44,8 +44,8 @@ public Set<OffsetDateTime> getTimestampsToRun() {
4444
return timestampsToRun;
4545
}
4646

47-
public Set<PowerGradient> getPowerGradients() {
48-
return powerGradients;
47+
public Set<GeneratorConstraints> getGeneratorConstraints() {
48+
return generatorConstraints;
4949
}
5050

5151
private void checkTimestampsToRun() {

ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/InterTemporalRaoInputTest.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import com.powsybl.openrao.commons.OpenRaoException;
1111
import com.powsybl.openrao.commons.TemporalData;
1212
import com.powsybl.openrao.commons.TemporalDataImpl;
13-
import com.powsybl.openrao.data.intertemporalconstraint.PowerGradient;
13+
import com.powsybl.openrao.data.generatorconstraints.GeneratorConstraints;
1414
import org.junit.jupiter.api.BeforeEach;
1515
import org.junit.jupiter.api.Test;
1616
import org.mockito.Mockito;
@@ -32,7 +32,7 @@ class InterTemporalRaoInputTest {
3232
private OffsetDateTime timestamp2;
3333
private OffsetDateTime timestamp3;
3434
private TemporalData<RaoInput> temporalData;
35-
private Set<PowerGradient> powerGradients;
35+
private Set<GeneratorConstraints> generatorConstraints;
3636

3737
@BeforeEach
3838
void setUp() {
@@ -43,23 +43,26 @@ void setUp() {
4343
timestamp2 = OffsetDateTime.of(2024, 12, 10, 17, 21, 0, 0, ZoneOffset.UTC);
4444
timestamp3 = OffsetDateTime.of(2024, 12, 10, 18, 21, 0, 0, ZoneOffset.UTC);
4545
temporalData = new TemporalDataImpl<>(Map.of(timestamp1, raoInput1, timestamp2, raoInput2, timestamp3, raoInput3));
46-
powerGradients = Set.of(PowerGradient.builder().withNetworkElementId("generator-1").withMaxValue(200.0).build(), PowerGradient.builder().withNetworkElementId("generator-2").withMinValue(-50.0).build());
46+
generatorConstraints = Set.of(
47+
GeneratorConstraints.create().withGeneratorId("generator-1").withLeadTime(0.0).withLagTime(0.0).withPMin(400.0).withPMax(1000.0).withUpwardPowerGradient(200.0).build(),
48+
GeneratorConstraints.create().withGeneratorId("generator-2").withLeadTime(0.0).withLagTime(0.0).withPMin(400.0).withPMax(1000.0).withDownwardPowerGradient(-50.0).build()
49+
);
4750
}
4851

4952
@Test
5053
void testInstantiateInterTemporalRaoInput() {
51-
InterTemporalRaoInput input = new InterTemporalRaoInput(temporalData, Set.of(timestamp1, timestamp3), powerGradients);
54+
InterTemporalRaoInput input = new InterTemporalRaoInput(temporalData, Set.of(timestamp1, timestamp3), generatorConstraints);
5255
assertEquals(temporalData, input.getRaoInputs());
5356
assertEquals(Set.of(timestamp1, timestamp3), input.getTimestampsToRun());
54-
assertEquals(powerGradients, input.getPowerGradients());
57+
assertEquals(generatorConstraints, input.getGeneratorConstraints());
5558
}
5659

5760
@Test
5861
void testInstantiateInterTemporalRaoInputAllTimestamps() {
59-
InterTemporalRaoInput input = new InterTemporalRaoInput(temporalData, powerGradients);
62+
InterTemporalRaoInput input = new InterTemporalRaoInput(temporalData, generatorConstraints);
6063
assertEquals(temporalData, input.getRaoInputs());
6164
assertEquals(Set.of(timestamp1, timestamp2, timestamp3), input.getTimestampsToRun());
62-
assertEquals(powerGradients, input.getPowerGradients());
65+
assertEquals(generatorConstraints, input.getGeneratorConstraints());
6366
}
6467

6568
@Test

0 commit comments

Comments
 (0)