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

Simplify objective function evaluators #1109

Merged
merged 16 commits into from
Aug 20, 2024
Merged

Simplify objective function evaluators #1109

merged 16 commits into from
Aug 20, 2024

Conversation

pet-mit
Copy link
Collaborator

@pet-mit pet-mit commented Aug 8, 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 but helps prepare a fix for #1048

What kind of change does this PR introduce?

Housekeeping

What is the current behavior?

In order to be evaluated, an objective function needs:

  • a SensitivityResult object
  • a RangeActionActivationResult
    These were mainly used by the UnoptimizedCnecsInSeriesWithPsts evaluator, which has been removed in removed code relative to cnecs in series with a pst #1015.
    SensitivityResult is currently only used in the sensitivity failure overcost evaluator, which needs to know if any state failed load-flow computations.

What is the new behavior (if this is a feature change)?
The 2 objects have been removed from evaluation inputs, making it simpler.
And a pre-processing is used to make sure that the sensi failure overcost evaluator behaves like before.
This pre-processing needs the addition of a new ComputationStatus : PARTIAL_FAILURE.
This new value means that some sensitivity or loadflow computations failed, but not all.

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

  • Yes
  • [] No

What changes might users need to make in their application due to this PR? (migration steps)
Users have to take into account the existence of a new ComputationStatus.PARTIAL_FAILURE value in their applications that use RaoResult::getComputationStatus()

Signed-off-by: Peter Mitri <peter.mitri@rte-france.com>
@pet-mit pet-mit force-pushed the no_sensi_in_evaluators branch from 6a73eff to 623d159 Compare August 8, 2024 16:56
Signed-off-by: Peter Mitri <peter.mitri@rte-france.com>
@pet-mit pet-mit changed the title Remove SensitivityResult from evaluators Simplify objective function evaluators Aug 8, 2024
pet-mit added 5 commits August 8, 2024 19:04
Signed-off-by: Peter Mitri <peter.mitri@rte-france.com>
…tEvaluator

Signed-off-by: Peter Mitri <peter.mitri@rte-france.com>
Signed-off-by: Peter Mitri <peter.mitri@rte-france.com>
Signed-off-by: Peter Mitri <peter.mitri@rte-france.com>
@pet-mit pet-mit added breaking-change Changes could break users' code cleaning This issue or pull request only concerns improving the overall state of the code labels Aug 9, 2024
Signed-off-by: Peter Mitri <peter.mitri@rte-france.com>
@pet-mit
Copy link
Collaborator Author

pet-mit commented Aug 9, 2024

fails on internal tests 23.2.6 & 23.2.9 => to check

…ionStatus

Signed-off-by: Peter Mitri <peter.mitri@rte-france.com>
Signed-off-by: Peter Mitri <peter.mitri@rte-france.com>
Signed-off-by: Peter Mitri <peter.mitri@rte-france.com>
Signed-off-by: Peter Mitri <peter.mitri@rte-france.com>
@pet-mit pet-mit marked this pull request as ready for review August 12, 2024 15:20
@pet-mit pet-mit requested a review from phiedw August 12, 2024 15:20
Signed-off-by: Peter Mitri <peter.mitri@rte-france.com>
@pet-mit pet-mit added the PR: waiting-for-review This PR is waiting to be reviewed label Aug 12, 2024
Signed-off-by: Peter Mitri <peter.mitri@rte-france.com>
Signed-off-by: Peter Mitri <peter.mitri@rte-france.com>
Comment on lines 199 to 205
|| secondPreventivePerimeterResult.getSensitivityStatus() == FAILURE) {
return FAILURE;
}
if (postContingencyResults.entrySet().stream().anyMatch(entry ->
Objects.isNull(entry.getValue()) || entry.getValue().getSensitivityStatus(entry.getKey()) == FAILURE)) {
return PARTIAL_FAILURE;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

can any of the results return partial_failure?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed it

Signed-off-by: Peter Mitri <peter.mitri@rte-france.com>
@pet-mit pet-mit merged commit 49dab85 into main Aug 20, 2024
10 checks passed
@pet-mit pet-mit deleted the no_sensi_in_evaluators branch August 20, 2024 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Changes could break users' code cleaning This issue or pull request only concerns improving the overall state of the code PR: waiting-for-review This PR is waiting to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants