Skip to content

Commit

Permalink
Always read and write regulating status of ratio tap changer even if …
Browse files Browse the repository at this point in the history
…loadtapchangingcapabilities is set to false

Signed-off-by: RALAMBOTIANA MIORA <[email protected]>
  • Loading branch information
miovd committed Jan 28, 2021
1 parent b38bbf6 commit 994af25
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ protected static void writeRatioTapChanger(String name, RatioTapChanger rtc, Net
if (rtc.hasLoadTapChangingCapabilities() || rtc.isRegulating()) {
context.getWriter().writeAttribute(ATTR_REGULATING, Boolean.toString(rtc.isRegulating()));
}
if (rtc.hasLoadTapChangingCapabilities() || !Double.isNaN(rtc.getTargetV())) {
XmlUtil.writeDouble("targetV", rtc.getTargetV(), context.getWriter());
}
XmlUtil.writeDouble("targetV", rtc.getTargetV(), context.getWriter());
if (rtc.getRegulationTerminal() != null) {
TerminalRefXml.writeTerminalRef(rtc.getRegulationTerminal(), context, ELEM_TERMINAL_REF);
}
Expand All @@ -103,10 +101,8 @@ protected static void readRatioTapChanger(String elementName, RatioTapChangerAdd
.setTapPosition(tapPosition)
.setTargetDeadband(targetDeadband)
.setLoadTapChangingCapabilities(loadTapChangingCapabilities)
.setTargetV(targetV);
if (loadTapChangingCapabilities) {
adder.setRegulating(regulating);
}
.setTargetV(targetV)
.setRegulating(regulating);
boolean[] hasTerminalRef = new boolean[1];
XmlUtil.readUntilEndElement(elementName, context.getReader(), () -> {
switch (context.getReader().getLocalName()) {
Expand Down

0 comments on commit 994af25

Please sign in to comment.