Skip to content

Active Power Distribution: better reports severities when residual mismatch remains #1215

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

SylvestreSakti
Copy link
Contributor

@SylvestreSakti SylvestreSakti commented Apr 3, 2025

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)
  • A PR or issue has been opened in all impacted repositories (if any) <- No impacted repositories

Does this PR already have an issue describing the problem?
No

What kind of change does this PR introduce?
Reporting slack bus mismatch is slightly changed, to avoid confusion for users :

What is the current behavior?
Whenever there is a slack mismatch after distribution, even if it is residual, a report is sent with ERROR severity

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

  • When slack mismatch remains, the report showing this slack distribution failure is sent only if the mismatch exceeds slackBusPMaxMismatch.

  • The severity of this report is now set to WARN, because there are cases where remaining mismatch happen without a failing load flow.

  • A new report with DEBUG severity is sent when slack distribution fails but the mismatch is residual (lower than slackBusPMaxMismatch)

  • Severity of the corresponding reports for AreaInterchangeControl have also been modified from ERROR to WARN

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

  • Yes
  • No

Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
vidaldid-rte
vidaldid-rte previously approved these changes Apr 3, 2025
@vmouradian
Copy link
Member

Hello, we also have these report methods for AIC :

public static ReportNode reportAreaInterchangeControlDistributionFailure(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate("areaInterchangeControlDistributionFailure", "Failed to distribute interchange active power mismatch")
.withSeverity(TypedValue.ERROR_SEVERITY)
.add();
}
public static void reportAreaInterchangeControlAreaMismatch(ReportNode reportNode, String area, double mismatch) {
reportNode.newReportNode()
.withMessageTemplate("areaInterchangeControlAreaMismatch", "Remaining mismatch for Area ${area}: ${mismatch} MW")
.withUntypedValue("area", area)
.withTypedValue(MISMATCH, mismatch, OpenLoadFlowReportConstants.MISMATCH_TYPED_VALUE)
.withSeverity(TypedValue.ERROR_SEVERITY)
.add();
}

But they are used in case of a mismatch higher than the threshold, not the epsilon. We could maybe also add a report for residual mismatch here but I am not sure it is very necessary, do you have an opinion on that ?

@vidaldid-rte
Copy link
Collaborator

Hello, we also have these report methods for AIC :

public static ReportNode reportAreaInterchangeControlDistributionFailure(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate("areaInterchangeControlDistributionFailure", "Failed to distribute interchange active power mismatch")
.withSeverity(TypedValue.ERROR_SEVERITY)
.add();
}
public static void reportAreaInterchangeControlAreaMismatch(ReportNode reportNode, String area, double mismatch) {
reportNode.newReportNode()
.withMessageTemplate("areaInterchangeControlAreaMismatch", "Remaining mismatch for Area ${area}: ${mismatch} MW")
.withUntypedValue("area", area)
.withTypedValue(MISMATCH, mismatch, OpenLoadFlowReportConstants.MISMATCH_TYPED_VALUE)
.withSeverity(TypedValue.ERROR_SEVERITY)
.add();
}

But they are used in case of a mismatch higher than the threshold, not the epsilon. We could maybe also add a report for residual mismatch here but I am not sure it is very necessary, do you have an opinion on that ?

@vmouradian The main driver for this PR was a report with Error severity inside a successulf loadflow computation.
Error severity should only be used for something that causes a failure. I see that the reports you show have an ERROR severity. Do they really correspond to unrecovarable fatal errors ? If not, you should at least change the severity to warning.

@vmouradian
Copy link
Member

@vmouradian The main driver for this PR was a report with Error severity inside a successulf loadflow computation.
Error severity should only be used for something that causes a failure. I see that the reports you show have an ERROR severity. Do they really correspond to unrecovarable fatal errors ? If not, you should at least change the severity to warning.

You are rigth, it is very similar to the situation when reportMismatchDistributionFailure is used. So it would need to be a warning too.

@SylvestreSakti
Copy link
Contributor Author

Hello @vmouradian , yes as @vidaldid-rte says, the main aim of this PR was to have the adequate level of severity for the report. We also found it counfising to compare with P_RESIDUE_EPS, and that's why the report is changed to be compared with the slackBusPMaxMismatch. To keep this previously existing information though, I added the debug report in case.

I don't know if it is necessary to have the same information for the usecase of AIC. If you are not sure, maybe we can leave it as it is. I just changed the severity level of the report.

@SylvestreSakti SylvestreSakti changed the title Active Power Distribution : More accurate report when having residual slack mismatch Active Power Distribution and AIC : better severity level for reports when having residual slack mismatch Apr 4, 2025
@jeandemanged jeandemanged changed the title Active Power Distribution and AIC : better severity level for reports when having residual slack mismatch Active Power Distribution: better reports severities when remaining residual mismatch Apr 11, 2025
@jeandemanged jeandemanged changed the title Active Power Distribution: better reports severities when remaining residual mismatch Active Power Distribution: better reports severities when residual mismatch remains Apr 11, 2025
@SylvestreSakti
Copy link
Contributor Author

SylvestreSakti commented Apr 11, 2025

I suggest that we wait for #1216 (report internationalization) to be merged before merging this PR so that we can refactor the new reports of this PR too.

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