Skip to content

Commit

Permalink
Clean
Browse files Browse the repository at this point in the history
Signed-off-by: p-arvy <pierre.arvy@artelys.com>
  • Loading branch information
p-arvy committed Dec 19, 2024
1 parent 5376ecb commit 6d8b414
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions open-reac/src/main/resources/openreac/commons.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion open-reac/src/main/resources/openreac/dcopf.run
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")));
}
Expand Down

0 comments on commit 6d8b414

Please sign in to comment.