From 7b9e9de867bd7a1259d351c38246e873c9cc2ca3 Mon Sep 17 00:00:00 2001 From: Peter Mitri <47452063+pet-mit@users.noreply.github.com> Date: Thu, 11 Apr 2024 17:54:57 +0200 Subject: [PATCH] Add SWE CNE tests for angle values (#966) Signed-off-by: Peter Mitri Co-authored-by: phiedw Signed-off-by: belthlemar --- .../epic12_export_improvement/US12_15.feature | 26 +++ .../files/cne/epic12/ExpectedCNE_12_15_5.xml | 147 +++++++++++++++ .../files/crac/epic12/CIM_12_15_5.xml | 168 ++++++++++++++++++ .../raoresults/epic12/RaoResult_12_15_5.json | 161 +++++++++++++++++ 4 files changed, 502 insertions(+) create mode 100644 tests/src/test/resources/files/cne/epic12/ExpectedCNE_12_15_5.xml create mode 100644 tests/src/test/resources/files/crac/epic12/CIM_12_15_5.xml create mode 100644 tests/src/test/resources/files/raoresults/epic12/RaoResult_12_15_5.json diff --git a/tests/src/test/resources/features/epic12_export_improvement/US12_15.feature b/tests/src/test/resources/features/epic12_export_improvement/US12_15.feature index 8080257362..36c9286d80 100644 --- a/tests/src/test/resources/features/epic12_export_improvement/US12_15.feature +++ b/tests/src/test/resources/features/epic12_export_improvement/US12_15.feature @@ -275,3 +275,29 @@ Feature: US 12.15: export different reason per perimeter in SWE CNE When I import data at "2021-04-02 05:00" And I export SWE CNE Then the exported CNE file is the same as "epic12/ExpectedCNE_12_15_4.xml" + + @fast @cne-export @mock + Scenario: US 12.15.5: CNE export with angles + # Copy of 12.15.4 with extra angle CNEC and extra angle values in RAO result + # Expected CNE is the same as 12.5.4 with the extra angle value information + Given network file is "epic12/nordic32.xiidm" + Given crac file is "epic12/CIM_12_15_5.xml" + Given crac creation parameters file is "epic12/CimCracCreationParameters_MonitorLeftSide.json" + Given configuration file is "epic12/raoParametersSweIDCC_minObjectiveDisabled2P.json" + Given RaoResult file is "epic12/RaoResult_12_15_5.json" + When I import data at "2021-04-02 05:00" + And I export SWE CNE + Then the exported CNE file is the same as "epic12/ExpectedCNE_12_15_5.xml" + + @fast @cne-export @mock + Scenario: US 12.15.6: CNE export with angles, no angle results + # Copy of 12.15.4 with extra angle CNEC but no angle values in RAO result + # Should not fail. Should instead skip angle CNECs, thus expected CNE is the same as 12.5.4 + Given network file is "epic12/nordic32.xiidm" + Given crac file is "epic12/CIM_12_15_5.xml" + Given crac creation parameters file is "epic12/CimCracCreationParameters_MonitorLeftSide.json" + Given configuration file is "epic12/raoParametersSweIDCC_minObjectiveDisabled2P.json" + Given RaoResult file is "epic12/RaoResult_12_15_4.json" + When I import data at "2021-04-02 05:00" + And I export SWE CNE + Then the exported CNE file is the same as "epic12/ExpectedCNE_12_15_4.xml" diff --git a/tests/src/test/resources/files/cne/epic12/ExpectedCNE_12_15_5.xml b/tests/src/test/resources/files/cne/epic12/ExpectedCNE_12_15_5.xml new file mode 100644 index 0000000000..1dc44b1fec --- /dev/null +++ b/tests/src/test/resources/files/cne/epic12/ExpectedCNE_12_15_5.xml @@ -0,0 +1,147 @@ + + + documentId + 3 + B06 + A48 + senderId + A44 + receiverId + A36 + 2023-01-30T15:58:09Z + + 2019-04-01T13:09Z + 2019-04-01T14:09Z + + + CNE_RAO_CASTOR-TimeSeries-1 + B54 + A01 + + + 2021-04-02T03:00Z + 2021-04-02T04:00Z + + PT60M + + 1 + + 1ddcfad-29bb-4ef1-828f-ed7065fd8928 + B56 + + + db4a7e0-dde6-4cc3-9ca5-4816d6f26491 + B56 + + CO_N1012_N1014 + CO_N1012_N1014 + + + + b893392-32ed-4569-8bcf-f022fb4c5933 + B56 + + CO_N1012_N4012 + CO_N1012_N4012 + + + + ab18126-3240-4a1d-808a-2884cd09875f + B57 + + CNE_N1011_N1013 + CNE_N1011_N1013 + + N1011___-N1013___-1_AC + N1011_N1013 + N1011____VL + N1013____VL + + A01 + AMP + A02 + 1076 + + + A02 + AMP + A02 + 1000 + + + + + + e1fc140-be92-4ed1-bf9a-befe09ab1553 + B57 + + AC-1 + B87 + Angle-Constraint + 20.0 + + + CO_N1012_N1014 + CO_N1012_N1014 + + + CNE_N1013_N1014 + CNE_N1013_N1014 + + N1013___-N1014___-1_AC + N1013_N1014 + N1013____VL + N1014____VL + + A01 + AMP + A02 + 700 + + + A13 + AMP + A02 + 500 + + + + + + 5ac608b-32a2-46da-b497-5eb07774e9cd + B57 + + CO_N1012_N4012 + CO_N1012_N4012 + + + CNE_N1013_N1014 + CNE_N1013_N1014 + + N1013___-N1014___-1_AC + N1013_N1014 + N1013____VL + N1014____VL + + A01 + AMP + A02 + 1919 + + + A13 + AMP + A02 + 500 + + + + + + Z03 + Network is unsecure + + + + + diff --git a/tests/src/test/resources/files/crac/epic12/CIM_12_15_5.xml b/tests/src/test/resources/files/crac/epic12/CIM_12_15_5.xml new file mode 100644 index 0000000000..beda373e1e --- /dev/null +++ b/tests/src/test/resources/files/crac/epic12/CIM_12_15_5.xml @@ -0,0 +1,168 @@ + + + CORESO-20210402-SWECCD2-F011 + 1 + B15 + A48 + 22XCORESO------S + A36 + 10XES-REE------E + A04 + 2021-03-31T15:02:00Z + + A42 + + + 2021-04-01T22:00Z + 2021-04-02T22:00Z + + 10YCB-FR-ES-PT-S + + TimeSeries + B54 + A03 + 10YES-REE------0 + 10YFR-RTE------C + + + 2021-04-01T22:00Z + 2021-04-02T22:00Z + + PT60M + + 1 + + CoList + B55 + CoList + A52 + + CO_N1012_N4012 + CO_N1012_N4012 + + N1012___-N4012___-1_PT + N1012_N4012 + 10YFR-RTE------C + 10YFR-RTE------C + + + + CO_N1012_N1014 + CO_N1012_N1014 + + N1012___-N1014___-2_AC + N1012_N1014 + 10YFR-RTE------C + 10YFR-RTE------C + + + + + MRList + B57 + Monitored_Resources + A52 + + CNE_N1011_N1013 + CNE_N1011_N1013 + + N1011___-N1013___-1_AC + N1011_N1013 + 10YFR-RTE------C + 10YFR-RTE------C + + A02 + AMP + 1000.0 + + + + + CNE_N1013_N1014 + CNE_N1013_N1014 + + N1013___-N1014___-1_AC + N1013_N1014 + 10YFR-RTE------C + 10YFR-RTE------C + + A13 + AMP + 500.0 + + + + + + PRAList + B56 + PRAList + Z01 + + PRA_OPEN_N1011_N1013 + PRA_OPEN_N1011_N1013 + B59 + A18 + A39 + + N1011___-N1013___-1_AC + N1013_N1014 + A02 + 10YPT-REN------W + 10YPT-REN------W + A21 + + + + + CRAList + B56 + CRAList + Z01 + + AC-1 + B87 + Angle-Constraint + DD + 30 + + N4012____VL + ONE + A47 + + + N4011____VL + TWO + A46 + + + + CO_N1012_N1014 + CO_N1012_N1014 + + N1012___-N1014___-2_AC + N1012_N1014 + 10YFR-RTE------C + 10YFR-RTE------C + + + + CRA_CLOSE_N1012_N4012 + CRA_CLOSE_N1012_N4012 + B59 + A19 + A39 + + N1012___-N4012___-1_PT + N1012_N4012 + A02 + 10YPT-REN------W + 10YPT-REN------W + A22 + + + + + + + \ No newline at end of file diff --git a/tests/src/test/resources/files/raoresults/epic12/RaoResult_12_15_5.json b/tests/src/test/resources/files/raoresults/epic12/RaoResult_12_15_5.json new file mode 100644 index 0000000000..0b89c79dfc --- /dev/null +++ b/tests/src/test/resources/files/raoresults/epic12/RaoResult_12_15_5.json @@ -0,0 +1,161 @@ +{ + "type" : "RAO_RESULT", + "version" : "1.3", + "info" : "Generated by FARAO http://farao-community.github.io", + "computationStatus" : "default", + "costResults" : { + "initial" : { + "functionalCost" : 1419.4 + }, + "afterPRA" : { + "functionalCost" : 1419.4, + "virtualCost" : { + "sensitivity-fallback-cost" : 0.0, + "sensitivity-failure-cost" : 0.0 + } + }, + "afterARA" : { + "functionalCost" : 1419.4, + "virtualCost" : { + "sensitivity-fallback-cost" : 0.0, + "sensitivity-failure-cost" : 0.0 + } + }, + "afterCRA" : { + "functionalCost" : 1419.4, + "virtualCost" : { + "sensitivity-fallback-cost" : 0.0, + "sensitivity-failure-cost" : 0.0 + } + } + }, + "computationStatusMap" : [ { + "computationStatus" : "DEFAULT", + "instant" : "preventive" + }, { + "computationStatus" : "DEFAULT", + "instant" : "curative", + "contingency" : "CO_N1012_N1014" + }, { + "computationStatus" : "DEFAULT", + "instant" : "curative", + "contingency" : "CO_N1012_N4012" + } ], + "flowCnecResults" : [ { + "flowCnecId" : "N1011_N1013 - preventive", + "initial" : { + "ampere" : { + "margin" : -75.64, + "leftSide" : { + "flow" : -1075.64 + } + } + }, + "afterPRA" : { + "ampere" : { + "margin" : -75.64, + "leftSide" : { + "flow" : -1075.64 + } + } + } + }, { + "flowCnecId" : "N1013_N1014 - CO_N1012_N1014 - curative", + "initial" : { + "ampere" : { + "margin" : -199.95, + "leftSide" : { + "flow" : -699.95 + } + } + }, + "afterPRA" : { + "ampere" : { + "margin" : -199.95, + "leftSide" : { + "flow" : -699.95 + } + } + }, + "afterARA" : { + "ampere" : { + "margin" : -199.95, + "leftSide" : { + "flow" : -699.95 + } + } + }, + "afterCRA" : { + "ampere" : { + "margin" : -199.95, + "leftSide" : { + "flow" : -699.95 + } + } + } + }, { + "flowCnecId" : "N1013_N1014 - CO_N1012_N4012 - curative", + "initial" : { + "ampere" : { + "margin" : -1419.4, + "leftSide" : { + "flow" : -1919.4 + } + } + }, + "afterPRA" : { + "ampere" : { + "margin" : -1419.4, + "leftSide" : { + "flow" : -1919.4 + } + } + }, + "afterARA" : { + "ampere" : { + "margin" : -1419.4, + "leftSide" : { + "flow" : -1919.4 + } + } + }, + "afterCRA" : { + "ampere" : { + "margin" : -1419.4, + "leftSide" : { + "flow" : -1919.4 + } + } + } + } ], + "angleCnecResults" : [ { + "angleCnecId" : "AC-1", + "initial" : { + "degree" : { + "angle" : 20.0, + "margin" : 10.0 + } + }, + "afterPRA" : { + "degree" : { + "angle" : 20.0, + "margin" : 10.0 + } + }, + "afterARA" : { + "degree" : { + "angle" : 20.0, + "margin" : 10.0 + } + }, + "afterCRA" : { + "degree" : { + "angle" : 20.0, + "margin" : 10.0 + } + } + } ], + "voltageCnecResults" : [ ], + "networkActionResults" : [ ], + "rangeActionResults" : [ ] +} \ No newline at end of file