Skip to content

Commit 5c23789

Browse files
authored
Merge branch 'main' into integration/core-7.2.0
2 parents 0661085 + 015cdcd commit 5c23789

3 files changed

Lines changed: 93 additions & 267 deletions

File tree

tests/src/test/resources/com/powsybl/openrao/tests/features/1_multi_step_optimisation/1_5_multi_curative/1_5_2_ra_usage_limits_2P.feature

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,57 +4,47 @@ Feature: 15.2: RA Usage Limits - 2P - Multi-curative
44
is able to handle the cumulative effects of limits among the curative instants.
55

66
@fast @rao @ac @multi-curative @second-preventive
7-
Scenario: 15.2.1: Multi-curative CNECs with no CRA for curative1, one PST available for curative 1 and 2
8-
We have one network action "PRA_CLOSE_NL2_BE3_3" available in preventive and one PST available for both curative instant 1 and 2.
9-
We monitor the line "NNL2AA1 BBE3AA1 1" at each curative instant (the threshold decreases as we move from curative 1 to 3 (500 -> 300 -> 250)).
7+
Scenario: 15.2.1: Multi-curative CNECs with two PST available for curative 1 or 2 - no limit
8+
We have one network action "PRA_CLOSE_NL2_BE3_3" available in preventive and two PST available CRA_PST_FR in curative 1 and CRA_PST_BE in curative2 .
9+
We monitor the line "NNL2AA1 BBE3AA1 1" at each curative instant (the threshold decreases as we move from curative 1 to 2 (300 -> 250)).
1010
During first preventive the network action is not used as the initial preventive perimeter is secure.
11-
After optimizing the curative state "Contingency DE2 DE3 1 - curative2", the PST is set to -16 (the min) but it is not enough to secure the perimeter.
1211
=> During second preventive:
1312
- the RA "PRA_CLOSE_NL2_BE3_3" is used
14-
- move the PST to -15 in curative2
15-
- and then -16 in curative 3 to secure "NNL2AA1 BBE3AA1 1 - Contingency DE2 DE3 1 - curative3"
16-
Moving the PST to -15 in curative2 and then -16 in curative3 is considered as using two RAs at two different instants.
17-
Given network file is "1_multi_step_optimisation/1_5_multi_curative/12Nodes3ParallelLines_disconnected.uct"
13+
- push both PST to its max
14+
Given network file is "1_multi_step_optimisation/1_5_multi_curative/12Nodes3ParallelLines_2PST.uct"
1815
Given crac file is "1_multi_step_optimisation/1_5_multi_curative/crac_15_2_1.json"
1916
Given configuration file is "1_multi_step_optimisation/1_5_multi_curative/RaoParameters_case_91_12_secure_2PRAO.json"
2017
When I launch rao
2118
Then the execution details should be "Second preventive improved first preventive results"
22-
# Preventive
19+
# Preventive
2320
And 1 remedial actions are used in preventive
2421
And the remedial action "PRA_CLOSE_NL2_BE3_3" is used in preventive
2522
# Curative1
26-
Then 0 remedial actions are used after "Contingency DE2 DE3 1" at "curative1"
27-
# Curative2
23+
Then 1 remedial actions are used after "Contingency DE2 DE3 1" at "curative1"
24+
And the tap of PstRangeAction "CRA_PST_FR" should be 16 after "Contingency DE2 DE3 1" at "curative1"
25+
# Curative2
2826
And 1 remedial actions are used after "Contingency DE2 DE3 1" at "curative2"
2927
And the remedial action "CRA_PST_BE" is used after "Contingency DE2 DE3 1" at "curative2"
30-
And the tap of PstRangeAction "CRA_PST_BE" should be -15 after "Contingency DE2 DE3 1" at "curative2"
31-
# Curative3
32-
And 1 remedial actions are used after "Contingency DE2 DE3 1" at "curative3"
33-
And the remedial action "CRA_PST_BE" is used after "Contingency DE2 DE3 1" at "curative3"
34-
And the tap of PstRangeAction "CRA_PST_BE" should be -16 after "Contingency DE2 DE3 1" at "curative3"
35-
And the value of the objective function after CRA should be -8.65
36-
28+
And the tap of PstRangeAction "CRA_PST_BE" should be -16 after "Contingency DE2 DE3 1" at "curative2"
29+
And the value of the objective function after CRA should be -3.52
3730

3831
@fast @rao @ac @multi-curative @second-preventive
3932
Scenario: 15.2.2: Multi-curative - with max-ra limits and 2P
40-
Same case as 15.2.1 but with RA usage limitation: 0 curative1 RAs, 1 curative2 RAs, 1 curative3 RAs
41-
Similarly to test 91.12.5, this should test that the RAO is able to take into account the cumulative effect of the max-ra-usage-limit in multi-curative.
42-
However the situation is more complex than for 91.12.5, since we want to check that the limitations are also respected in second preventive where all the curative range actions are optimized at once.
43-
The MIP in 2P should be able to move the PST one time to -16 directly in curative2 to secure both the "Contingency DE2 DE3 1 - curative2" and "Contingency DE2 DE3 1 - curative3".
44-
The final situation is the same as 15.2.2.
45-
Given network file is "1_multi_step_optimisation/1_5_multi_curative/12Nodes3ParallelLines_disconnected.uct"
33+
Same case as 15.2.1 but with RA usage limitation: 1 curative1 RAs, 1 curative2 RAs.
34+
Meaning that we can only use one of the PST compared to 15.2.1.
35+
Using the CRA_PST_BE in curative2 give the max margin, using CRA_PST_FR the cost would have been 66 > 31.
36+
Given network file is "1_multi_step_optimisation/1_5_multi_curative/12Nodes3ParallelLines_2PST.uct"
4637
Given crac file is "1_multi_step_optimisation/1_5_multi_curative/crac_15_2_2_with_ra_limitations.json"
4738
Given configuration file is "1_multi_step_optimisation/1_5_multi_curative/RaoParameters_case_91_12_secure_2PRAO.json"
4839
When I launch rao
4940
Then the execution details should be "Second preventive improved first preventive results"
5041
Then 1 remedial actions are used in preventive
5142
Then 0 remedial actions are used after "Contingency DE2 DE3 1" at "curative1"
43+
And the tap of PstRangeAction "CRA_PST_FR" should be 0 after "Contingency DE2 DE3 1" at "curative1"
5244
Then 1 remedial actions are used after "Contingency DE2 DE3 1" at "curative2"
5345
And the remedial action "CRA_PST_BE" is used after "Contingency DE2 DE3 1" at "curative2"
5446
And the tap of PstRangeAction "CRA_PST_BE" should be -16 after "Contingency DE2 DE3 1" at "curative2"
55-
Then 0 remedial actions are used after "Contingency DE2 DE3 1" at "curative3"
56-
And the tap of PstRangeAction "CRA_PST_BE" should be -16 after "Contingency DE2 DE3 1" at "curative3"
57-
And the value of the objective function after CRA should be -8.65
47+
And the value of the objective function after CRA should be 31.35
5848

5949
@fast @rao @ac @multi-curative @second-preventive
6050
Scenario: 15.2.3: Multi-curative - with max-pst-per-tso limits and 2P

tests/src/test/resources/files/crac/1_multi_step_optimisation/1_5_multi_curative/crac_15_2_1.json

Lines changed: 35 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"type": "CRAC",
3-
"version": "2.1",
3+
"version": "2.9",
44
"info": "Generated by FARAO http://farao-community.github.io",
55
"id": "CRAC_91_12_2",
66
"name": "CRAC_91_12_2",
@@ -20,12 +20,10 @@
2020
{
2121
"id" : "curative2",
2222
"kind" : "CURATIVE"
23-
},
24-
{
25-
"id" : "curative3",
26-
"kind" : "CURATIVE"
2723
}
2824
],
25+
"ra-usage-limits-per-instant" : [
26+
],
2927
"networkElementsNamePerId": {},
3028
"contingencies": [
3129
{
@@ -45,18 +43,12 @@
4543
"optimized": true,
4644
"monitored": false,
4745
"reliabilityMargin": 0.0,
48-
"iMax": [
49-
5000.0
50-
],
51-
"nominalV": [
52-
400.0
53-
],
5446
"thresholds": [
5547
{
5648
"unit": "megawatt",
5749
"min": -800.0,
5850
"max": 800.0,
59-
"side" : "left"
51+
"side" : 1
6052
}
6153
]
6254
},
@@ -70,18 +62,12 @@
7062
"optimized": true,
7163
"monitored": false,
7264
"reliabilityMargin": 0.0,
73-
"iMax": [
74-
50.0
75-
],
76-
"nominalV": [
77-
400.0
78-
],
7965
"thresholds": [
8066
{
8167
"unit": "megawatt",
8268
"min": -1000.0,
8369
"max": 1000.0,
84-
"side" : "left"
70+
"side" : 1
8571
}
8672
]
8773
},
@@ -95,18 +81,12 @@
9581
"optimized": true,
9682
"monitored": false,
9783
"reliabilityMargin": 0.0,
98-
"iMax": [
99-
50.0
100-
],
101-
"nominalV": [
102-
400.0
103-
],
10484
"thresholds": [
10585
{
10686
"unit": "megawatt",
107-
"min": -500.0,
108-
"max": 500.0,
109-
"side" : "left"
87+
"min": -300.0,
88+
"max": 300.0,
89+
"side" : 1
11090
}
11191
]
11292
},
@@ -120,43 +100,12 @@
120100
"optimized": true,
121101
"monitored": false,
122102
"reliabilityMargin": 0.0,
123-
"iMax": [
124-
50.0
125-
],
126-
"nominalV": [
127-
400.0
128-
],
129-
"thresholds": [
130-
{
131-
"unit": "megawatt",
132-
"min": -300.0,
133-
"max": 300.0,
134-
"side" : "left"
135-
}
136-
]
137-
},
138-
{
139-
"id": "NNL2AA1 BBE3AA1 1 - Contingency DE2 DE3 1 - curative3",
140-
"name": "NNL2AA1 BBE3AA1 1 - Contingency DE2 DE3 1 - curative3",
141-
"networkElementId": "NNL2AA1 BBE3AA1 1",
142-
"contingencyId": "Contingency DE2 DE3 1",
143-
"operator": null,
144-
"instant": "curative3",
145-
"optimized": true,
146-
"monitored": false,
147-
"reliabilityMargin": 0.0,
148-
"iMax": [
149-
50.0
150-
],
151-
"nominalV": [
152-
400.0
153-
],
154103
"thresholds": [
155104
{
156105
"unit": "megawatt",
157-
"min": -250.0,
158-
"max": 250.0,
159-
"side" : "left"
106+
"min": -210.0,
107+
"max": 210.0,
108+
"side" : 1
160109
}
161110
]
162111
}
@@ -168,51 +117,28 @@
168117
"operator": "BE",
169118
"onInstantUsageRules": [
170119
{
171-
"instant": "curative2",
172-
"usageMethod": "available"
173-
},
174-
{
175-
"instant": "curative3",
176-
"usageMethod": "available"
120+
"instant": "curative2"
177121
}
178122
],
179123
"networkElementId": "BBE2AA1 BBE3AA1 1",
180-
"initialTap": 0,
181-
"tapToAngleConversionMap": {
182-
"-1": -0.3896097993971608,
183-
"0": 0.0,
184-
"-2": -0.7792105912934298,
185-
"1": 0.3896097993971608,
186-
"-3": -1.1687933694373345,
187-
"2": 0.7792105912934298,
188-
"-4": -1.5583491300758083,
189-
"3": 1.1687933694373345,
190-
"-5": -1.9478688732023104,
191-
"4": 1.5583491300758083,
192-
"-6": -2.337343603803646,
193-
"5": 1.9478688732023104,
194-
"-7": -2.7267643331050597,
195-
"6": 2.337343603803646,
196-
"-8": -3.1161220798131644,
197-
"7": 2.7267643331050597,
198-
"-9": -3.505407871356285,
199-
"8": 3.1161220798131644,
200-
"-10": -3.894612745121778,
201-
"9": 3.505407871356285,
202-
"-11": -4.283727749689918,
203-
"10": 3.894612745121778,
204-
"-12": -4.672743946063913,
205-
"11": 4.283727749689918,
206-
"-13": -5.061652408895631,
207-
"12": 4.672743946063913,
208-
"-14": -5.4504442277066305,
209-
"13": 5.061652408895631,
210-
"-15": -5.839110508104064,
211-
"14": 5.4504442277066305,
212-
"-16": -6.2276423729910535,
213-
"15": 5.839110508104064,
214-
"16": 6.2276423729910535
215-
},
124+
"ranges": [
125+
{
126+
"min": -16,
127+
"max": 16,
128+
"rangeType": "absolute"
129+
}
130+
]
131+
},
132+
{
133+
"id": "CRA_PST_FR",
134+
"name": "CRA_PST_FR",
135+
"operator": "FR",
136+
"onInstantUsageRules": [
137+
{
138+
"instant": "curative1"
139+
}
140+
],
141+
"networkElementId": "FFR1AA1 FFR2AA1 1",
216142
"ranges": [
217143
{
218144
"min": -16,
@@ -231,11 +157,10 @@
231157
"operator": "BE",
232158
"onInstantUsageRules": [
233159
{
234-
"instant": "preventive",
235-
"usageMethod": "available"
160+
"instant": "preventive"
236161
}
237162
],
238-
"topologicalActions": [
163+
"terminalsConnectionActions": [
239164
{
240165
"networkElementId": "NNL2AA1 BBE3AA1 3",
241166
"actionType": "close"
@@ -248,19 +173,13 @@
248173
"operator": "BE",
249174
"onInstantUsageRules": [
250175
{
251-
"instant": "curative1",
252-
"usageMethod": "available"
253-
},
254-
{
255-
"instant": "curative2",
256-
"usageMethod": "available"
176+
"instant": "curative1"
257177
},
258178
{
259-
"instant": "curative3",
260-
"usageMethod": "available"
179+
"instant": "curative2"
261180
}
262181
],
263-
"topologicalActions": [
182+
"terminalsConnectionActions": [
264183
{
265184
"networkElementId": "NNL2AA1 BBE3AA1 3",
266185
"actionType": "open"

0 commit comments

Comments
 (0)