From 6d8b414e2054f4abc569076e815df65f1f07dca7 Mon Sep 17 00:00:00 2001 From: p-arvy Date: Thu, 19 Dec 2024 17:44:38 +0100 Subject: [PATCH] Clean Signed-off-by: p-arvy --- open-reac/src/main/resources/openreac/commons.mod | 4 ++-- open-reac/src/main/resources/openreac/dcopf.run | 2 +- .../optimization/OpenReacOptimizationIndicatorsTest.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/open-reac/src/main/resources/openreac/commons.mod b/open-reac/src/main/resources/openreac/commons.mod index 000a36a8..d34ad388 100644 --- a/open-reac/src/main/resources/openreac/commons.mod +++ b/open-reac/src/main/resources/openreac/commons.mod @@ -131,7 +131,7 @@ set BUSVV := {n in BUSCC : bus_V0[1,n] >= min_plausible_low_voltage_limit}; # Reactive set SHUNTCC := {(1,s,n) in SHUNT: n in BUSCC or shunt_possiblebus[1,s,n] in BUSCC}; # We want to be able to reconnect shunts -set BRANCHCC_REGL := {(qq,m,n) in BRANCHCC union BRANCHCC_WITH_SIDE_2_OPENED diff BRANCHZNULL: branch_ptrRegl[1,qq,m,n] != -1 }; # ratio tap changers have impact on lines with side 1 opened +set BRANCHCC_REGL := {(qq,m,n) in BRANCHCC union BRANCHCC_WITH_SIDE_2_OPENED diff BRANCHZNULL: branch_ptrRegl[1,qq,m,n] != -1 }; # ratio tap changers also have impact on lines with side 2 opened set BRANCHCC_DEPH := {(qq,m,n) in BRANCHCC diff BRANCHZNULL: branch_ptrDeph[1,qq,m,n] != -1 }; set SVCCC := {(1,svc,n) in SVC: n in BUSCC}; @@ -170,7 +170,7 @@ set UNIT_FIXQ := {(g,n) in UNITON: g in PARAM_UNIT_FIXQ and abs(unit_Qc[1,g,n])< set BRANCHCC_REGL_VAR := { (qq,m,n) in BRANCHCC_REGL: qq in PARAM_TRANSFORMERS_RATIO_VARIABLE - and (qq,m,n) not in BRANCHCC_WITH_SIDE_2_OPENED # ratio tap changers on branch with side 2 opened are not optimized + and (qq,m,n) not in BRANCHCC_WITH_SIDE_2_OPENED # ratio tap changers on opened branches are not optimized and regl_ratio_min[1,branch_ptrRegl[1,qq,m,n]] < regl_ratio_max[1,branch_ptrRegl[1,qq,m,n]] }; set BRANCHCC_REGL_FIX := BRANCHCC_REGL diff BRANCHCC_REGL_VAR; diff --git a/open-reac/src/main/resources/openreac/dcopf.run b/open-reac/src/main/resources/openreac/dcopf.run index a1056497..77c8f471 100644 --- a/open-reac/src/main/resources/openreac/dcopf.run +++ b/open-reac/src/main/resources/openreac/dcopf.run @@ -88,7 +88,7 @@ printf{LOG_INFO} "OK all slack variables for DCOPF are null\n"; let dcopf_status := "OK"; # Print flows on branches with zero impedance -#for{(qq,m,n) in BRANCHZNULL} printf{LOG_INFO} "Flow on zero impedance branch %Q: %.f MW\n",branch_id[1,qq,m,n],activeflow[qq,m,n]; +for{(qq,m,n) in BRANCHCC inter BRANCHZNULL} printf{LOG_INFO} "Flow on zero impedance branch %Q: %.f MW\n",branch_id[1,qq,m,n],activeflow[qq,m,n]; # Print flows on most loaded lines let temp1 := max{(qq,m,n) in BRANCHCC}abs(activeflow[qq,m,n]); diff --git a/open-reac/src/test/java/com/powsybl/openreac/optimization/OpenReacOptimizationIndicatorsTest.java b/open-reac/src/test/java/com/powsybl/openreac/optimization/OpenReacOptimizationIndicatorsTest.java index 13089bde..5e6acd1e 100644 --- a/open-reac/src/test/java/com/powsybl/openreac/optimization/OpenReacOptimizationIndicatorsTest.java +++ b/open-reac/src/test/java/com/powsybl/openreac/optimization/OpenReacOptimizationIndicatorsTest.java @@ -117,11 +117,11 @@ void testBranchesIndicators() throws IOException { assertEquals(OpenReacStatus.OK, result.getStatus()); assertEquals(4, Integer.parseInt(result.getIndicators().get("nb_branch_in_data_file"))); - // verify opened branch are considered in optimization + // verify opened branches are considered in optimization assertEquals(4, Integer.parseInt(result.getIndicators().get("nb_branch_in_AC_CC"))); assertEquals(1, Integer.parseInt(result.getIndicators().get("nb_branch_in_AC_CC_side_1_opened"))); assertEquals(1, Integer.parseInt(result.getIndicators().get("nb_branch_in_AC_CC_side_2_opened"))); - // verify opened branch can be considered as zero impedance branches + // verify opened branches can be considered as zero impedance branches assertEquals(2, Integer.parseInt(result.getIndicators().get("nb_branch_with_nonsmall_impedance"))); assertEquals(2, Integer.parseInt(result.getIndicators().get("nb_branch_with_zero_or_small_impedance"))); }