Skip to content

Commit

Permalink
Repair tests
Browse files Browse the repository at this point in the history
Signed-off-by: Pauline Jean-Marie <pauline.jean-marie@artelys.com>
  • Loading branch information
Pauline Jean-Marie committed Nov 29, 2024
1 parent 2d1e78f commit 159c8e2
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 302 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,9 @@ Feature: US 12.15: export different reason per perimeter in SWE CNE
Given crac creation parameters file is "epic12/CimCracCreationParameters_MonitorLeftSide.json"
Given configuration file is "epic12/raoParametersSweIDCC_minObjectiveDisabled2P.json"
When I launch search_tree_rao at "2021-04-02 05:00"
Then the calculation partially fails
Then the optimization steps executed by the RAO should be "FIRST_PREVENTIVE_FELLBACK_TO_INITIAL_SITUATION"
And 0 remedial actions are used in preventive
And 1 remedial actions are used after "CO_N1012_N4012" at "auto"
And 0 remedial actions are used after "CO_N1012_N4012" at "curative"
And the worst margin is -20.0 A on cnec "N1013_N1014 - preventive"
And the value of the objective function initially should be 20.0
And the value of the objective function after PRA should be 20.0
And the value of the objective function after CRA should be 10020.2
And the worst margin is -1419.4 A

@fast @rao @mock @ac @contingency-scenarios @second-preventive
# sensi pre 2P fails
Expand All @@ -99,14 +94,9 @@ Feature: US 12.15: export different reason per perimeter in SWE CNE
Given crac creation parameters file is "epic12/CimCracCreationParameters_MonitorLeftSide.json"
Given configuration file is "epic12/raoParametersSweIDCC_minObjective.json"
When I launch search_tree_rao at "2021-04-02 05:00"
Then the calculation partially fails
Then the optimization steps executed by the RAO should be "SECOND_PREVENTIVE_FELLBACK_TO_INITIAL_SITUATION"
And 0 remedial actions are used in preventive
And 1 remedial actions are used after "CO_N1012_N4012" at "auto"
And 0 remedial actions are used after "CO_N1012_N4012" at "curative"
And the worst margin is -20.0 A on cnec "N1013_N1014 - preventive"
And the value of the objective function initially should be 20.0
And the value of the objective function after PRA should be 20.0
And the value of the objective function after CRA should be 10020.2
And the worst margin is -1419.4 A

@fast @rao @mock @ac @contingency-scenarios @second-preventive
# sensi pre 2P fails
Expand All @@ -116,14 +106,9 @@ Feature: US 12.15: export different reason per perimeter in SWE CNE
Given crac creation parameters file is "epic12/CimCracCreationParameters_MonitorLeftSide.json"
Given configuration file is "epic12/raoParametersSweIDCC_minObjectiveWithGlobal2P.json"
When I launch search_tree_rao at "2021-04-02 05:00"
Then the calculation partially fails
Then the optimization steps executed by the RAO should be "SECOND_PREVENTIVE_FELLBACK_TO_INITIAL_SITUATION"
And 0 remedial actions are used in preventive
And 1 remedial actions are used after "CO_N1012_N4012" at "auto"
And 0 remedial actions are used after "CO_N1012_N4012" at "curative"
And the worst margin is -20.0 A on cnec "N1013_N1014 - preventive"
And the value of the objective function initially should be 20.0
And the value of the objective function after PRA should be 20.0
And the value of the objective function after CRA should be 10020.2
And the worst margin is -1419.4 A

@fast @cne-export @mock
# CNE export
Expand All @@ -148,14 +133,9 @@ Feature: US 12.15: export different reason per perimeter in SWE CNE
Given crac creation parameters file is "epic12/CimCracCreationParameters_MonitorLeftSide.json"
Given configuration file is "epic12/raoParametersSweIDCC_minObjectiveDisabled2P.json"
When I launch search_tree_rao at "2021-04-02 05:00"
Then the calculation partially fails
And 1 remedial actions are used in preventive
And the remedial action "PRA_OPEN_N1011_N1013" is used in preventive
And 0 remedial actions are used after "CO_N1012_N4012" at "curative"
And the worst margin is 198 A on cnec "N1013_N1014 - preventive"
And the value of the objective function initially should be 20.2
And the value of the objective function after PRA should be 9801.7
And the value of the objective function after CRA should be 9801.7
Then the optimization steps executed by the RAO should be "FIRST_PREVENTIVE_FELLBACK_TO_INITIAL_SITUATION"
And 0 remedial actions are used in preventive
And the worst margin is -1419.4 A on cnec "N1013_N1014 - CO_N1012_N4012 - curative"

@fast @rao @mock @ac @contingency-scenarios @second-preventive
# 2P does not apply the same PRA as previously since it leads to a sensi divergence on a curative perimeter : no PRA is applied
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,9 @@ Feature: US 13.3 : Solve a RAO for N compounds states
Given crac file is "epic13/SL_ep13us3case1.json"
Given configuration file is "common/RaoParameters_maxMargin_ampere.json"
When I launch search_tree_rao
Then 3 remedial actions are used in preventive
And the remedial action "close_de3_de4" is used in preventive
And the remedial action "close_fr1_fr5" is used in preventive
And the tap of PstRangeAction "pst_fr" should be 15 in preventive
And 2 remedial actions are used after "co1_fr2_fr3_1" at "curative"
And the remedial action "open_fr1_fr3" is 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 -242 A
And the margin on cnec "FFR1AA1 FFR4AA1 1 - co1_fr2_fr3_1 - curative" after CRA should be -242 A
And the margin on cnec "FFR3AA1 FFR5AA1 1 - co1_fr2_fr3_1 - curative" after CRA should be 675 A
And the margin on cnec "FFR3AA1 FFR5AA1 1 - co1_fr2_fr3_1 - outage" after PRA should be 984 A
And the margin on cnec "FFR4AA1 DDE1AA1 1 - preventive" after PRA should be 984 A
And the value of the objective function after CRA should be 242
Then the optimization steps executed by the RAO should be "FIRST_PREVENTIVE_FELLBACK_TO_INITIAL_SITUATION"
And 0 remedial actions are used in preventive
And the worst margin is 114 A

@fast @rao @mock @ac @contingency-scenarios
Scenario: US 13.3.2: Simple case, with 2 curative states
Expand Down Expand Up @@ -209,16 +199,5 @@ Feature: US 13.3 : Solve a RAO for N compounds states
Given crac file is "epic13/CBCORA_ep13us3case10.xml"
Given configuration file is "common/RaoParameters_maxMargin_ampere.json"
When I launch search_tree_rao at "2019-01-08 12:00"
Then 3 remedial actions are used in preventive
And the remedial action "close_de3_de4" is used in preventive
And the remedial action "close_fr1_fr5" is used in preventive
And the tap of PstRangeAction "pst_fr" should be 15 in preventive
And 2 remedial actions are used after "CO1_fr2_fr3_1" at "curative"
And the remedial action "open_fr1_fr3" is 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 -242 A
And the margin on cnec "fr1_fr4_CO1 - curative" after CRA should be -242 A
And the margin on cnec "fr3_fr5_CO1 - DIR - curative" after CRA should be 675 A
And the margin on cnec "fr3_fr5_CO1 - DIR - outage" after PRA should be 984 A
And the margin on cnec "fr4_de1_N - preventive" after PRA should be 984 A
And the value of the objective function after CRA should be 242
Then the optimization steps executed by the RAO should be "FIRST_PREVENTIVE_FELLBACK_TO_INITIAL_SITUATION"
And the worst margin is 114 A
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,8 @@ Feature: US 13.4: Dynamic of topological remedial actions available in several i
Given crac file is "epic13/SL_ep13us4case2.json"
Given configuration file is "common/RaoParameters_maxMargin_ampere.json"
When I launch search_tree_rao
Then 3 remedial actions are used in preventive
And the remedial action "close_de3_de4" is used in preventive
And the tap of PstRangeAction "pst_fr" should be -5 in preventive
And the tap of PstRangeAction "pst_be" should be -16 in preventive
And 0 remedial actions are used after "co1_fr2_fr3_1" at "curative"
And the tap of PstRangeAction "pst_fr" should be -5 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 -653 A
And the margin on cnec "FFR4AA1 DDE1AA1 1 - co1_fr2_fr3_1 - curative" after CRA should be -653 A
And the margin on cnec "FFR2AA1 DDE3AA1 1 - preventive" after PRA should be 340 A
And the margin on cnec "FFR2AA1 DDE3AA1 1 - co1_fr2_fr3_1 - outage" after PRA should be 703 A
And the value of the objective function after CRA should be 653
Then the optimization steps executed by the RAO should be "FIRST_PREVENTIVE_FELLBACK_TO_INITIAL_SITUATION"
And the worst margin is -522 A

@fast @rao @mock @ac @contingency-scenarios
Scenario: US 13.4.3: Topological RA available in preventive and curative : used in curative
Expand All @@ -63,18 +53,9 @@ Feature: US 13.4: Dynamic of topological remedial actions available in several i
Given crac file is "epic13/SL_ep13us4case4.json"
Given configuration file is "common/RaoParameters_maxMargin_ampere.json"
When I launch search_tree_rao
Then 3 remedial actions are used in preventive
And the remedial action "close_de3_de4_pra" is used in preventive
And the tap of PstRangeAction "pst_fr" should be -5 in preventive
And the tap of PstRangeAction "pst_be" should be -16 in preventive
And 0 remedial actions are used after "co1_fr2_fr3_1" at "curative"
And the tap of PstRangeAction "pst_fr" should be -5 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 -653 A
And the margin on cnec "FFR4AA1 DDE1AA1 1 - co1_fr2_fr3_1 - curative" after CRA should be -653 A
And the margin on cnec "FFR2AA1 DDE3AA1 1 - preventive" after PRA should be 340 A
And the margin on cnec "FFR2AA1 DDE3AA1 1 - co1_fr2_fr3_1 - outage" after PRA should be 703 A
And the value of the objective function after CRA should be 653
Then the optimization steps executed by the RAO should be "FIRST_PREVENTIVE_FELLBACK_TO_INITIAL_SITUATION"
And the worst margin is -522 A


@fast @rao @mock @ac @contingency-scenarios
Scenario: US 13.4.5: Topological RA duplicated into PRA and CRA : CRA is activated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,8 @@ Feature: US 13.5: dynamic of range actions available in several instants
Given crac file is "epic13/SL_ep13us5case4.json"
Given configuration file is "common/RaoParameters_maxMargin_ampere.json"
When I launch search_tree_rao
Then the worst margin is -247 A
And the margin on cnec "FFR2AA1 FFR3AA1 2 - co1_fr2_fr3_1 - curative" after CRA should be -247 A
And the margin on cnec "FFR2AA1 DDE3AA1 1 - preventive" after PRA should be 149 A
And the margin on cnec "FFR2AA1 DDE3AA1 1 - co1_fr2_fr3_1 - outage" after PRA should be 575 A
And the margin on cnec "FFR3AA1 FFR5AA1 1 - co1_fr2_fr3_1 - curative" after CRA should be 774 A
And the margin on cnec "FFR3AA1 FFR5AA1 1 - co1_fr2_fr3_1 - outage" after PRA should be 1179 A
And the remedial action "open_fr1_fr2" is used in preventive
And the remedial action "close_fr1_fr5" is used after "co1_fr2_fr3_1" at "curative"
And the tap of PstRangeAction "pst_fr_pra" should be -7 in preventive
And the tap of PstRangeAction "pst_fr_cra" should be 1 after "co1_fr2_fr3_1" at "curative"
And the tap of PstRangeAction "pst_be" should be 0 in preventive
And the tap of PstRangeAction "pst_be" should be -16 after "co1_fr2_fr3_1" at "curative"
And the value of the objective function after CRA should be 247
Then the optimization steps executed by the RAO should be "FIRST_PREVENTIVE_FELLBACK_TO_INITIAL_SITUATION"
And the worst margin is -184.1 A

@fast @rao @mock @ac @contingency-scenarios
Scenario: US 13.5.5: Preventive and curative optimization with absolute limit on curative PST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,7 @@ Feature: US 13.6: cross validation curative optimization and MNECs
Given crac file is "epic13/MergedCB_ep13us6case3.xml"
Given configuration file is "epic11/RaoParameters_maxMargin_megawatt_ac_mnecDimin20.json"
When I launch search_tree_rao at "2019-01-08 12:00"
Then the margin on cnec "NL2-BE3-O - outage" after PRA should be -83.0 MW
And the margin on cnec "NL2-BE3-O - curative" after CRA should be -103.0 MW
And 3 remedial actions are used after "Contingency_FR1_FR3" at "curative"
And the remedial action "Open line DE1-DE2" is used after "Contingency_FR1_FR3" at "curative"
And the remedial action "Open line NL1-NL2" is used after "Contingency_FR1_FR3" at "curative"
And the tap of PstRangeAction "PRA_PST_BE" should be 8 after "Contingency_FR1_FR3" at "curative"
And the margin on cnec "FR2-FR3-OO - curative" after CRA should be -96 MW
Then the optimization steps executed by the RAO should be "FIRST_PREVENTIVE_FELLBACK_TO_INITIAL_SITUATION"
And the value of the objective function after CRA should be 286

@fast @rao @mock @ac @contingency-scenarios @mnec
Expand Down Expand Up @@ -102,20 +96,8 @@ Feature: US 13.6: cross validation curative optimization and MNECs
Given crac file is "epic13/SL_ep13us2case6_with_mnec_curative.json"
Given configuration file is "common/RaoParameters_maxMargin_ampere.json"
When I launch search_tree_rao
Then 2 remedial actions are used in preventive
And the remedial action "open_be1_be4" is used in preventive
And the tap of PstRangeAction "pst_fr" should be 2 in preventive
And the initial margin on cnec "FFR1AA1 FFR2AA1 1 - preventive" should be 70 MW
And the margin on cnec "FFR1AA1 FFR2AA1 1 - preventive" after PRA should be 5 MW
# Flow is -572 MW without RA, and threshold -700 MW.
And the initial margin on cnec "BBE1AA1 BBE2AA1 1 - co1_fr2_fr3_1 - curative" should be 127 MW
# Here the margin should not be negative because the branch is a MNEC and initial margin was positive.
# Flow is -643 MW with PRA and CRA (actually no CRA were activated in this test case), and threshold -700 MW. Margin is positive.
And the margin on cnec "BBE1AA1 BBE2AA1 1 - co1_fr2_fr3_1 - curative" after CRA should be 57 MW
# 2 Remedial actions would have been used if the MNEC was not limiting
And 0 remedial actions are used after "co1_fr2_fr3_1" at "curative"
And the worst margin is 612 A on cnec "FFR3AA1 FFR5AA1 1 - co1_fr2_fr3_1 - curative"
And the value of the objective function after CRA should be -612
Then the optimization steps executed by the RAO should be "FIRST_PREVENTIVE_FELLBACK_TO_INITIAL_SITUATION"
And the value of the objective function after CRA should be -679.48

@fast @rao @mock @ac @contingency-scenarios @mnec
Scenario: US 13.6.7: Simple case with a mix of preventive and curative remedial actions and MNECs in preventive and curative limited by initial value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,7 @@ Feature: US 15.11.5: Additional tests to check various fixes concerning automato
Given crac file is "epic15/crac_15_11_5_1.json"
Given configuration file is "epic15/RaoParameters_ep15us11-5-3-3.json"
When I launch search_tree_rao
And the remedial action "open_de1_de2_open_nl2_be3 - prev" is not used in preventive
And the remedial action "open_de2_nl3 - co1 - auto" is not used after "co1_fr2_de3" at "auto"
And the remedial action "close_fr2_de3 - co1 - auto" is used after "co1_fr2_de3" at "auto"
And the tap of PstRangeAction "pst_be" should be -16 after "co1_fr2_de3" at "curative"
And the margin on cnec "be1_be3_co1 - BBE1AA11->BBE3AA11 - co1_fr2_de3 - curative" after PRA should be -302.38 MW
And the margin on cnec "be1_be3_co1 - BBE1AA11->BBE3AA11 - co1_fr2_de3 - auto" after ARA should be -223.44 MW
And the margin on cnec "be1_be3_co1 - BBE1AA11->BBE3AA11 - co1_fr2_de3 - curative" after CRA should be 240.61 MW
And the optimization steps executed by the RAO should be "FIRST_PREVENTIVE_ONLY"
Then the optimization steps executed by the RAO should be "FIRST_PREVENTIVE_FELLBACK_TO_INITIAL_SITUATION"

@fast @rao @mock @dc @second-preventive
Scenario: US 15.11.5.6: Considering ARA in 2P improves 2P optimization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,8 @@ Feature: US 19.2: Handle maximum topological CRA per TSO
Given crac file is "epic19/SL_ep19us2case1.json"
Given configuration file is "common/RaoParameters_maxMargin_ampere.json"
When I launch search_tree_rao
Then 3 remedial actions are used in preventive
And the remedial action "open_be1_be4" is used in preventive
And the remedial action "open_fr1_fr2" is used in preventive
And the tap of PstRangeAction "pst_be" should be -15 in preventive
Then 1 remedial actions are used after "co1_fr2_fr3_1" at "curative"
And the tap of PstRangeAction "pst_fr" should be -5 after "co1_fr2_fr3_1" at "curative"
And the worst margin is -810 A on cnec "FFR1AA1 FFR4AA1 1 - co1_fr2_fr3_1 - curative"
And the margin on cnec "BBE4AA1 FFR5AA1 1 - preventive" after PRA should be 300 A
And the margin on cnec "BBE2AA1 FFR3AA1 1 - preventive" after PRA should be 308 A
Then the margin on cnec "FFR1AA1 FFR4AA1 1 - co1_fr2_fr3_1 - curative" after CRA should be -810 A
Then the margin on cnec "BBE4AA1 FFR5AA1 1 - co1_fr2_fr3_1 - curative" after CRA should be 335 A
Then the margin on cnec "FFR3AA1 FFR5AA1 1 - co1_fr2_fr3_1 - curative" after CRA should be 352 A
Then the margin on cnec "BBE2AA1 FFR3AA1 1 - co1_fr2_fr3_1 - curative" after CRA should be 392 A
Then the optimization steps executed by the RAO should be "FIRST_PREVENTIVE_FELLBACK_TO_INITIAL_SITUATION"
And the worst margin is -686.35 A on cnec "FFR1AA1 FFR4AA1 1 - co1_fr2_fr3_1 - curative"

@fast @rao @mock @ac @contingency-scenarios
Scenario: US 19.2.2: Check that the maximum number of network actions per TSO is respected in curative - reference run
Expand Down Expand Up @@ -74,10 +63,7 @@ Feature: US 19.2: Handle maximum topological CRA per TSO
Given crac file is "epic19/SL_ep19us2case5.json"
Given configuration file is "common/RaoParameters_maxMargin_ampere.json"
When I launch search_tree_rao
Then 2 remedial actions are used in preventive
And the remedial action "open_be1_be4" is used in preventive
And the remedial action "open_fr1_fr2" is used in preventive
And 0 remedial actions are used after "co1_fr2_fr3_1" at "curative"
Then the optimization steps executed by the RAO should be "FIRST_PREVENTIVE_FELLBACK_TO_INITIAL_SITUATION"

@fast @rao @mock @ac @contingency-scenarios
Scenario: US 19.2.6: Check country filtering is well done in curative
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,4 @@ Feature: US 19.5: max number of CRAs
Given crac file is "epic19/SL_ep19us5case10.json"
Given configuration file is "common/RaoParameters_maxMargin_ampere.json"
When I launch search_tree_rao
Then 3 remedial actions are used in preventive
And the remedial action "open_be1_be4" is used in preventive
And the remedial action "open_fr1_fr2" is used in preventive
And the tap of PstRangeAction "pst_be" should be -15 in preventive
Then the optimization steps executed by the RAO should be "FIRST_PREVENTIVE_FELLBACK_TO_INITIAL_SITUATION"
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,4 @@ Feature: US 19.6: handle maximum number of TSOs using RAs in curative optimizati
Given crac file is "epic19/SL_ep19us6case10.json"
Given configuration file is "common/RaoParameters_maxMargin_ampere.json"
When I launch search_tree_rao
Then 3 remedial actions are used in preventive
And the remedial action "open_be1_be4" is used in preventive
And the remedial action "open_fr1_fr2" is used in preventive
And the tap of PstRangeAction "pst_be" should be -15 in preventive
Then the optimization steps executed by the RAO should be "FIRST_PREVENTIVE_FELLBACK_TO_INITIAL_SITUATION"
Loading

0 comments on commit 159c8e2

Please sign in to comment.