-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regulating terminal for SVC #1072
Conversation
bd055bb
to
42a0061
Compare
06bb575
to
9ffd4af
Compare
iidm/iidm-xml-converter/src/test/resources/V1_1/regulatingStaticVarCompensatorRoundTripRef.xml
Show resolved
Hide resolved
9ffd4af
to
fdbfa58
Compare
45d5d8a
to
6a9bf9f
Compare
iidm/iidm-xml-converter/src/main/java/com/powsybl/iidm/xml/IidmXmlVersion.java
Outdated
Show resolved
Hide resolved
iidm/iidm-xml-converter/src/main/java/com/powsybl/iidm/xml/StaticVarCompensatorXml.java
Show resolved
Hide resolved
@Override | ||
protected String getRootElementName() { | ||
return ROOT_ELEMENT_NAME; | ||
} | ||
|
||
@Override | ||
protected boolean hasSubElements(StaticVarCompensator svc) { | ||
return false; | ||
return !Objects.equals(svc, svc.getRegulatingTerminal().getConnectable()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be discussed (fixed) later: Objects.equals
doesn't compare connectable by address. If a connectable has its equals
method overwritten, we could have unexpected behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I am writing an issue about it to trace it.
@@ -43,6 +47,13 @@ protected void writeRootElementAttributes(StaticVarCompensator svc, VoltageLevel | |||
writePQ(null, svc.getTerminal(), context.getWriter()); | |||
} | |||
|
|||
@Override | |||
protected void writeSubElements(StaticVarCompensator svc, VoltageLevel vl, NetworkXmlWriterContext context) throws XMLStreamException { | |||
if (!Objects.equals(svc, svc.getRegulatingTerminal().getConnectable())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same worry here
01ec53c
to
cdf14e4
Compare
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Kudos, SonarCloud Quality Gate passed!
|
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature
Adds regulating terminal attribute to SVC in IIDM
Updates XIIDM serialization/deserialization
Other information:
Coverage on new code is low because there are few new lines and some are default implementations throwing "not implemented" exceptions