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

Support of BusbarSectionContingency for everything #667

Merged
merged 32 commits into from
Mar 31, 2023

Conversation

annetill
Copy link
Member

@annetill annetill commented Dec 8, 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

Maybe :-)

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

This PR is a trial, to see what is missing in the API and what kind of difficulties we can met in the implementation. I am only testing on node/breaker topology network for the moment, but I have in mind to test on bus/breaker topology through the busId.

  • In case of contingency propagation in N/B network, I see not difficulties because the fault propagation will gave me the switches. They will be modeled in the LfNetwork and so, a busbar contingency is similar as a loss of a bus and branches.
  • In case of no contingency propagation, for the moment, I am looking for the bus from the bus/breaker view linked to the terminal of the busbar section. From this bus, I am looking for the connected branches in the same view and I disable them. An improvement could be to consider as open at one side if connected at both sides in pre-contignency network and impedant.

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)

Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
@annetill annetill changed the title [WIP] Support of BusBarSectionContingency for everything [WIP] Support of BusbarSectionContingency for everything Dec 8, 2022
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 8, 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 5 Code Smells

95.7% 95.7% Coverage
0.0% 0.0% Duplication

@annetill annetill requested a review from flo-dup January 10, 2023 13:31
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
assertEquals(-3.895, postContingencyResult.getNetworkResult().getBranchResult("L1").getP2(), LoadFlowAssert.DELTA_POWER);
assertEquals(603.769, postContingencyResult.getNetworkResult().getBranchResult("L2").getP1(), LoadFlowAssert.DELTA_POWER);
assertEquals(-596.104, postContingencyResult.getNetworkResult().getBranchResult("L2").getP2(), LoadFlowAssert.DELTA_POWER);
assertEquals(0.099, postContingencyResult.getNetworkResult().getBranchResult("L1").getP1(), LoadFlowAssert.DELTA_POWER);
Copy link
Member Author

Choose a reason for hiding this comment

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

Because I have changed minP and maxP.

Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
@annetill annetill changed the title [WIP] Support of BusbarSectionContingency for everything Support of BusbarSectionContingency for everything Jan 13, 2023
@annetill annetill requested a review from jeandemanged January 13, 2023 08:07
Copy link
Member

@jeandemanged jeandemanged left a comment

Choose a reason for hiding this comment

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

ok for me

note: to be continued with bus contingencies after powsybl-core 5.1.0 RC (powsybl-core support of BUS contingencies were added in powsybl/powsybl-core#2416)

annetill and others added 4 commits January 16, 2023 11:08
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
geofjamg and others added 12 commits January 17, 2023 21:13
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
@@ -287,6 +295,17 @@ public Optional<LfContingency> toLfContingency(LfNetwork network) {
.filter(LfBranch::isConnectedAtBothSides)
.forEach(connectivity::removeEdge);

// FIXME
Copy link
Member Author

Choose a reason for hiding this comment

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

@geofjamg to ne removed after merging your big PR about zero impedance lines

geofjamg and others added 3 commits March 24, 2023 21:38
# Conflicts:
#	src/main/java/com/powsybl/openloadflow/network/impl/ContingencyTripping.java
#	src/main/java/com/powsybl/openloadflow/network/impl/PropagatedContingency.java
#	src/test/java/com/powsybl/openloadflow/sa/OpenSecurityAnalysisTest.java
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
annetill and others added 2 commits March 29, 2023 08:07
# Conflicts:
#	src/test/java/com/powsybl/openloadflow/sa/OpenSecurityAnalysisTest.java
@@ -325,8 +344,11 @@ public Optional<LfContingency> toLfContingency(LfNetwork network) {
Set<LfGenerator> generators = new HashSet<>(1);
for (String generatorId : generatorIdsToLose) {
LfGenerator generator = network.getGeneratorById(generatorId);
if (generator != null) { // could be in another component
generators.add(generator);
if (generator != null) { // could be in another component FIXME
Copy link
Member Author

Choose a reason for hiding this comment

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

@annetill should be removed... to check after merge of #718

annetill and others added 2 commits March 31, 2023 09:30
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
annetill and others added 2 commits March 31, 2023 14:16
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
@sonarqubecloud
Copy link

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 5 Code Smells

93.9% 93.9% Coverage
0.0% 0.0% Duplication

@annetill annetill merged commit fa01453 into main Mar 31, 2023
@annetill annetill deleted the busbarsection-contingency branch March 31, 2023 14:26
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.

4 participants