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

Add DanglingLineData and TwtData (#379) #432

Open
wants to merge 4 commits into
base: integration/v1.6.0
Choose a base branch
from

Conversation

sebalaig
Copy link
Contributor

@sebalaig sebalaig commented Apr 29, 2022

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)

Does this PR already have an issue describing the problem ? If so, link to this issue using '#XXX' and skip the rest
Closes #379

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

What is the current behavior? (You can also link to an open issue here)

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change or deprecate an API? If yes, check the following:

  • The Breaking Change or Deprecated label has been added
  • The migration guide has been updated in the github wiki (What changes might users need to make in their application due to this PR?)

Other information:

(if any of the questions/checkboxes don't apply, please delete them entirely)

@sebalaig sebalaig self-assigned this Apr 29, 2022
@sebalaig sebalaig force-pushed the issue379-vAndAngle branch from 6ed23d1 to 0b44f0a Compare May 6, 2022 13:43
@sebalaig sebalaig linked an issue May 6, 2022 that may be closed by this pull request
@sebalaig sebalaig force-pushed the issue379-vAndAngle branch from 0b44f0a to ecfd366 Compare May 6, 2022 15:09
@sebalaig sebalaig changed the title WIP: Add DanglingLineData and TwtData (#379) Add DanglingLineData and TwtData (#379) May 6, 2022
@sebalaig sebalaig force-pushed the issue379-vAndAngle branch from ecfd366 to 22b9d7d Compare May 6, 2022 17:19
@sebalaig sebalaig requested a review from mathbagu May 6, 2022 18:10
include/powsybl/iidm/util/DanglingLineData.hpp Outdated Show resolved Hide resolved
include/powsybl/iidm/util/LinkData.hpp Outdated Show resolved Hide resolved
include/powsybl/iidm/util/LinkData.hpp Show resolved Hide resolved
src/iidm/util/DanglingLineData.cpp Outdated Show resolved Hide resolved
src/iidm/util/LinkData.cpp Outdated Show resolved Hide resolved
src/iidm/util/LinkData.cpp Outdated Show resolved Hide resolved
src/iidm/util/LinkData.cpp Outdated Show resolved Hide resolved
m_ratedU0(twt.getRatedU0()) {
m_rho1 = rho(twt.getLeg1(), m_ratedU0);
m_rho2 = rho(twt.getLeg2(), m_ratedU0);
m_rho3 = rho(twt.getLeg3(), m_ratedU0);

Choose a reason for hiding this comment

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

Why these variables are not initialized in the initialization list?

Copy link
Contributor Author

@sebalaig sebalaig May 24, 2022

Choose a reason for hiding this comment

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

Because m_ratedU0 needs to be initialized, and we cannot initialize m_rho1 in initializer list after m_ratedU0 without having a compiler warning. The solution could be to reorder attributes so that m_rho{1,2,3} are declared after m_ratedU0 ?

Copy link

Choose a reason for hiding this comment

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

No need to use m_rated0 because it’s equivalent to twt.getRated0()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it is needed because it is returned by TwtData::getRatedU0()

src/iidm/util/TwtData.cpp Outdated Show resolved Hide resolved
src/iidm/util/TwtData.cpp Outdated Show resolved Hide resolved
sebalaig added 3 commits May 24, 2022 11:04
… implementation to use it

Signed-off-by: Sébastien LAIGRE <[email protected]>
Signed-off-by: Sébastien LAIGRE <[email protected]>
Signed-off-by: Sébastien LAIGRE <[email protected]>
@sonarcloud
Copy link

sonarcloud bot commented May 24, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 9 Code Smells

59.9% 59.9% Coverage
0.0% 0.0% Duplication

@sonarcloud
Copy link

sonarcloud bot commented Aug 30, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 8 Code Smells

59.9% 59.9% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Voltage and angle in 3wt star buses and boundary nodes
2 participants