Skip to content
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

Merged
merged 14 commits into from
Jan 17, 2020
Merged

Regulating terminal for SVC #1072

merged 14 commits into from
Jan 17, 2020

Conversation

miovd
Copy link
Contributor

@miovd miovd commented Dec 11, 2019

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

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

@miovd miovd added the IIDM label Dec 11, 2019
@miovd miovd force-pushed the regulating_terminal_for_svc branch from bd055bb to 42a0061 Compare December 12, 2019 15:31
@miovd miovd changed the title [WIP] Regulating terminal for SVC Regulating terminal for SVC Dec 12, 2019
@miovd miovd changed the title Regulating terminal for SVC [WIP] Regulating terminal for SVC Dec 12, 2019
@miovd miovd changed the title [WIP] Regulating terminal for SVC Regulating terminal for SVC Dec 12, 2019
@miovd miovd changed the title Regulating terminal for SVC [WIP] Regulating terminal for SVC Dec 12, 2019
@miovd miovd changed the title [WIP] Regulating terminal for SVC Regulating terminal for SVC Dec 16, 2019
@miovd miovd removed the Breaking Change API is broken label Dec 16, 2019
@miovd miovd requested a review from mathbagu December 17, 2019 09:08
@miovd miovd force-pushed the regulating_terminal_for_svc branch from 06bb575 to 9ffd4af Compare December 17, 2019 11:42
@miovd miovd added this to PR in progress in Evolutions IIDM Jan 9, 2020
@miovd miovd changed the title Regulating terminal for SVC [WIP] Regulating terminal for SVC Jan 9, 2020
@miovd miovd added Breaking Change API is broken and removed PR: next-release labels Jan 10, 2020
@miovd miovd force-pushed the regulating_terminal_for_svc branch from 9ffd4af to fdbfa58 Compare January 10, 2020 11:44
@miovd miovd changed the title [WIP] Regulating terminal for SVC Regulating terminal for SVC Jan 10, 2020
@miovd miovd force-pushed the regulating_terminal_for_svc branch 2 times, most recently from 45d5d8a to 6a9bf9f Compare January 13, 2020 14:54
@miovd miovd requested a review from mathbagu January 13, 2020 15:09
@miovd miovd changed the title [WIP] Regulating terminal for SVC Regulating terminal for SVC Jan 16, 2020
@Override
protected String getRootElementName() {
return ROOT_ELEMENT_NAME;
}

@Override
protected boolean hasSubElements(StaticVarCompensator svc) {
return false;
return !Objects.equals(svc, svc.getRegulatingTerminal().getConnectable());
Copy link
Contributor

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.

Copy link
Contributor Author

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())) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same worry here

@miovd miovd force-pushed the regulating_terminal_for_svc branch from 01ec53c to cdf14e4 Compare January 17, 2020 15:21
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>
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>
@sonarcloud
Copy link

sonarcloud bot commented Jan 17, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

91.8% 91.8% Coverage
0.0% 0.0% Duplication

@miovd miovd merged commit fa5171e into master Jan 17, 2020
Evolutions IIDM automation moved this from PR in progress to Merged PR Jan 17, 2020
@miovd miovd deleted the regulating_terminal_for_svc branch January 17, 2020 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Evolutions IIDM
  
Merged PR
Development

Successfully merging this pull request may close these issues.

None yet

2 participants