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

Populate ConnectivityResult in SA post contingency results #701

Merged
merged 16 commits into from
Jan 27, 2023

Conversation

gverger
Copy link
Member

@gverger gverger commented Jan 11, 2023

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

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Connectivity Results have been added to the API of Post Contingency Results for Security Analysis (issue: powsybl/powsybl-core#2183, PR: powsybl/powsybl-core#2413)
Here we want to populate these results.

What is the current behavior? (You can also link to an open issue here)
Currently the connectivity results are not computed and a default value is returned.

What is the new behavior (if this is a feature change)?
In the PostContingencyResults, we will now have the number of synchronous components created when applying a contingency, and the load and generation lost.

This PR is not meant to deal with connected components since there is more work to be done with HVDC lines.

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)

Sorry, something went wrong.

@gverger gverger changed the title Populate ConnectivityResults in post contingency results (SA) [WIP] Populate ConnectivityResults in post contingency results (SA) Jan 11, 2023
@gverger gverger force-pushed the sa_results_components_loss_load_gen branch from afe4569 to 08d7f7e Compare January 11, 2023 13:47
@@ -75,6 +92,10 @@ public int getIndex() {
return index;
}

public int getNbSynchronousComponents() {
Copy link
Member

Choose a reason for hiding this comment

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

I think that here you have to store directly the number of components created by the contingency and add the -1 in that class.

@obrix obrix force-pushed the sa_results_components_loss_load_gen branch from bb87a92 to 528bd1a Compare January 20, 2023 08:59
pom.xml Outdated Show resolved Hide resolved
@@ -45,6 +45,7 @@ public void onDisableChange(LfElement element, boolean disabled) {
break;
case BRANCH:
case HVDC:
case SHUNT_COMPENSATOR:
Copy link
Member

Choose a reason for hiding this comment

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

@obrix can you remove this fix? We have to open a dedicated PR that shows the bug. Can you open it in parallel and I am going to do a use case. Thanks !

Copy link
Member

Choose a reason for hiding this comment

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

Okay, I just opened a separate pull request.

@obrix obrix force-pushed the sa_results_components_loss_load_gen branch 2 times, most recently from fe6bc7a to 8dd52f0 Compare January 25, 2023 13:31
annetill and others added 12 commits January 26, 2023 10:11
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Guillaume Verger <guillaume.verger@artelys.com>
Signed-off-by: Bertrand Rix <bertrand.rix@artelys.com>
…f lost elements for the contingency.

Signed-off-by: Bertrand Rix <bertrand.rix@artelys.com>
…ation.

Signed-off-by: Bertrand Rix <bertrand.rix@artelys.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
… toLfContingency.

Signed-off-by: Bertrand Rix <bertrand.rix@artelys.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
… everything needed is available.

Signed-off-by: Bertrand Rix <bertrand.rix@artelys.com>
Signed-off-by: Bertrand Rix <bertrand.rix@artelys.com>
@obrix obrix force-pushed the sa_results_components_loss_load_gen branch from 8dd52f0 to d422c84 Compare January 26, 2023 09:17
annetill and others added 3 commits January 26, 2023 20:16

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
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] Populate ConnectivityResults in post contingency results (SA) Populate ConnectivityResult in SA post contingency results Jan 27, 2023
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 3 Code Smells

97.0% 97.0% Coverage
0.0% 0.0% Duplication

networkState.restore();
return connectivityResult;
})
.orElse(new ConnectivityResult(0, 0, 0, 0, Collections.emptySet()))
Copy link
Member

Choose a reason for hiding this comment

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

We have a API design issue, maybe we should have done this ConnectivityResult optional.

Copy link
Member

Choose a reason for hiding this comment

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

If you have a PostContingencyResult, you have a ConnectivityResult, no?

Copy link
Member

@geofjamg geofjamg Jan 27, 2023

Choose a reason for hiding this comment

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

Bu if you don't have any loss of connectivity for you contingency, you should not provide this object?

Copy link
Member

Choose a reason for hiding this comment

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

No... right...

@annetill annetill merged commit a775219 into main Jan 27, 2023
@annetill annetill deleted the sa_results_components_loss_load_gen branch January 27, 2023 11:21
geofjamg pushed a commit that referenced this pull request Jan 31, 2023
Signed-off-by: Guillaume Verger <guillaume.verger@artelys.com>
Co-authored-by: Anne Tilloy <anne.tilloy@rte-france.com>
Co-authored-by: Bertrand Rix <bertrand.rix@artelys.com>
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.

None yet

4 participants