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 isSecure for RaoResult #869

Merged
merged 10 commits into from
Jan 22, 2024
Merged

Add isSecure for RaoResult #869

merged 10 commits into from
Jan 22, 2024

Conversation

bqth29
Copy link
Collaborator

@bqth29 bqth29 commented Jan 16, 2024

Please check if the PR fulfills these requirements

  • 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?
No

What kind of change does this PR introduce?
New feature

What is the new behavior (if this is a feature change)?
RaoResult objects now provides 3 new methods that allow client to assess the RAO result security status (i.e. positive margin on all Cnecs) , for multiple instants of optimization, and separately for each of the Cnec kind (Flow, Voltage and Angle).
These methods are :

  • boolean isSecure() -> Assess security on last optimisation instant, taking into account all Cnec kinds
  • boolean isSecure(PhysicalParameter...) -> Assess security on last optimisation instant, taking into account a potential subset of Cnec kinds
  • boolean isSecure(Instant, PhysicalParameter...) -> Assess security on a given optimisation instant, taking into account a potential subset of Cnec kinds

This PR also add a method getLastInstant() to the CRAC API that allow to get the last instant based on order (biggest order one). This instant should correspond to the final optimisation instant.

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
@bqth29 bqth29 marked this pull request as draft January 16, 2024 15:18
bqth29 and others added 2 commits January 16, 2024 16:32
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
Signed-off-by: Sébastien Murgey <sebastien.murgey@rte-france.com>
Signed-off-by: Sébastien Murgey <sebastien.murgey@rte-france.com>
Signed-off-by: Sébastien Murgey <sebastien.murgey@rte-france.com>
@pet-mit pet-mit requested a review from phiedw January 18, 2024 08:40
Copy link
Collaborator

@pet-mit pet-mit left a comment

Choose a reason for hiding this comment

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

Please update the documentation here: https://github.com/farao-community/farao-community.github.io/blob/master/pages/docs/output-data/rao-result/rao-result-json.md

i realize this is more complicated than it seemed. we may want to do some refactoring in the future. it would be nice to have a review from @phiedw too

return false;
}
if (Arrays.stream(u).toList().contains(PhysicalParameter.FLOW)) {
return optimizedFlowCnecs.stream()
Copy link
Collaborator

Choose a reason for hiding this comment

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

use functional cost here also


@Override
public boolean isSecure(Instant optimizedInstant, PhysicalParameter... u) {
if (ComputationStatus.FAILURE.equals(getComputationStatus())) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

also check computation status map

murgeyseb and others added 5 commits January 18, 2024 11:08
Signed-off-by: Sébastien Murgey <sebastien.murgey@rte-france.com>
Signed-off-by: Sébastien Murgey <sebastien.murgey@rte-france.com>
Signed-off-by: Sébastien Murgey <sebastien.murgey@rte-france.com>
Signed-off-by: Sébastien Murgey <sebastien.murgey@rte-france.com>
@pet-mit pet-mit marked this pull request as ready for review January 22, 2024 09:27
@pet-mit pet-mit merged commit bafd1fe into main Jan 22, 2024
5 of 6 checks passed
@pet-mit pet-mit deleted the rao_result_is_secure branch January 22, 2024 09:41
MartinBelthle pushed a commit that referenced this pull request May 28, 2024
Add isSecure(...) methods in RaoResult

Signed-off-by: belthlemar <martin.belthle@rte-france.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants