Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne LESOT <[email protected]>
  • Loading branch information
EtienneLt committed Oct 1, 2024
1 parent 58f1a50 commit 6db2232
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ public static void setNewValue(TwoWindingsTransformer transformer, String twoWin
null, new AttributeModification<>(newValue.intValue(), OperationType.SET), null, null);
case RATIO_TARGET_DEADBAND -> modifyTargets(ratioTapChanger, null, true, null, attributeModification, null);
case REGULATION_VALUE -> processPhaseTapRegulation(
phaseTapChanger, null, regulationMode, true, attributeModification, null, null
phaseTapChanger, null, regulationMode, true, attributeModification, null, null, null
);
case PHASE_LOW_TAP_POSITION -> processTapChangerPositionsAndSteps(phaseTapChanger, null, true,
new AttributeModification<>(newValue.intValue(), OperationType.SET), null, null, null);
case PHASE_TAP_POSITION -> processTapChangerPositionsAndSteps(phaseTapChanger, null, true,
null, new AttributeModification<>(newValue.intValue(), OperationType.SET), null, null);
case PHASE_TARGET_DEADBAND -> processPhaseTapRegulation(
phaseTapChanger, null, null, true, null, attributeModification, null
phaseTapChanger, null, null, true, null, attributeModification, null, null
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,9 @@ private void processPhaseTapChanger(Network network,
regulationMode = phaseTapChangerInfos.getRegulationMode().getValue();
}
if (!PhaseTapChanger.RegulationMode.FIXED_TAP.equals(regulationMode)) {
processPhaseTapRegulation(phaseTapChanger, phaseTapChangerAdder, regulationMode, isModification, phaseTapChangerInfos.getRegulationValue(), phaseTapChangerInfos.getTargetDeadband(), regulationReports
);
processPhaseTapRegulation(phaseTapChanger, phaseTapChangerAdder, regulationMode, isModification,
phaseTapChangerInfos.getRegulationValue(), phaseTapChangerInfos.getTargetDeadband(),
phaseTapChangerInfos.getRegulating(), regulationReports);
}

processRegulatingTerminal(phaseTapChangerInfos, phaseTapChanger, phaseTapChangerAdder, regulationReports,
Expand Down Expand Up @@ -254,6 +255,7 @@ public static void processPhaseTapRegulation(PhaseTapChanger phaseTapChanger,
boolean isModification,
AttributeModification<Double> modifyRegulationValue,
AttributeModification<Double> modifyTargetDeadband,
AttributeModification<Boolean> regulating,
List<ReportNode> regulationReports) {

if (regulationMode != null) {
Expand Down Expand Up @@ -284,8 +286,8 @@ public static void processPhaseTapRegulation(PhaseTapChanger phaseTapChanger,
isModification ? phaseTapChanger::setRegulating
: phaseTapChangerAdder::setRegulating,
isModification ? phaseTapChanger::isRegulating : () -> null,
phaseTapChangerInfos.getRegulating(), "Regulating", 2);
if (regulatingReport != null) {
regulating, "Regulating", 2);
if (regulationReports != null && regulatingReport != null) {
regulationReports.add(regulatingReport);
}
}
Expand Down

0 comments on commit 6db2232

Please sign in to comment.