From 30c511db645ccebf30e34483b3cf33084d040ba5 Mon Sep 17 00:00:00 2001 From: Pauline Jean-Marie Date: Tue, 17 Sep 2024 10:24:06 +0200 Subject: [PATCH] Repair cucumber tests Signed-off-by: Pauline Jean-Marie --- .../features/epic13_curative/US13_3.feature | 23 +++++++-------- .../features/epic13_curative/US13_7.feature | 28 +++++++++---------- .../files/crac/epic13/CBCORA_ep13us7case3.xml | 4 +-- .../files/crac/epic13/CBCORA_ep13us7case4.xml | 4 +-- 4 files changed, 28 insertions(+), 31 deletions(-) diff --git a/tests/src/test/resources/com/powsybl/openrao/tests/features/epic13_curative/US13_3.feature b/tests/src/test/resources/com/powsybl/openrao/tests/features/epic13_curative/US13_3.feature index c9ca80d06b..11dc240fa3 100644 --- a/tests/src/test/resources/com/powsybl/openrao/tests/features/epic13_curative/US13_3.feature +++ b/tests/src/test/resources/com/powsybl/openrao/tests/features/epic13_curative/US13_3.feature @@ -79,13 +79,11 @@ Feature: US 13.3 : Solve a RAO for N compounds states And the tap of PstRangeAction "pst_fr" should be 15 in preventive And 1 remedial actions are used after "co1_fr2_fr3_1" at "curative" And the remedial action "close_fr1_fr5" is used after "co1_fr2_fr3_1" at "curative" - And 1 remedial actions are used after "co2_be1_be3" at "curative" - And the tap of PstRangeAction "pst_be" should be -16 after "co2_be1_be3" at "curative" And the worst margin is -184 A And the margin on cnec "FFR2AA1 FFR3AA1 2 - co1_fr2_fr3_1 - outage" after PRA should be -184 A And the margin on cnec "FFR2AA1 FFR3AA1 2 - co1_fr2_fr3_1 - curative" after CRA should be -141 A And the margin on cnec "BBE2AA1 FFR3AA1 1 - co2_be1_be3 - outage" after PRA should be 332 A - And the margin on cnec "BBE2AA1 FFR3AA1 1 - co2_be1_be3 - curative" after CRA should be 544 A + And the margin on cnec "BBE2AA1 FFR3AA1 1 - co2_be1_be3 - curative" after CRA should be 132 A And the margin on cnec "FFR3AA1 FFR5AA1 1 - co1_fr2_fr3_1 - curative" after CRA should be 782 A And the value of the objective function after CRA should be 184 @@ -100,16 +98,14 @@ Feature: US 13.3 : Solve a RAO for N compounds states And the remedial action "close_fr1_fr5" is used in preventive And the remedial action "open_be1_be4" is used in preventive And the remedial action "open_fr1_fr3" is used in preventive - And 3 remedial actions are used after "co1_fr2_fr3_1" at "curative" - And the remedial action "close_de3_de4" is used after "co1_fr2_fr3_1" at "curative" - And the remedial action "open_fr1_fr2" is used after "co1_fr2_fr3_1" at "curative" + And 1 remedial actions are used after "co1_fr2_fr3_1" at "curative" And the tap of PstRangeAction "pst_be" should be -16 after "co1_fr2_fr3_1" at "curative" And the worst margin is 469 A And the margin on cnec "BBE2AA1 FFR3AA1 1 - co2_be1_be3 - curative" after CRA should be 469 A - And the margin on cnec "FFR3AA1 FFR5AA1 1 - co1_fr2_fr3_1 - curative" after CRA should be 875 A + And the margin on cnec "FFR3AA1 FFR5AA1 1 - co1_fr2_fr3_1 - curative" after CRA should be 720 A And the margin on cnec "FFR4AA1 DDE1AA1 1 - preventive" after PRA should be 1004 A And the margin on cnec "FFR4AA1 DDE1AA1 1 - co2_be1_be3 - curative" after CRA should be 1031 A - And the margin on cnec "FFR4AA1 DDE1AA1 1 - co1_fr2_fr3_1 - curative" after CRA should be 1049 A + And the margin on cnec "FFR4AA1 DDE1AA1 1 - co1_fr2_fr3_1 - curative" after CRA should be 1079 A And the value of the objective function after CRA should be -469 @fast @rao @mock @ac @contingency-scenarios @@ -120,9 +116,9 @@ Feature: US 13.3 : Solve a RAO for N compounds states When I launch search_tree_rao Then 1 remedial actions are used in preventive And the tap of PstRangeAction "pst_fr" should be 15 in preventive - And 2 remedial actions are used after "co2_be1_be3" at "curative" - And the remedial action "open_be1_be4" is used after "co2_be1_be3" at "curative" - And the tap of PstRangeAction "pst_be" should be -16 after "co2_be1_be3" at "curative" + # Network is better than prev and secure for contingency co2_be1_be3 (min margin 132) + And 0 remedial actions are used after "co2_be1_be3" at "curative" + And the margin on cnec "BBE2AA1 FFR3AA1 1 - co2_be1_be3 - curative" after CRA should be 132 A And the worst margin is -484 A And the margin on cnec "FFR2AA1 FFR3AA1 2 - co1_fr2_fr3_1 - curative" after CRA should be -484 A # For contingency co1_fr2_fr3_1 that has no CRA, Osiris automatically decreases the threshold in outage to match the treshold in curative state @@ -163,8 +159,9 @@ Feature: US 13.3 : Solve a RAO for N compounds states And the tap of PstRangeAction "pst_be" should be -16 in preventive And 1 remedial actions are used after "co1_fr2_fr3_1" at "curative" And the remedial action "close_fr1_fr5" is used after "co1_fr2_fr3_1" at "curative" - And 1 remedial actions are used after "co3_fr1_fr3" at "curative" - And the remedial action "open_fr1_fr2" is used after "co3_fr1_fr3" at "curative" + # Min margin is better than prev for contingency co3_fr1_fr3 (657) + And 0 remedial actions are used after "co3_fr1_fr3" at "curative" + And the margin on cnec "FFR1AA1 FFR2AA1 1 - co3_fr1_fr3 - curative" after CRA should be 657 A And the worst margin is 418 A And the margin on cnec "FFR2AA1 FFR3AA1 2 - co1_fr2_fr3_1 - outage" after PRA should be 418 A And the margin on cnec "FFR2AA1 FFR3AA1 2 - co1_fr2_fr3_1 - curative" after CRA should be 485 A diff --git a/tests/src/test/resources/com/powsybl/openrao/tests/features/epic13_curative/US13_7.feature b/tests/src/test/resources/com/powsybl/openrao/tests/features/epic13_curative/US13_7.feature index eb6d4814c9..f89e7ecebb 100644 --- a/tests/src/test/resources/com/powsybl/openrao/tests/features/epic13_curative/US13_7.feature +++ b/tests/src/test/resources/com/powsybl/openrao/tests/features/epic13_curative/US13_7.feature @@ -68,22 +68,22 @@ Feature: US 13.7: Cross-validation Curative and Loop-flows Given Glsk file is "common/glsk_proportional_12nodes.xml" Given configuration file is "common/RaoParameters_maxMargin_megawatt_dc_withLoopFlows.json" When I launch search_tree_rao at "2019-01-08 12:00" - Then the worst margin is 524.0 MW + Then the worst margin is 505.0 MW And the margin on cnec "001_FR-DE - preventive" after PRA should be 524.0 MW - And the margin on cnec "003_FR-DE - outage" after PRA should be 921.0 MW - And the margin on cnec "003_FR-DE - curative" after CRA should be 1130.0 MW + And the margin on cnec "003_FR-DE - outage" after PRA should be 505.0 MW + And the margin on cnec "003_FR-DE - curative" after CRA should be 714.0 MW And the remedial action "Open BE1 BE3" is used in preventive And the tap of PstRangeAction "PRA_PST_BE" should be -16 after "CO1" at "curative" And the loopflow threshold on cnec "001_FR-DE - preventive" should be 1200.0 MW And the initial loopflow on cnec "001_FR-DE - preventive" should be -124.0 MW And the loopflow on cnec "001_FR-DE - preventive" after PRA should be -200.0 MW - And the loopflow threshold on cnec "003_FR-DE - outage" should be 1600.0 MW + And the loopflow threshold on cnec "003_FR-DE - outage" should be 1268.0 MW And the initial loopflow on cnec "003_FR-DE - outage" should be -342.0 MW And the loopflow on cnec "003_FR-DE - outage" after PRA should be -396.0 MW - And the loopflow threshold on cnec "003_FR-DE - curative" should be 1600.0 MW + And the loopflow threshold on cnec "003_FR-DE - curative" should be 1268.0 MW And the initial loopflow on cnec "003_FR-DE - curative" should be -342.0 MW And the loopflow on cnec "003_FR-DE - curative" after CRA should be -605.0 MW - And the value of the objective function after CRA should be -524 + And the value of the objective function after CRA should be -505 @fast @rao @mock @dc @contingency-scenarios @loopflow Scenario: US 13.7.4 : Curative RAO with loop-flows with constraining thresholds in curative @@ -92,13 +92,13 @@ Feature: US 13.7: Cross-validation Curative and Loop-flows Given Glsk file is "common/glsk_proportional_12nodes.xml" Given configuration file is "common/RaoParameters_maxMargin_megawatt_dc_withLoopFlows.json" When I launch search_tree_rao at "2019-01-08 12:00" - Then the worst margin is 524.0 MW - And the margin on cnec "001_FR-DE - preventive" after PRA should be 524.0 MW + Then the worst margin is 921.0 MW + And the margin on cnec "001_FR-DE - preventive" after PRA should be 940.0 MW And the margin on cnec "003_FR-DE - outage" after PRA should be 921.0 MW And the margin on cnec "003_FR-DE - curative" after CRA should be 1012.0 MW And the remedial action "Open BE1 BE3" is used in preventive And the tap of PstRangeAction "PRA_PST_BE" should be -7 after "CO1" at "curative" - And the loopflow threshold on cnec "001_FR-DE - preventive" should be 1200.0 MW + And the loopflow threshold on cnec "001_FR-DE - preventive" should be 1450.0 MW And the initial loopflow on cnec "001_FR-DE - preventive" should be -124.0 MW And the loopflow on cnec "001_FR-DE - preventive" after PRA should be -200.0 MW And the loopflow threshold on cnec "003_FR-DE - outage" should be 500.0 MW @@ -107,7 +107,7 @@ Feature: US 13.7: Cross-validation Curative and Loop-flows And the loopflow threshold on cnec "003_FR-DE - curative" should be 500.0 MW And the initial loopflow on cnec "003_FR-DE - curative" should be -342.0 MW And the loopflow on cnec "003_FR-DE - curative" after CRA should be -487.0 MW - And the value of the objective function after CRA should be -524 + And the value of the objective function after CRA should be -921 @fast @rao @mock @dc @contingency-scenarios @loopflow Scenario: US 13.7.5 : Curative RAO with loop-flows with constraining initial values in curative @@ -139,14 +139,14 @@ Feature: US 13.7: Cross-validation Curative and Loop-flows Given Glsk file is "common/glsk_proportional_12nodes.xml" Given configuration file is "epic13/RaoParameters_ep13us7case6.json" When I launch search_tree_rao at "2019-01-08 12:00" - Then the worst margin is 524.0 MW - And the margin on cnec "001_FR-DE - preventive" after PRA should be 524.0 MW + Then the worst margin is 921.0 MW + And the margin on cnec "001_FR-DE - preventive" after PRA should be 940.0 MW And the margin on cnec "003_FR-DE - outage" after PRA should be 921.0 MW And the margin on cnec "003_FR-DE - curative" after CRA should be 1028.0 MW And the remedial action "Open BE1 BE3" is used in preventive And the tap of PstRangeAction "PRA_PST_BE" should be -16 after "CO1" at "curative" And the remedial action "Open NL1 NL3" is used after "CO1" at "curative" - And the loopflow threshold on cnec "001_FR-DE - preventive" should be 1200.0 MW + And the loopflow threshold on cnec "001_FR-DE - preventive" should be 1450.0 MW And the initial loopflow on cnec "001_FR-DE - preventive" should be -124.0 MW And the loopflow on cnec "001_FR-DE - preventive" after PRA should be -147.0 MW And the loopflow threshold on cnec "003_FR-DE - outage" should be 500.0 MW @@ -155,4 +155,4 @@ Feature: US 13.7: Cross-validation Curative and Loop-flows And the loopflow threshold on cnec "003_FR-DE - curative" should be 500.0 MW And the initial loopflow on cnec "003_FR-DE - curative" should be -342.0 MW And the loopflow on cnec "003_FR-DE - curative" after CRA should be -452.0 MW - And the value of the objective function after CRA should be -524 \ No newline at end of file + And the value of the objective function after CRA should be -921 \ No newline at end of file diff --git a/tests/src/test/resources/files/crac/epic13/CBCORA_ep13us7case3.xml b/tests/src/test/resources/files/crac/epic13/CBCORA_ep13us7case3.xml index 16e08bc802..aa7fb09d59 100644 --- a/tests/src/test/resources/files/crac/epic13/CBCORA_ep13us7case3.xml +++ b/tests/src/test/resources/files/crac/epic13/CBCORA_ep13us7case3.xml @@ -43,7 +43,7 @@ - 2888 + 2288 SEASONAL 1.5 1.5 @@ -60,7 +60,7 @@ - 2888 + 2288 SEASONAL 1.5 1.5 diff --git a/tests/src/test/resources/files/crac/epic13/CBCORA_ep13us7case4.xml b/tests/src/test/resources/files/crac/epic13/CBCORA_ep13us7case4.xml index 7f54240b2a..c876a78acd 100644 --- a/tests/src/test/resources/files/crac/epic13/CBCORA_ep13us7case4.xml +++ b/tests/src/test/resources/files/crac/epic13/CBCORA_ep13us7case4.xml @@ -15,7 +15,7 @@ - 2888 + 3488 SEASONAL 1.5 1.5 @@ -29,7 +29,7 @@ - 2888 + 3488 SEASONAL 1.5 1.5